Module lib.lfo

construct an LFO

Functions

LFO:add (shape, min, max, depth, mode, period, action, number, string) construct an LFO via table arguments eg.
LFO:start (from_parameter) start LFO
LFO:stop () stop LFO
LFO:set (var, arg) set LFO variable state
LFO:get (var) get LFO variable state
LFO:reset_phase () reset the LFO's phase
LFO:add_params (id[, separator[, group]]) Build parameter menu UI for an already-constructed LFO.


Functions

LFO:add (shape, min, max, depth, mode, period, action, number, string)
construct an LFO via table arguments eg. my_lfo:add{shape = 'sine', min = 200, max = 12000}

Parameters:

  • shape string The shape for this LFO (options: 'sine', 'tri', 'up', 'down', 'square', 'random'; default: 'sine')
  • min number The minimum bound for this LFO (default: 0)
  • max number The maximum bound for this LFO (default: 1)
  • depth number The depth of modulation between min/max (range: 0.0 to 1.0; default: 0.0)
  • mode string How to advance the LFO (options: 'clocked', 'free'; default: 'clocked')
  • period number The timing of this LFO's advancement. If mode is 'clocked', argument is in beats. If mode is 'free', argument is in seconds.
  • action function A callback function to perform as the LFO advances. This library passes both the scaled and the raw value to the callback function.
  • number phase The phase shift amount for this LFO (range: 0.0 to 1.0,; default: 0)
  • string baseline From where the LFO should start (options: 'min', 'center', 'max'; default: 'min')
LFO:start (from_parameter)
start LFO

Parameters:

  • from_parameter
LFO:stop ()
stop LFO
LFO:set (var, arg)
set LFO variable state

Parameters:

  • var string The variable to target (options: 'shape', 'min', 'max', 'depth', 'offset', 'phase', 'mode', 'period', 'reset_target', 'baseline', 'action', 'ppqn')
  • arg various The argument to pass to the target (often numbers + strings, but 'action' expects a function)
LFO:get (var)
get LFO variable state

Parameters:

  • var string The variable to query (options: 'shape', 'min', 'max', 'depth', 'offset', 'phase', 'mode', 'period', 'reset_target', 'baseline', 'action', 'enabled', 'controlspec')
LFO:reset_phase ()
reset the LFO's phase
LFO:add_params (id[, separator[, group]])
Build parameter menu UI for an already-constructed LFO.

Parameters:

  • id string The parameter ID to use for this LFO.
  • separator string A separator name for the LFO parameters. (optional)
  • group string A group name for the LFO parameters. (optional)
generated by LDoc 1.5.0 Last updated 2024-01-13 13:12:10