[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] envgen freeing synth immediatelly at synth start




Miguel,

The first code (doneAction:2) does not free the synth on my computer (SC 3.6.6 - standard distribution; OS X 10.10.1).  It constantly polls "UGen(EnvGen): 1", as expected.

Pete




On 9 December 2014 at 15:35, Miguel Negrão <miguel.negrao-lists@xxxxxxxxxxxxxxxxx> wrote:
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