| Hello, This works, but I don't know what to do to use more than one control Bus of this kind. I red the Bus.help.rtf ("Manages allocation and deallocation of bus indices so that you don't need to worry about conflicts.") and tryied to change some variable names... What would you recomend? (I mean, not just to solve the problem, but to really understand what am I missing - for sure a lot of different things...). Thanks again. ( SynthDef(\trig, {arg amp=1.0, gate = 1, density, freq; var dur, sound; dur = EnvGen.kr(Env.perc(Rand(1.5,6), Rand(1.5,6), 1), 1.0, doneAction:2); sound = Trig.ar(Dust.ar(density), 0.002) * SinOsc.ar(freq, 0.5); x = sound * EnvGen.kr(Env.cutoff, gate, doneAction: 2); Out.ar([0,1], x*amp*dur); }).send(s) ) c = Bus.control(s,1); d = "c" ++ c.index; ( var w, slider; w=SCWindow("Instr1", Rect(100,500,200,65)); slider=SCSlider(w,Rect(10,10,180,30)); slider.action_({c.set(slider.value);}); w.front; ) ( r = Task({ {Synth("trig", [\density, rrand(0.5, 11), \freq, rrand(1, 100), \amp, d ]); rrand(3.0, 6.0).wait; }.loop; }).play ) r.stop; |