Module controlspec
ControlSpec Class
The norns script reference has examples for this module.
Functions
new (min, max, warp, step, default, units, quantum, wrap) | constructor |
def (args) | create generic controlspec helper function to create controlspec using a table of parameters |
map (value) | transform an incoming value between 0 and 1 through this ControlSpec |
unmap (value) | untransform a transformed value into its original value |
copy () | copy this ControlSpec into a new one |
print () | print out the configuration of this ControlSpec |
Presets
UNIPOLAR | converts values to a unipolar range |
BIPOLAR | converts values to bipolar range |
FREQ | converts to a frequency range |
LOFREQ | converts to a low frequency range |
MIDFREQ | converts to a mid frequency range |
WIDEFREQ | converts to an exponential frequency range from 0.1 to 20khz |
PHASE | maps into pi for controlling phase values |
RQ | converts to an exponential RQ range |
MIDI | converts to a MIDI range (default 64) |
MIDINOTE | converts to a range for MIDI notes (default 60) |
MIDIVELOCITY | converts to a range for MIDI velocity (default 64) |
DB | converts to a dB range |
AMP | converts to a linear amplitude range (0-1) |
PAN | converts to a panning range (-1 - 1) |
DETUNE | converts to a detune range |
RATE | converts to a sensible range for playback rate |
BEATS | convert to a good range for beats |
DELAY | converts to a good range for delay |
Functions
- new (min, max, warp, step, default, units, quantum, wrap)
-
constructor
Parameters:
- min number the minimum value of the output range
- max number the maximum value of the output range
- warp string ('exp', 'db', 'lin') a shaping option for incoming data (default is 'lin')
- step number quantization value. output will be rounded to a multiple of step
- default number a default value for when no value has been set
- units string an indicator for the unit of measure the data represents
- quantum number input quantization value. adjustments are made by this fraction of the range
- wrap boolean true to wrap around on overflow rather than clamping
Returns:
-
ControlSpec
- def (args)
-
create generic controlspec
helper function to create controlspec using a table of parameters
Parameters:
- args
- map (value)
-
transform an incoming value between 0 and 1 through this ControlSpec
Parameters:
- value number the incoming value
Returns:
-
number
the transformed value
- unmap (value)
-
untransform a transformed value into its original value
Parameters:
- value number a previously transformed value
Returns:
-
number
the reverse-transformed value
- copy ()
-
copy this ControlSpec into a new one
Returns:
-
ControlSpec
a new ControlSpec
- print ()
- print out the configuration of this ControlSpec
Presets
- UNIPOLAR
- converts values to a unipolar range
- BIPOLAR
- converts values to bipolar range
- FREQ
- converts to a frequency range
- LOFREQ
- converts to a low frequency range
- MIDFREQ
- converts to a mid frequency range
- WIDEFREQ
- converts to an exponential frequency range from 0.1 to 20khz
- PHASE
- maps into pi for controlling phase values
- RQ
- converts to an exponential RQ range
- MIDI
- converts to a MIDI range (default 64)
- MIDINOTE
- converts to a range for MIDI notes (default 60)
- MIDIVELOCITY
- converts to a range for MIDI velocity (default 64)
- DB
- converts to a dB range
- AMP
- converts to a linear amplitude range (0-1)
- PAN
- converts to a panning range (-1 - 1)
- DETUNE
- converts to a detune range
- RATE
- converts to a sensible range for playback rate
- BEATS
- convert to a good range for beats
- DELAY
- converts to a good range for delay