I decided to go to latest version of cabbage to test my latest work.
My program looks like a mess in 2.9.
One of the issues is comboboxes not set on an option.
I looked to isolate this specific issue and it seems to persist in the attachment.
a.csd (756 Bytes)
Cabbage 2.9 vs 2.8 initializing software
Iām also transitioning and this might be related to my recent posts:
and
Hi @Man_in_the_gutter, apologies for the delay in replying to this. If you want the combobox to show an initial value, use the value()
identifier:
combobox bounds(5,5,80,20) channel("pickup-selector"), items("Neck", "Bridge", "Both", "None"), value(1)
If you want the combobox to send string data to Csound rather than a number, you would need to set it up toe use a string channel type. And you would then pass the string to value instead of a numerical index:
combobox bounds(5,5,80,20) channel(āpickup-selectorā), channelType(āstringā) items(āNeckā, āBridgeā, āBothā, āNoneā), value(āNeckā)
Iām sure there will be a few more bumps along the road as you move from version 2.8 to 2.9, donāt be afraid to ask
Ok, thanks.
Channeltype as a number is not a problem.
Still looking to solve the loops.
The loop iteration works fine, but it doesnāt execute the ācabbageSetā inside the loop.
Like the same I said before, almost as if the loop is not long enough.
Although it should only iterate after executing the ācabbageSetā.
Can you share a simple example so I can take a look?
There are two issues here. One in your code, and one in Cabbage. The first issue is youāre using an i-rate version of cabbageSet
in a k-rate loop. That will never work. The next issue is that I recently added some optimisations to the string variants of the cabbage opcodes. This has caused code like this to stop working, which was not my intention. So I will roll back
I just pushed through this fix now. If you grab the latest build when it is done you should be good to go. FWIW, this code now works fine (note the k-rate version of cabbgeSet
):
kr99 init 1
Sr = "R"
Sc = "C"
Sformat = "%d"
kc99 init 1
while kc99 < 24 do
ScurrentButtonFB strcatk Sr, Sformat
ScurrentButtonFB2 sprintfk ScurrentButtonFB, kr99
ScurrentButtonFB2 strcatk ScurrentButtonFB2, Sc
ScurrentButtonFB2 strcatk ScurrentButtonFB2, Sformat
ScurrentButtonFB sprintfk ScurrentButtonFB2, kc99
cabbageSet changed:k(kc99), ScurrentButtonFB, "bounds",(kc99-1)*15, (kc99-1)*10, 15, 10
kc99 += 1
od
I see, there was a general trigger originally in the cabbageSet, that I changed to 1 and then removed in the process.
Yeah, Iāve one the same myself on plenty of occasions
Yes,
It works on the latest release!