Re: Theramin oscillator for LADSPA?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

> How would one do that with LADSPA plugins? 6 sine
> wave oscillators into a mixer, one for each harmonic?

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?)
> that had mixer settings for various harmonics, but I'm
> pretty sure it only went up to the first 3.

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
> harmonic recipe just by looking at that waveform?
> If so, I find that remarkably impressive.

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
> > modulated by minute movements of the player's hands.
> 
> True, that has a lot to do with the sound. I was thinking
> a ribbon controller or a simple X-Y trackpad (or an OSC
> thing on an Android tablet) would take care of that.

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@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/listinfo/linux-audio-user




[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux