Module paramset
ParamSet class
Functions
Functions
- ParamSet.new (id, name)
-
constructor.
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, units, formatter, wrap, allow_pmap)
-
add number.
Parameters:
- ParamSet:add_option (id, name, options, default, allow_pmap)
-
add option.
Parameters:
- ParamSet:add_binary (id, name, behavior, default, allow_pmap)
-
add binary.
Parameters:
- ParamSet:add_trigger (id, name, allow_pmap)
-
add trigger.
Parameters:
- ParamSet:add_control (id, name, controlspec, formatter, allow_pmap)
-
add control.
Parameters:
- ParamSet:add_text (id, name, txt, locked, check)
-
add text.
Parameters:
- ParamSet:add_separator (id, name)
-
add separator.
id and name are optional.
if neither id or name are provided,
separator will be named 'separator'
and will not have a unique parameter index.
separators which have their own parameter index
can be hidden / shown.
Parameters:
- ParamSet:add_group (id, name, n)
-
add parameter group.
groups cannot be nested,
i.e. a group cannot be made within a group.
id and name are optional.
if neither id or name are provided,
group will be named 'group'
and will not have a unique parameter index.
groups which have their own parameter index
can be hidden / shown.
Parameters:
- ParamSet:print ()
- print.
- ParamSet:list ()
- list. lists param id's
- ParamSet:get_name (index)
-
name.
Parameters:
- index string
- ParamSet:is_number (index)
-
query whether param used the number template.
Parameters:
- index string
- ParamSet:get_id (index)
-
id.
Parameters:
- index number
- ParamSet:string (index[, quant])
-
string.
Parameters:
- index
- quant rounding qunatification (optional)
- 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:get_wrap (index)
-
get wrap
Parameters:
- index
- ParamSet:get_allow_pmap (index)
-
get whether or not parameter should be pmap'able
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:bang ()
- bang all params.
- ParamSet:clear ()
- clear.
- ParamSet:write (PSET, UI)
-
write to disk.
Parameters:
- PSET number number
- UI string name
- ParamSet:read (filename, silent)
-
read from disk.
Parameters:
- filename string either an absolute path, number (to read [scriptname]-[number].pset from local data folder) or nil (to read pset number specified by pset-last.txt in the data folder)
- silent boolean if true, do not trigger parameter actions
- ParamSet:delete (filename, name)
-
delete from disk.
Parameters:
- filename either an absolute path, a number (for [scriptname]-[number].pset in local data folder) or nil (for default [scriptname].pset in local data folder)
- name string