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 -> event pattern
- Set the proxy controls with an event pattern of type
\set. Old values are kept, only those explicitly provided are overridden.
- \pset -> event pattern
- set all proxy controls to event data
- \xset -> event pattern
- set all proxy controls to event data, using synth crossfade (see -xset).
- \setbus -> event pattern
- Set the proxy bus with an event pattern of type
- \setsrc -> event pattern
- Set the proxy source at the next index with any object, controlled by a pattern. Note that any existing source at the next index (in the example below it is index 1) is overridden by the procedure.
- \filter -> function
- Filter the audio on the proxy's own bus, using the first argument to pass in the sound. The function is any valid UGen function, which may be control or audio rate. Default controls are wet++index, where index is the slot of the proxy (default 0), in the example below, the control is
- \filterIn -> function
\filter, only that the input is controled by the
\wet control, not the output.
- \mix -> function
- Mix in the UGen in the function.
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.