Cabbage Logo
Back to Cabbage Site

Chnset issue

I’m having an issue with chnset (or rather i’m most likely using it wrong)

I want to set a slider to a certain value on a button press. When I use a conditional statement to check if the button is pressed the slider immediately updates to the new value even when it hasn’t been pressed.

Even if I do something simple like this:

ktest init 999

if ktest == 1 then
chnset 0.75, “SLIDER”

The slider will update to 0.75 even though ktest does not equal 1

I’m most likely using it wrong

any help would be great thanks!

version 2.1.04

chnset works as i-time in this case because it is being passed an i-time value of 0.75. Either cast the value as k(), or just use a k-rate variable.

Btw, you’re using a pretty old version of Cabbage :thinking:

Excellent it now works!
So chnset thinks its input is i-rate unless you tell it otherwise?

Updating cabbage now! Thanks a mill!