Hi
I'm a bit confused by the following behaviour of EnvGen:
(
x = SynthDef(\test, {
var env = Env([ 1, 0, 0 ],[ 6, 0 ], \lin );
EnvGen.kr(env, \gate2.kr(0), doneAction:2).poll
}).play
)
this will post
UGen(EnvGen): 1
only once because the synth gets immediately freed.
On the other hand
(
x = SynthDef(\test, {
var env = Env([ 1, 0, 0 ],[ 6, 0 ], \lin );
EnvGen.kr(env, \gate2.kr(0), doneAction:0).poll
}).play
)
will post
UGen(EnvGen): 1
indefinitely until I do
x.set(\gate2, 1)
and then the env will start going to zero.
Is it expected that in the first case the synth gets freed immediately
even if the EnvGen has not been triggered yet ? I would expect that in
the first case the synth be freed only after the EnvGen gets triggered
and gets to then end of the env in 6 seconds.
thanks,
Miguel