Thanks for posting, I’m new to Lua so I’m still absorbing and learning disciplines for nice syntax and readable code, and this example shows me I can refactor to make better use of table.key notation

Because everything norns is basically new, I’ve drifted away from the instruction to stay totally focused on the scope of this exercise re: parameterization and general amount of engine setup… problem is as I extended my code in a more immediate and naive manner I was running into confusion because I either didn’t understand the whole system, and/or was trying to re-invent a wheel somewhere… but one thing I can’t find right now is how to create good controlspecs for something like loop enable in softcut. This works, but I have to spin an encoder a fair amount in the params edit menu, and a stream of values will get printed from my param action: ie:
Setting perc_voice_loop to: 1
Setting perc_voice_loop to: 1
Setting perc_voice_loop to: 1
Setting perc_voice_loop to: 1
Setting perc_voice_loop to: 1
Setting perc_voice_loop to: 1
Setting perc_voice_loop to: 1
Setting perc_voice_loop to: 1
Setting perc_voice_loop to: 1
Setting perc_voice_loop to: 1
Setting perc_voice_loop to: 1
Setting perc_voice_loop to: 1
Setting perc_voice_loop to: 1
Setting perc_voice_loop to: 1
Setting perc_voice_loop to: 0
Setting perc_voice_loop to: 0
Setting perc_voice_loop to: 0
Setting perc_voice_loop to: 0
I would have expected the step value for this control spec to force each adjustment to have an increment of 1… but it does feel like some accumulation-to-threshold situation is happening here.
Also, the params menu displays the value as 1.0, can I fix that to be just 1 for on/off parameters?
This may be better suited to the general development thread since, at this moment, I have no specific need to have loop enable controlled by a param… it’s just an example of something I feel fairly sure I’ll want at some point soon for some project or another.