Here is a continuation of this “abandoned” thread Non-latched buttons & automation
The automation nightmare continues…
This simple example changes colour of images depending on slider position. It works fine manually but not with automation (in ver. 2.8.128). Maybe this can enlighten some of the previously reported issues?
<Cabbage> bounds(0, 0, 0, 0)
form caption("test cabbageSet automation") size(300, 200), guiMode("queue"), colour(0,0,0) pluginId("tcs1")
image bounds(18, 92, 60, 15) channel("image1") _sliderImage(1)
image bounds(108, 92, 60, 15) channel("image2") _sliderImage(1)
image bounds(194, 92, 60, 15) channel("image3") _sliderImage(1)
hslider bounds(44, 62, 191, 23) range(0, 2, 1, 1, 1) channel("ImageSlider") popupText("0")
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d
</CsOptions>
<CsInstruments>
instr 1
SImages[] cabbageGetWidgetChannels "_sliderImage(1)"
kImageSlider, kImageSliderChanged cabbageGetValue "ImageSlider"
if kImageSliderChanged == 1 then
kind = 0
while kind < lenarray(SImages) do
if kind == kImageSlider then
cabbageSet 1, SImages[kind], "colour", 255, 0, 0, 255
else
cabbageSet 1, SImages[kind], "colour", 255, 255, 255, 255
endif
kind += 1
od
endif
endin
</CsInstruments>
<CsScore>
;causes Csound to run for about 7000 years...
f0 z
i 1 0 -1
</CsScore>
</CsoundSynthesizer>