In one synthdef I have two EnvGens with doneAction:2 which both take different
times to complete their envelopes. It seems the earlier one will free
the synth node. Is there a way to have the EnvGen that finishes last
free the node instead? I have looked at the docs for Done but can’t seem
to find it.
Yes. Use two Done.kr’s and a FreeSelf.kr. Done.kr outputs 1 if the input UGen’s done flag is set, otherwise 0. Multiply the two Done.kr’s together so that FreeSelf.kr is triggered if and only if both Done.kr’s are nonzero.
fadeTime isn’t only jitlib – it’s also an argument to Function:play – “Crossfade time for attack and release of the synth. The default is 0.02 seconds, which is just enough to avoid a click.”