Module params.control

Parameter with granular control

See also the norns script reference which has examples for this module.

Functions

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


Functions

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

Parameters:

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

Parameters:

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

Parameters:

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

Parameters:

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

Parameters:

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

Parameters:

  • d
set_default ()
set_default.
bang ()
bang.
get_range ()
get_range.
string ()
string.

Returns:

    formatted string
generated by LDoc 1.5.0 Last updated 2024-10-13 17:45:04