In the following code the sig is mutiplied by an envelope .
Next assignment of sig is freeverb with sig as input , but somehow the done action cuts of the reverb and or creating audible clicks
How is this possible , since sig*env is only entering the reverb ?
(
SynthDef (\simple,
{
|att=0.001,dec=0.200,mod=500,pitch=0,filterfreq=400,reso=0.5,vol=0.5|
var sig,env;
env=EnvGen.ar(Env([0,1,0],[att,dec],[0,-5]),doneAction:2);
sig=Pulse.ar(pitch.midicps,mul:0.5)+Saw.ar((pitch+7).midicps,mul:0.5);///////I an
sig=RLPF.ar(sig,filterfreq+(env*mod).clip(40,20000),rq:reso);
sig=sig*env;
sig=FreeVerb.ar(sig,mix:0.5,room:1,mul:1)!2;
Out.ar(0,sig*vol)
}).add
)
/////////////////////////////////
(
Pdef(\zxcv,
Pbind(\instrument,\simple,
\dur,Pseq([2,0.5,0.5,1,0.25],inf),
\pitch,Pseq([44,47,40,52,44,40,63],inf),
\filterfreq,Prand([200,150,50,],inf),
\dec,Pseq([0.125,0.125,4.125,0.7,0.25],inf),
\att,Prand([0.001,0.1,0.01,0.001],inf),
\reso,Pseq([0.5,0.5,0.5,0.2,0.5,0.5,0.1],inf),
\vol,Pseq([0.2],inf),
\mod,Pseq([30,50,20,150],inf),
)
))
///
Pdef(\zxcv).play;
Pdef(\zxcv).stop;