Hello, I’m trying to free the pattern and/or the synth. Could anybody guide me on how to do that effectively? I tried to use " Pbind’s name.stop; ", but it doesn’t work.
Thank you very much for your help.
V
(
b= SynthDef(\perc,{ |freq=800, rel=4.5, pan =2, amp = 0.2,mxdt = 0.4, dt=0.3,dct =0.5|
var sig,efx;
sig=LPF.ar(Mix(SinOsc.ar(freq,0,0.5),SinOsc.ar(2*freq,0,0.3),SinOsc.ar(3*freq,0,0.2))*EnvGen.kr(Env.perc(0.01,rel),doneAction:2),3000,amp);
efx = CombC.ar(sig,mxdt, dt, dct);
Out.ar(0,Pan2.ar(sig, SinOsc.ar(pan),level:amp));
}).add;
)
(
z=SynthDef(\pad,{| freq=740,vol=0.5, relOne =1,relTwo =1 amp =0.4, pan = 1 |
var sig;
sig=LPF.ar(Mix(Blip.ar(freq,0,0.3),LFSaw.ar(2*freq,0,0.3),SinOsc.ar(3.01*freq,0,0.3))*EnvGen.ar(Env([0,0.4,0],[relOne,relTwo]),doneAction:2),1000, amp);
Out.ar(0,Pan2.ar(sig,FSinOsc.kr(pan),level:amp));
}).add;
)
(
{
~perc.play;"perc play".postln;
5.wait;
~pad.play;"pad play".postln;
5.wait;
b.free;
z.free;
}.fork;
)