previously, running params.add with table arguments, i.e.:
params:add{
type = 'number', id = 'octave_'..chan, name = 'octave',
min = -2, max = 2, default = 0,
action = actions.rate_start_end
}
yielded this error:
/usr/local/share/seamstress/lua/core/params.lua:79: attempt to index a nil value (local 'param')
stack traceback:
/Users/and/sc-extensions/grvl-seamstress/script.lua:18: in main chunk
[C]: in function 'require'
/usr/local/share/seamstress/lua/core/seamstress.lua:49: in function '_startup'
because the add_<type> functions in this new take of params.lua don't return a param instance, but just call back into params:add with their instances. so I just added a return & let recursion do it's thing – this was the most unobtrusive fix, but maybe the back & forth feels a bit funky.
(cc @dndrks , I gather they wrote most/all of this bit !)
previously, running
params.add
with table arguments, i.e.:yielded this error:
because the
add_<type>
functions in this new take ofparams.lua
don't return a param instance, but just call back intoparams:add
with their instances. so I just added areturn
& let recursion do it's thing – this was the most unobtrusive fix, but maybe the back & forth feels a bit funky.(cc @dndrks , I gather they wrote most/all of this bit !)