Classes | Control | Spec

Spec : Object

input datatype specification
Source: Spec.sc
Subclasses: ControlSpec


Specs specify what kind of input is required or permissible, and what the range of those parameters are. This is an abstract class - the most common subclass is: ControlSpec.

ControlSpec is used by GUI sliders and knobs to specify the range and curve of the controls. Input datatypes are of interest to functions, to gui interface objects (sliders etc.) and can also be used for introspection.

The class Spec itself holds a master IdentityDictionary of common specifications. The name that the spec was stored as can then be used as a shorthand to refer to specs:

Some common mappings are initialized in ControlSpec.initClass. You may add or overwrite mappings as you wish. The crucial library (available as a quark, see Quarks) defines a number of additional subclasses. See the file quarks/cruciallib/Instr/MoreSpecs.sc

Class Methods

Spec.add(name, args)

Add a spec to the global spec dictionary. The item will be converted to a spec using .asSpec.

Inherited class methods

Undocumented class methods

Spec.guess(key, value)

From extension in /usr/local/share/SuperCollider/SCClassLibrary/JITLib/GUI/extSoftSet.sc


Spec.specs = value

Spec.suggestString(key, value)

From extension in /usr/local/share/SuperCollider/SCClassLibrary/JITLib/GUI/extSoftSet.sc

Instance Methods

Inherited instance methods

Undocumented instance methods