Synthdef arg ranges

Where can I find the standard value ranges for arguments for a synthdef, i.e. rel = ? , dur = ?

Have a look at the help file for Spec .

there is an Identity Dictionary in Spec of common specifications

1 Like

Strictly speaking, there aren’t any standard ranges. The SynthDef can use argument names and values freely.

Standard ranges or meanings become important when you want your SynthDef to cooperate with other parts of the class library.

E.g., Function:play, Events and JITLib NodeProxies use gate to stop a node. You’re free to write a SynthDef that uses the name gate for a different purpose, but then that SynthDef might not work with Events or proxies.

The default event prototype uses several argument names for standard purposes, such as freq, amp, pan, etc. These are discussed in http://doc.sccode.org/Tutorials/A-Practical-Guide/PG_08_Event_Types_and_Parameters.html – again, you’re free to ignore them but if you’re planning to play the SynthDef using events/patterns, then it’s good to be aware of those.

Several standard ranges are defined in the Spec.specs dictionary. These are used in JITLib GUIs and crucial library Patch GUIs, for instance – if you create a NodeProxy with a freq input, then the JITLib GUI will automatically assign a 20 - 20000 Hz exponential range to it. I think it’s possible to set out-of-range values programmatically though – Spec.specs contains suggestions but they’re not rigidly enforced.

hjh

1 Like

great thanks to you both!