Me again
I’m exploring adding a param to my softcut script for manipulating rate, and despite everything working just fine (to my ears, anyways), I’m getting the following error when I call a function specific to my script intended to change the rate:
/home/we/norns/lua/core/softcut.lua:49: bad argument #3 to 'cut_param' (number expected, got nil)
stack traceback:
[C]: in field 'cut_param'
/home/we/norns/lua/core/softcut.lua:49: in function 'core/softcut.rate'
/home/we/dust/code/dunes/dunes-cut-2.lua:54: in field '?'
/home/we/dust/code/dunes/dunes-cut-2.lua:145: in field 'event'
/home/we/norns/lua/core/metro.lua:165: in function </home/we/norns/lua/core/metro.lua:162>
I followed that path to lua/core/softcut, line 49:
SC.rate = function(voice,value) _norns.cut_param("rate",voice,value) end
And for context, the error is triggered when I call this specific function in my script:
function rateN() for i=1,2 do softcut.rate(i,params:set("RATE",math.random(1,4)))
Is there something specific I need to do when creating my param in order to assign something to the value variable in cut_param?