ExtensionProvides a light-weight way to define and reuse small signal / filter / utility modules to populate a NodeProxy.
Instead of writing full functions each time, you can reference a named module.
| proxyspace |
The |
An NPModules instance.
The prototype dictionary of built-in modules. Can be adapted and extended for global changes. Changing elements here is propagated to existing NPModules instances, however, existing instances in NodeProxy instances are not updated automatically.
A dictionary of all NPModules instances.
announces the \module -> role for NodeProxy instances. See NodeProxy roles .
add a mmodule to all existing instances. Note that the instances need to be registered in NPModules.all, i.e. meed to be called at least once for this to work.
| key |
Symbol name to bind. |
| value |
Function receiving a dict and returning either a UGen function or a role mapping. |
| updateNodes |
Boolean (default false). |
helper function to create kr control functions with index suffix to avoid name clashes when multiple instances of the same module are used e.g. \freq -> \freq0, \freq1, ...
| name |
the base name (Symbol). |
| spec |
the spec to use |
| dict |
the dictionary passed to the module function. This contains, among other things, the |
| lag |
lag time. defaults to 0 |
A function that returns a NamedControl with the appropriate name and spec.
dictionary of modules.
A Set of all module names (Symbol) available.
The proxyspace dictionary this instance operates on.
| key |
Symbol name of module. |
The module function (or role-returning function) or nil if not found.
| key |
Symbol name to bind. |
| value |
Function receiving a dict and returning either a UGen function or a role mapping. |
| updateNodes |
Boolean (default false). |
The value inserted.
Distort a custom sound (in slot 0):
Write your own module by adding it to the registry for the relevant ProxySpace:
Then use it in a proxy:
Change the sound by redefining the module:
For integration reasons, any valid NodeProxy role is also accepted as a module: