2 //////// the theremin ////////
4 // playing only one instance:
9 f = MouseY.kr(4000, 200, 'exponential', 0.8);
11 freq: f+ (f*SinOsc.ar(7,0,0.02)),
12 mul: MouseX.kr(0, 0.9)
19 // building a synthdef and spawning separate synths
22 SynthDef(\theremin, { arg mod = 7, detune = 0;
24 f = MouseY.kr(4000, 200, 'exponential', 0.8) + detune;
25 a = SinOsc.ar(f + (f * SinOsc.ar(mod,0,0.02)), mul: MouseX.kr(0, 0.9));
27 Out.ar(0, z) + Out.ar(1, z)
35 b.set(\mod, 5, \detune, 200);