The original, and most common spec (see Spec). A ControlSpec is used by GUI sliders and knobs to specify the range and curve of the controls. ControlSpec may be used in many ways to map from linear 0..1 range to your desired range and back.
The most common way to create a ControlSpec is by
minval |
The minimum value of the range. |
maxval |
The maximium value of the range. |
warp |
a Warp, a symbol (e.g. \lin or \exponential: Default value is \lin), or something else that returns a Warp when sent the message .asWarp. A CurveWarp is defined by a number. |
step |
The smallest possible increment. |
default |
The default value. |
units |
The units, e.g. "hz". Used by some gui's as a unit label. |
grid |
Maps and constrains a value between 0 and 1 to the range between minval and maxval.
Maps and constrains a value between minval and maxval to the range between 0 and 1.
The lower of maxval and minval.
The higher of maxval and minval.
Returns value.asFloat.clip(clipLo, clipHi).round(step)
.
Returns maxval - minval
.
Used for EZ GUI classes for guessing a sensible step if none is specified.
Returns the AbstractGridLines subclass corresponding to the current spec, in particular its warp behavior.
Get/set an instance of the AbstractGridLines subclass that describes the range and warp behavior of the current spec, e.g. for use by DrawGrid for drawing grids in Plotter.