Class paramset

ParamSet class

Functions

ParamSet.new (id, name) constructor.
ParamSet:add_separator (name) add separator.
ParamSet:add_group (name, n) add parameter group.
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_text (id, name, txt) add text.
ParamSet:add_taper (id, name, min, max, default, k, units) add taper.
ParamSet:add_trigger (id, name) add trigger.
ParamSet:print () print.
ParamSet:get_id (index) id.
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:set_save (index, state) set save state.
ParamSet:t (index) get type.
ParamSet:get_range (index) get range
ParamSet:hide (index) set visibility to hidden.
ParamSet:show (index) set visiblility to show.
ParamSet:visible (index) get visibility.
ParamSet:write (filename, name) 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:

ParamSet:add_separator (name)
add separator. name is optional. separators have their own parameter index and can be hidden or added to a paremeter group.

Parameters:

ParamSet:add_group (name, n)
add parameter group. groups cannot be nested, i.e. a group cannot be made within a group.

Parameters:

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 string
  • name string
  • min number
  • max number
  • default
  • formatter
ParamSet:add_option (id, name, options, default)
add option.

Parameters:

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

Parameters:

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

Parameters:

ParamSet:add_text (id, name, txt)
add text.

Parameters:

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

Parameters:

ParamSet:add_trigger (id, name)
add trigger.

Parameters:

ParamSet:print ()
print.
ParamSet:get_id (index)
id.

Parameters:

  • index number
ParamSet:string (index)
string.

Parameters:

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

Parameters:

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

Parameters:

  • index
  • v value
  • silent boolean
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 number delta
ParamSet:set_action (index, func)
set action.

Parameters:

  • index
  • func function set the action for this index
ParamSet:set_save (index, state)
set save state.

Parameters:

  • index
  • state set the save state for this index
ParamSet:t (index)
get type.

Parameters:

  • index
ParamSet:get_range (index)
get range

Parameters:

  • index
ParamSet:hide (index)
set visibility to hidden.

Parameters:

  • index
ParamSet:show (index)
set visiblility to show.

Parameters:

  • index
ParamSet:visible (index)
get visibility. parameters are visible by default.

Parameters:

  • index
ParamSet:write (filename, name)
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)
  • name string
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 2020-03-28 23:45:19