Is it possible to change the range of a slider with cabbageSet? I tried the following:
...
rslider bounds(20, 20, 70, 70), channel("beats"), range(1, 64, 16, 1, 1), text("Beats")
rslider bounds(90, 20, 70, 70), channel("notes"), range(1, 64, 1, 1, 1), text("Notes")
rslider bounds(160, 20, 70, 70), channel("shift"), range(0, 63, 0, 1, 1), text("Shift")
...
kOne init 1
kBeats chnget "beats"
if changed:k(kBeats)==1 then
cabbageSet kOne, "notes", "range", 1, kBeats, 1, 1, 1
cabbageSet kOne, "shift", "range", 0, kBeats-1, 1, 1, 1
endif
The purpose is that the slider “notes” should be restricted to 1…kBeats and “shift” to 0…kBeats-1 so that the user cannot choose values out of range. (and still use the full angular range of the slider)
Is there anything wrong in my code or is it simply not possible because the range of a slider is immutable? Thanks in advance for the answer.