// title: FMSynth GUI // author: Scott L Simon // description: // Combined a couple of bits of code from this site - with a few mods. Creates a little performance GUI that does frequency mod. // code: ( var w, addslider, speedslider, synth; w=Window("freq modulation", Rect(100, 400, 400, 300)); w.view.decorator = FlowLayout(w.view.bounds); synth={arg x=0, addz = 100, speed = 5; (60..100).do{|f| x=SinOsc.ar(f+[0,f ] * (SinOsc.kr(Line.kr(1,5, 20,doneAction:2),add: addz, mul: 100)) ,0, mul: 0.3)}; LPF.ar(x+Ringz.ar(Impulse.ar(speed),MouseX.kr(22,300),0.3, 0.4),Line.kr(100,17000,20))}.scope; addslider= EZSlider(w, 300@50, "add", ControlSpec(100, 500, 'exponential', 2, 100), {|ez| synth.set(\addz, ez.value)}); w.view.decorator.nextLine; speedslider = EZSlider(w, 300@50, "speed", ControlSpec(1,10, 'exponential', 1, 5), {|ez| synth.set(\speed, ez.value)}); w.view.decorator.nextLine; w.front; ) //modded from m_step and jamshark