I did some tests and it doesn’t seem to work as I expected. Or maybe I am doing something wrong?
-
the new trigger-esque options don’t seem to have any effect at all, e.g. sliders are triggering all the time, tried with i-rate and k-rate option values (how are they supposed to be set?)
-
radioGroup
-ed buttons don’t trigger when going back and forth between any two buttons in a group
Here is my testing playground (please comment/uncomment parts of it).
<Cabbage>
form caption("Cabbage Changed") size(430, 290) pluginId("tl01") guiMode("queue")
rslider bounds(10, 10, 100, 100), channel("slider1") _isSlider(1)
rslider bounds(110, 10, 100, 100), channel("slider2") _isSlider(1)
rslider bounds(210, 10, 100, 100), channel("slider3") _isSlider(1)
rslider bounds(310, 10, 100, 100), channel("slider4") _isSlider(1)
combobox bounds(20, 118, 80, 20) channel("combo1"), channelType("string") _isCombo(1)
combobox bounds(120, 118, 80, 20) channel("combo2"), channelType("string") _isCombo(1)
combobox bounds(220, 118, 80, 20) channel("combo3"), channelType("string") _isCombo(1)
combobox bounds(320, 118, 80, 20) channel("combo4"), channelType("string") value("1") _isCombo(1)
label bounds(8, 158, 412, 21) channel("label1"), align("left"), fontColour(0, 0, 0, 255) text("Most recently changed widget:")
image bounds(6, 234, 412, 41) channel("image15")
button bounds(20, 246, 80, 20) channel("RG1") text("1", "1") radioGroup("RG") colour:1(255, 255, 0, 255) fontColour:1(160, 0, 0, 255) _isGrouped(1)
button bounds(120, 246, 80, 20) channel("RG2") text("2", "2") radioGroup("RG") colour:1(255, 255, 0, 255) fontColour:1(160, 0, 0, 255) _isGrouped(1)
button bounds(220, 246, 80, 20) channel("RG3") text("3", "3") radioGroup("RG") colour:1(255, 255, 0, 255) fontColour:1(160, 0, 0, 255) _isGrouped(1)
button bounds(320, 246, 80, 20) channel("RG4") text("4", "4") radioGroup("RG") colour:1(255, 255, 0, 255) fontColour:1(160, 0, 0, 255) _isGrouped(1)
button bounds(20, 198, 80, 20) channel("NonLatched1") text("X", "X") latched(0) colour:1(255, 255, 0, 255) fontColour:1(160, 0, 0, 255) _latched(0)
button bounds(120, 198, 80, 20) channel("NonLatched2") text("Y", "Y") latched(0) colour:1(255, 255, 0, 255) fontColour:1(160, 0, 0, 255) _latched(0)
button bounds(220, 198, 80, 20) channel("NonLatched3") text("Z", "Z") latched(0) colour:1(255, 255, 0, 255) fontColour:1(160, 0, 0, 255) _latched(0)
button bounds(320, 198, 80, 20) channel("NonLatched4") text("W", "W") latched(0) colour:1(255, 255, 0, 255) fontColour:1(160, 0, 0, 255) _latched(0)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -m0d -+rtmidi=NULL
</CsOptions>
<CsInstruments>
ksmps = 32
instr 1
;SWidgetChannels[] cabbageGetWidgetChannels "_isSlider(1)"
;SWidgetChannels[] cabbageGetWidgetChannels "_latched(0)"
SWidgetChannels[] cabbageGetWidgetChannels "_isGrouped(1)"
;prints SWidgetChannels[0]
;SUpdatedChannel, kTrig cabbageChanged SWidgetChannels
;cabbageSet kTrig, "label1", sprintfk("text(\"Last updated widget: %s\n\")", SUpdatedChannel)
;kIndex, kTrig cabbageChanged SWidgetChannels
;cabbageSet kTrig, "label1", sprintfk("text(\"Last updated widget: %s\n\")", SWidgetChannels[kIndex])
;printk2 kIndex
kIndex, kTrig cabbageChanged SWidgetChannels, k(0.5), k(0)
if kTrig == 1 then
printk 0, kIndex
endif
endin
</CsInstruments>
<CsScore>
i1 0 z
</CsScore>
</CsoundSynthesizer>