Cabbage Logo
Back to Cabbage Site

Combobox unresponsive to chnset

It seems that combobox do not respond to changed within cabbage.
Maybe I am wrong, but I though that :
Having a combo box with a channel named “Combo”

chnset k(7), "Combo"

would select item n° 7 in the combobox… but it does not work.

What is the solution ?

It’s working fine for me?

<Cabbage>
form size(400, 300)
combobox bounds(44, 12, 80, 20) channel("combochan2") text("Item 1", "Item 2", "Item 3", "Item 4", "Item 5", "Item 6", "Item 7", "Item 8") 
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d
</CsOptions>
<CsInstruments>

sr = 48000
ksmps = 32
nchnls = 2
0dbfs = 1


instr 1	
event_i "i", 2, 2, 1
endin

instr 2
chnset k(7), "combochan2"
endin

</CsInstruments>
<CsScore>
i1 0 z
</CsScore>
</CsoundSynthesizer>

Oh sorry , I forgot to mention that I was talking about combobox populated with snapshots.

Ah, that’s not implemented as they are special comboboxes so to speak. I have to ask, why would you want to, it even need to, automate the selection of presets? Seems like overkill?

Ahhh… To receive program changes from daw. Like it is possible in every vst synth. There is no other way to access programmatically the presets.

Ah. Hmm. In that case I wonder should we be use program messages to change things? In fact, should we use these in general for changing presets? I’m just thinking out loud…

Yes this is what I was trying to implement with a midiin opcode. But if this was hard coded into cabbage, I think that would be better. Maybe JUCE has some way to intercept these messages.