The “AUTOMATION switch” seems to work as expected when I load/reload the plugin, but if I add automation and let it loop over it, the switch stops working after a while. I tried this many times and I see that sooner or later the switch stops working. At first I thought that if I push the plugin buttons (more or less frenetically) breaks the switch functionality, but then I realized that I just need to let it run with automation for a while to break the switch. The automation slew doesn’t seem to matter.
Do you get the same behaviour? Any ideas?
My test code:
<Cabbage>
form caption("test automation fx 200707") size(300, 200), colour(58, 110, 182), pluginid("taf3")
rslider bounds(2, 22, 120, 120) range(0.5, 10000, 220, 0.25, 0.001) channel("OscFrq") identchannel("OscFrqID") popuptext("0") colour(0, 255, 0, 255) trackercolour(255, 0, 0, 255)
button bounds(126, 20, 65, 65) latched(0) channel("OscFrqMultiplier2") text("x2","x2") value(0) corners(3) colour:0(255, 0, 0, 255) colour:1(255, 255, 0, 255) fontcolour:0(0, 0, 0, 255) fontcolour:1(160, 0, 0, 255)
button bounds(126, 88, 65, 65) latched(0) channel("OscFrqMultiplier05") text("/2","/2") value(0) corners(3) colour:0(0, 255, 0, 255) colour:1(255, 255, 0, 255) fontcolour:0(0, 0, 0, 255) fontcolour:1(160, 0, 0, 255)
button bounds(196, 20, 92, 134) channel("automationON") text("AUTOMATION switch", "AUTOMATION switch") colour:1(255, 255, 0, 255) fontcolour:1(0, 0, 0, 255)
label bounds(2, 164, 286, 22), identchannel("textID")
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d
</CsOptions>
<CsInstruments>
ksmps = 32
nchnls = 2
0dbfs = 1
instr 1
;chnset chnget:k("automationON"), "AUTOMATION" ; test 1 (a shorter version of the block below)
kAutomationON chnget "automationON"; test 2
if kAutomationON == 1 then
chnset k(1), "AUTOMATION"
elseif kAutomationON == 0 then
chnset k(0), "AUTOMATION"
endif
ka chnget "AUTOMATION"
Stext = sprintfk("text(AUTOMATION = %d)", ka)
chnset Stext, "textID"
kOscFrq chnget "OscFrq"
; -------- internal parameter change -------
if (trigger(chnget:k("OscFrqMultiplier2"), .5, 0) == 1) then; 0->1
kOscFrq *= 2
chnset kOscFrq, "OscFrq"
endif
if (trigger(chnget:k("OscFrqMultiplier05"), .5, 0) == 1) then; 0->1
kOscFrq *= 0.5
chnset kOscFrq, "OscFrq"
endif
endin
</CsInstruments>
<CsScore>
;causes Csound to run for about 7000 years...
f0 z
;starts instrument 1 and runs it for a week
i1 0 [60*60*24*7]
</CsScore>
</CsoundSynthesizer>