ItemsSpec maps an item from an array of possible items onto a value range between 0 and 1.
Simple example:
Create a new ItemsSpec.
items |
An Array of items to map onto. |
warp |
An optional warp like \lin, \cos, \sin, or float number. |
default |
An optional default value (float between 0 and 1) |
Map a SimpleNumber onto the items.
inval |
A SimpleNumber |
a String
Unmap an items contained in items to its number value
inval |
an item |
A SimpleNumber or nil if the item was not found.
The default value of an ItemsSpec is 0
The array of items.
A ControlSpec that handles the conversion of 0-1 range to number of indices for the ItemsSpec.
Convenience method.
the ItemsSpec