Re: [LAU] Theramin oscillator for LADSPA?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ken Restivo <ken@...>
Cc: <linux-audio-user@...>
Date: Sunday, October 6, 2013 - 8:59 pm

On Sun, Oct 06, 2013 at 01:29:23PM -0700, Ken Restivo wrote:

> How would one do that with LADSPA plugins? 6 sine

Yes, but 3 or 4 would probably be enough. Anything below
0.01 is suspect anyway.

> I vaguely remember seeing an oscillator (maybe in AMS?)

No, it goes up to 20 or so. But you'll have zillions
of envelope parameters to adjust. Or just use three
simple sine oscillators.

> Also, were you really able to come up with that

Of course not :-) I digitised the waveform using a
simple program that writes mouse clicks to a text
file. Then a few lines of Python:

#!/usr/bin/python

from math import *

X = [ 0.00, 0.70, 1.30, 2.00, 2.70, 3.25, 4.00, 4.65, 5.15, 5.85,
6.35, 6.95, 7.40, 7.95, 8.30, 8.75, 9.10, 9.55, 10.00, 10.25,
10.55, 10.90, 11.20, 11.53, 11.70, 11.40, 10.98, 10.10, 9.10, 8.00,
6.90, 5.75, 4.45, 3.20, 2.10, 1.01, 0.00, -1.00, -1.98, -2.90,
-3.70, -4.25, -5.00, -5.60, -6.10, -6.60, -7.02, -7.35, -7.80, -8.00,
-8.15, -8.30, -8.40, -8.46, -8.50, -8.50, -8.47, -8.45, -8.27, -8.10,
-7.99, -7.80, -7.55, -7.25, -7.00, -6.67, -6.35, -6.05, -5.65, -5.30,
-4.98, -4.50, -4.05, -3.60, -3.05, -2.60, -2.00, -1.45, -0.80 ]

N = len(X)

def analyse(f):
sx = 0
sy = 0
w = f * 2 * pi / N
for i in range(N):
sx += X [i] * sin (i * w)
sy += X [i] * cos (i * w)
m = hypot (sx, sy)
a = atan2(sy, sx) * 180 / pi
return m, a

for i in range (1, 11):
m, a = analyse (i)
if i == 1: m1 = m
print ("%3d %10.3f %8.1f" % (i, m / m1, a))

> > Apart from that the sound will be frequency and amplitude

It would have to have sufficient bandwidth and resolution,
both very high on the original.

Ciao,

--
FA

A world of exhaustive, reliable metadata would be an utopia.
It's also a pipe-dream, founded on self-delusion, nerd hubris
and hysterically inflated market opportunities. (Cory Doctorow)

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-user

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAU] Theramin oscillator for LADSPA?, Ken Restivo, (Sun Oct 6, 8:59 am)
Re: [LAU] Theramin oscillator for LADSPA?, Fons Adriaensen, (Sun Oct 6, 10:55 am)
Re: [LAU] Theramin oscillator for LADSPA?, Ken Restivo, (Sun Oct 6, 8:29 pm)
Re: [LAU] Theramin oscillator for LADSPA?, Lorenzo Sutton, (Tue Oct 8, 2:50 pm)
Re: [LAU] Theramin oscillator for LADSPA?, Fons Adriaensen, (Sun Oct 6, 8:59 pm)
Re: [LAU] Theramin oscillator for LADSPA?, Lieven Moors, (Mon Oct 7, 7:38 pm)
Re: [LAU] Theramin oscillator for LADSPA?, Harry van Haaren, (Sun Oct 6, 9:12 pm)
Re: [LAU] Theramin oscillator for LADSPA?, Will Godfrey, (Sun Oct 6, 8:38 pm)
Re: [LAU] Theramin oscillator for LADSPA?, David Santamauro, (Sun Oct 6, 11:25 am)