Class controlspec

ControlSpec Class

Methods

controlspec:new (minval, maxval, warp, step, default, units) constructor
controlspec:map (value) transform an incoming value between 0 and 1 through this ControlSpec
controlspec:unmap (value) untransform a transformed value into its original value
controlspec:copy () copy this ControlSpec into a new one
controlspec:print () print out the configuration of this ControlSpec

Presets

controlspec.UNIPOLAR converts values to a unipolar range
controlspec.BIPOLAR converts values to bipolar range
controlspec.FREQ converts to a frequency range
controlspec.LOFREQ converts to a low frequency range
controlspec.MIDFREQ converts to a mid frequency range
controlspec.WIDEFREQ converts to an exponential frequency range from 0.1 to 20khz
controlspec.PHASE maps into pi for controlling phase values
controlspec.RQ converts to an exponential RQ range
controlspec.MIDI converts to a MIDI range (default 64)
controlspec.MIDINOTE converts to a range for MIDI notes (default 60)
controlspec.MIDIVELOCITY converts to a range for MIDI velocity (default 64)
controlspec.DB converts to a dB range
controlspec.AMP converts to a linear amplitude range (0-1)
controlspec.PAN converts to a panning range (-1 - 1)
controlspec.DETUNE converts to a detune range
controlspec.RATE converts to a sensible range for playback rate
controlspec.BEATS convert to a good range for beats
controlspec.DELAY converts to a good range for delay


Methods

controlspec:new (minval, maxval, warp, step, default, units)
constructor

Parameters:

  • minval number the minimum value of the output range
  • maxval number the max 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

Returns:

    ControlSpec
controlspec:map (value)
transform an incoming value between 0 and 1 through this ControlSpec

Parameters:

  • value number the incoming value

Returns:

    number the transformed value
controlspec:unmap (value)
untransform a transformed value into its original value

Parameters:

  • value number a previously transformed value

Returns:

    number the reverse-transformed value
controlspec:copy ()
copy this ControlSpec into a new one

Returns:

    ControlSpec a new ControlSpec
controlspec:print ()
print out the configuration of this ControlSpec

Presets

controlspec.UNIPOLAR
converts values to a unipolar range
controlspec.BIPOLAR
converts values to bipolar range
controlspec.FREQ
converts to a frequency range
controlspec.LOFREQ
converts to a low frequency range
controlspec.MIDFREQ
converts to a mid frequency range
controlspec.WIDEFREQ
converts to an exponential frequency range from 0.1 to 20khz
controlspec.PHASE
maps into pi for controlling phase values
controlspec.RQ
converts to an exponential RQ range
controlspec.MIDI
converts to a MIDI range (default 64)
controlspec.MIDINOTE
converts to a range for MIDI notes (default 60)
controlspec.MIDIVELOCITY
converts to a range for MIDI velocity (default 64)
controlspec.DB
converts to a dB range
controlspec.AMP
converts to a linear amplitude range (0-1)
controlspec.PAN
converts to a panning range (-1 - 1)
controlspec.DETUNE
converts to a detune range
controlspec.RATE
converts to a sensible range for playback rate
controlspec.BEATS
convert to a good range for beats
controlspec.DELAY
converts to a good range for delay
generated by LDoc 1.4.6 Last updated 2020-03-28 23:45:19