Cabbage Logo
Back to Cabbage Site

Update slider positions from body

Hi all!
I’m looking to update my slider positions at k rate I was reading over this post, and tried implementing the “table3.csd” way of doing things, but it’s still not visually updating the sliders. I’m not sure if this is a stupid mistake on my part, my head is about to explode hahahhaa
I should also mention the purpose of the plugin is to automatically eq the frequencies of a selected signal out of a main signal, I’ll attach the test wavs as well as the CSD.
Sorry if this is super basic, it has me pulling my hair out!
Thanks in advance xxx

Something like this should work:

instr 1
    if changed:k(chnget:k("slider1")) == 1 then
        chnset chnget:k("slider1"), "slider2"
        chnset chnget:k("slider1"), "slider3"
    elseif changed:k(chnget:k("slider2")) == 1 then
        chnset chnget:k("slider2"), "slider1"
        chnset chnget:k("slider2"), "slider3"
    else
        chnset chnget:k("slider3"), "slider1"
        chnset chnget:k("slider3"), "slider2"
    endif
endin

Btw, I removed the dead links in your last post, and accidentally remove the beers cans. But not before I got myself one from the fridge :beers: :wink:

1 Like

I completely forgot changed:k existed omg thank you so much!
Will try this out, also debated not having the cans on the version I sent to my lecturer but am just going to call it a unique art style for my major project
Thank you so much again!!
(Edit:: This updates the values for the sliders, but not the actual visual tracker position unfortunately! The other way of doing it I was considering was something along the lines of

if chnget:k("button") == 1 then
chnset "visible(0)", "slider2"
chnset "visible(0)", "slider3"
chnset ""text("Depth")"", "slider1"
endif

to hide the mid and high sliders and give the illusion that youre controlling all three with one.
When I do this tho, I’m getting this init error:
INIT ERROR in instr 1: channel already exists with incompatible type chnset.S S_vis "MidDepth"
)

If you want to change any attributes of a slider, apart from its value, you need to use an identchannel(). I can send an example a little later if you can figure it out.

Hi again, sorry for the delay been mad mad busy!!! With the chnget and set method you posted implemented with me fairly confident in it, I’m still not getting an actual UI update, wherein my slider values do link, but don’t update visually, essentially when I have link pressed I’d like moving one slider to have the same visual effect as moving three sliders! I’m not sure if I’m doing something v wrong, or if it’s an understandable error, with the chnget and chnset method you posted, should that be moving the sliders as well as the value?
Sorry, I feel like I’m missing something super basic!

Looks like something is broken in this build. I’m not seeing any changes either. I need to look into that. The example code I posted before was working in an older version of Cabbage.

That’s a relief on my end, thought I was losing my mind! I can send you my code as it is at the moment if you want to make sure it isn’t just something dumb I’ve done if you like!

It’s not working here in my simple tests, so I suspect we have the same problem. I’ll try to fix it on my end and get back to you.

Thank you so much!!!

Are you on Windows or OSX? If Windows, I have a new version that should work better. If OSX, you’ll need to wait until I can get around to building a new version…

1 Like

Windows, will get this going in a sec, thanks so much
(edit: scaled it back, still can’t get it to update, thinking I’m just being dumb now)
instr 1 k_gain_1 chnget "gain" if changed:k(chnget:k("gain")) == 1 then chnset chnget:k("gain"), "gain2" endif k_gain_2 chnget "gain2" printk 0.5, k_gain_2 endin
tested with identchannels and regular channels, and reinstalled twice, sorry for taking up so much time!

You’re not taking up any of my time. Can you try this one?

chnsetTest.csd (839 Bytes)

Yeah tested, not working for me :frowning:

That’s really odd. When i run it here I get the following when I move the bottom slider:

There’s no way you started an older version? The best way to kow if this is the latest version is to rename your Cabbage2.settings file in App/Roaming/Cabbage2 and start Cabbage again. It should have new default colour scheme. If it does you’re using the same one I am. In which case there is something odd going on. I’m using --Csound version 6.12 beta (double samples) Oct 24 2018 ? Are you using the same version?

Hm for some reason I’m getting the old colour scheme (despite reinstalling from your download link), Cabbage version 2.0.03
Csound version is 6.11.0 (beta)
Could it be a csound update issue?

Try uninstalling Csound and Cabbage first. Then remove the Cabbage2.settings file. Then reinstall. If you don’t need the new default colour scheme something is not right…

Hm did all of the above, and let Cabbage installer install Csound for me, still nothing. Is it possible the installer you linked wasn’t the right build? (I’m probably wrong just spitballin)

Try this one. It’s the actual one I’m using here. Just dump that contents into the main Cabbage folder. The icons folder in that zip file should be right beside the main Cabbage.exe file.

So the UI Updated when I did that and deleted the settings file, but :(((
(edit: I love the new UI tho <3)

The new UI is the work of @mauro I like it too. You have a sneak private preview there :wink: Can you double check that your sounds settings are ok?

1 Like