getSpec:
Filter:
JITLibExtensions (extension) | Guides

getSpec
ExtensionExtension

Using Specs for proxy parameters: getSpec, addSpec, and specs

Using Specs for proxy parameters: getSpec, addSpec, and specs

JITLib proxies like PatternProxy (and thus TaskProxy, Pdef, and Tdef) and NodeProxy/Ndef and other objects have numerical settings, for which defining a Spec is useful: a practical mininum, maximum and curve (warp).

In the JITLibExtensions quark, addSpec and getSpec provide a general interface for proxies and all other objects that use .set methods for named parameters. This makes it easy to set and access ranges for parameters, e.g. for GUIs and other interfaces:

For historical reasons, NodeProxy (and Ndef) has two ways to define a spec for a given parameter name:

As the specs for the same parameter name can be different in these two places, it is necessary to decide which one will be used. In JITLibExtensions, addSpec / Halo gets priority over implicit specs; so if nothing is found in the Halo, then we look in proxy.specs.

This precedence is useful for tuning specs while the sound continues: once a good spec is found, one can place it back in the synth func. If you always prefer to use implicit specs, just use implicit specs only, or at least avoid also using addSpec for the same parameter name.

Tests and Examples for using addSpec and implicit specs