Similar to Adverbs (see J concepts in SC), roles allow to specify how a source for a NodeProxy is being used. A role is an association of a Symbol and the new proxy source object.
The below examples can equally be used for Ndef and in ProxySpace.
\set
. Old values are kept, only those explicitly provided are overridden.
\c_set
\wet1
, and it crossfades between the incoming sound source and the effect (wet) signal output.
\filter
, but the \wet
control now sets the filter input level, rather than its output. This lets time-based effects like delays, combs, filters with long ringtimes continue to sound even when the input is already turned off.
Roles can be added on the fly. They are kept in a dictionary ( buildMethods ) in AbstractPlayControl. A second dictionary ( proxyControlClasses ) provides the wrapper class for a given key.
Here is a new role that allows you to set a control rate node proxy with the help of an event pattern. The new values are in a key named \value.