«modulo» by lambda

on 04 Jul'20 04:35 in modulacion
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Modulo
// ukiyo-neko systems
//
// un modulador simple, tiene tres perillas, la frecuencia base, la frecuencia de modulacion y la apmlitud de modulacion..
(
SynthDef(\modulo,{arg carrfreq=440, modfreq=1, moddepth=0.01;   //make sure there are control arguments to affect!
	Out.ar(0,
		SinOsc.ar(carrfreq + (moddepth*SinOsc.ar(modfreq)),0,0.25)!2)
}).add;
)

s.scope;

(

var w, carrfreqslider, modfreqslider, moddepthslider, synth;

w=Window("frequency modulation", Rect(100, 400, 400, 300));
w.view.decorator = FlowLayout(w.view.bounds);

a = Synth(\modulo);

carrfreqslider= EZSlider(w, 300@50, "carrfreq", ControlSpec(20, 1500, 'linear', 10, 440), {|ez|
a.set(\carrfreq, ez.value)});
w.view.decorator.nextLine;

modfreqslider= EZSlider(w, 300@50, "modfreq", ControlSpec(1, 2000, 'linear', 1, 1), {|ez|  a.set(\modfreq, ez.value)});

w.view.decorator.nextLine;
moddepthslider= EZSlider(w, 300@50, "moddepth", ControlSpec(0.01, 5000, 'linear', 0.01, 0.01), {|ez|  a.set(\moddepth, ez.value)});

w.front;
)
raw 1041 chars (focus & ctrl+a+c to copy)
reception
comments