Cabbage Logo
Back to Cabbage Site

Trouble updating widgets (resolved)

I am trying to update multiple properties of a slider widget via OSC. I have a function like :
send(’/status/pot10’, ‘text(“bla”), channel(“test”), range(8.0, 30.0, 20.0)’)

The text gets updated allright, but the channel or range do not.
Richard

That should work. Can you try placing a \ before each ". When I send strings to Cabbage using chnset I usually do something like this:

chnset "text(\"Hello\"), colour(\"red\")", "identChannel"

I do that but it does not help. In the following code:

kbut0 chnget “but0” ; load all template names
if kbut0 == 1 then
OSCsend kbut0, $IPADDRESS,7710,"/command/get",“s”,“templates”
chnset “text(“bla”), channel(“test”), range(8.0, 30.0, 20.0)”, “pot12id”
endif

the text changes to “bla”, but the channel or range are not set

Thanks, you’re right. I’ll look into it.

But it works fine with Cabbage v2…so…I’m not so inclined to go back and fix problems present in Cabbage v1 that are not present in v2. Hope this is Ok.

I understand that. But with V2, my csd does not work anymore…weird. This one uses OSC to communicate with a OSCsound server as in my previous design drawing.
Besides that, the third pot “pot12id” still only changes the text, not the channel or the range…

Here is the csd so far. You don’t need the OSCsound server to run. If you press on the ‘Get templ’ button the third pot in track 1 changes name, but nothing else…

Tracks.csd (6.3 KB)

Ah. Ok. channe() and range() can’t be set dynamically. Those identifiers are intrinsic to how the parameters work, and VST hosts need to know what they are when the instrument is first loaded. This is actually somewhat related to a recent post by Oeyvind about dynamically creating widgets.

Changing these dynamically will cause unwanted and unexpected behaviour in a host. I know in this case you are not using a host, but I really think it’s important that instruments behave the same in standalone Cabbage as they do in a VST host. Do you know what I mean? It’s unfortunate, but I think it will only lead to confusion among users if things are different in one interface than another. Cabbage is a toolkit for generating plugins after all. Even the instruments loaded by Cabbage itself are treated as plugins.

I see. Understandable but a pity. Maybe I can start a whole Cabbage csd (a template for several instruments and effects in my case) when it is loaded from the database. Is there some command line option like : ‘cabbage template1.csd’ ?

The old version of Cabbage would open csds from the command line. I can look into doing the same with Cabbage2 if that’s what you mean?

That would be really helpful indeed!

I’ll add it to the list :wink:

Doumo arigatou gozaimasu!

I had to google that!

It comes in handy when you’re in Japan…

I’ve no doubt!