Module paramset

ParamSet class

Functions

ParamSet.new (id, name) constructor.
ParamSet:add_separator () add separator.
ParamSet:add (args) add generic parameter.
ParamSet:add_number (id, name, min, max, default, formatter) add number.
ParamSet:add_option (id, name, options, default) add option.
ParamSet:add_control (id, name, controlspec, formatter) add control.
ParamSet:add_file (id, name, path) add file.
ParamSet:add_taper (id, name, min, max, default, k, units) add taper.
ParamSet:add_trigger (id, name) add trigger.
ParamSet:print () print.
ParamSet:get_name (index) name.
ParamSet:string (index) string.
ParamSet:set (index, v, silent) set.
ParamSet:set_raw (index, v, silent) set_raw (for control types only).
ParamSet:get (index) get.
ParamSet:get_raw (index) get_raw (for control types only).
ParamSet:delta (index, d) delta.
ParamSet:set_action (index, func) set action.
ParamSet:t (index) get type.
ParamSet:write (filename) write to disk.
ParamSet:read (filename) read from disk.
ParamSet:default () read default pset if present.
ParamSet:bang () bang all params.
ParamSet:clear () clear.


Functions

ParamSet.new (id, name)
constructor.

Parameters:

  • id
  • name
ParamSet:add_separator ()
add separator.
ParamSet:add (args)
add generic parameter. helper function to add param to paramset two uses: - pass "param" table with optional "action" function - pass keyed table to generate "param" table. required keys are "type" and "id"

Parameters:

  • args
ParamSet:add_number (id, name, min, max, default, formatter)
add number.

Parameters:

  • id
  • name
  • min
  • max
  • default
  • formatter
ParamSet:add_option (id, name, options, default)
add option.

Parameters:

  • id
  • name
  • options
  • default
ParamSet:add_control (id, name, controlspec, formatter)
add control.

Parameters:

  • id
  • name
  • controlspec
  • formatter
ParamSet:add_file (id, name, path)
add file.

Parameters:

  • id
  • name
  • path
ParamSet:add_taper (id, name, min, max, default, k, units)
add taper.

Parameters:

  • id
  • name
  • min
  • max
  • default
  • k
  • units
ParamSet:add_trigger (id, name)
add trigger.

Parameters:

  • id
  • name
ParamSet:print ()
print.
ParamSet:get_name (index)
name.

Parameters:

  • index
ParamSet:string (index)
string.

Parameters:

  • index
ParamSet:set (index, v, silent)
set.

Parameters:

  • index
  • v
  • silent
ParamSet:set_raw (index, v, silent)
set_raw (for control types only).

Parameters:

  • index
  • v
  • silent
ParamSet:get (index)
get.

Parameters:

  • index
ParamSet:get_raw (index)
get_raw (for control types only).

Parameters:

  • index
ParamSet:delta (index, d)
delta.

Parameters:

  • index
  • d
ParamSet:set_action (index, func)
set action.

Parameters:

  • index
  • func
ParamSet:t (index)
get type.

Parameters:

  • index
ParamSet:write (filename)
write to disk.

Parameters:

  • filename either an absolute path, a number (to write [scriptname]-[number].pset to local data folder) or nil (to write default [scriptname].pset to local data folder)
ParamSet:read (filename)
read from disk.

Parameters:

  • filename either an absolute path, number (to read [scriptname]-[number].pset from local data folder) or nil (to read default [scriptname].pset from local data folder)
ParamSet:default ()
read default pset if present.
ParamSet:bang ()
bang all params.
ParamSet:clear ()
clear.
generated by LDoc 1.4.6 Last updated 2019-11-14 23:40:48