SuperCollider REFERENCE

UGen done-actions

Actions to take when an UGen has finished
    

A number of UGens implement doneActions. These allow one to optionally free or pause the enclosing synth and other related nodes when the UGen is finished.

Actions

The available done actions are as follows:
0do nothing when the UGen is finished
1pause the enclosing synth, but do not free it
2free the enclosing synth
3free both this synth and the preceding node
4free both this synth and the following node
5free this synth; if the preceding node is a group then do g_freeAll on it, else free it
6free this synth; if the following node is a group then do g_freeAll on it, else free it
7free this synth and all preceding nodes in this group
8free this synth and all following nodes in this group
9free this synth and pause the preceding node
10free this synth and pause the following node
11free this synth and if the preceding node is a group then do g_deepFree on it, else free it
12free this synth and if the following node is a group then do g_deepFree on it, else free it
13free this synth and all other nodes in this group (before and after)
14free the enclosing group and all nodes within it (including this synth)

For information on freeAll and deepFree, see Group and Server Command Reference.

Alternatives

Another way to free a synth when some UGen is done playing is to use FreeSelfWhenDone, or FreeSelf in combination with Done. For example, this can be used to delay the freeing to let reverb tails fade out, etc.