Module params.control

Control class

Functions

Control.new (id, name, controlspec, formatter, allow_pmap) constructor.
Control:map_value (value) map_value.
Control:get () get.
Control:get_raw () get_raw.
Control:unmap_value (value) unmap_value.
Control:set (value, silent) set.
Control:set_raw (value, silent) set_raw.
Control:get_delta () get_delta.
Control:delta (d) delta.
Control:set_default () set_default.
Control:bang () bang.
Control:get_range () get_range.
Control:get_wrap () get_wrap.
Control:string (quant) string.


Functions

Control.new (id, name, controlspec, formatter, allow_pmap)
constructor.

Parameters:

  • id string
  • name string
  • controlspec ControlSpec
  • formatter function
  • allow_pmap boolean
Control:map_value (value)
map_value. takes 0-1 and returns value scaled by controlspec.

Parameters:

  • value
Control:get ()
get. returns mapped value.
Control:get_raw ()
get_raw. get 0-1.
Control:unmap_value (value)
unmap_value. takes a scaled value and returns 0-1, quantized to step.

Parameters:

  • value
Control:set (value, silent)
set. accepts a mapped value

Parameters:

  • value
  • silent
Control:set_raw (value, silent)
set_raw. set 0-1.

Parameters:

  • value
  • silent
Control:get_delta ()
get_delta. get increment used for delta()
Control:delta (d)
delta. add delta to current value. checks controlspec for mapped vs not. default division of delta for 100 steps range.

Parameters:

  • d
Control:set_default ()
set_default.
Control:bang ()
bang.
Control:get_range ()
get_range.

Returns:

    range as table {minval, maxval}
Control:get_wrap ()
get_wrap.

Returns:

    wrap boolean
Control:string (quant)
string.

Parameters:

  • quant

Returns:

    formatted string
generated by LDoc 1.5.0 Last updated 2024-01-13 13:12:10