Some of you might have caught some longterm discussions between @samo and I about how to record automation that is generated from within a plugin. This can be done by setting the CSOUND_GESTURES
reserved channel to 1. Note, this is not something that is enabled by default and needs to be handled with care so as to avoid sending the host into some kind of automation spiral.
The video below sums up reason for this reserved channel very well. At the start we can move the slider around, and its movement is picked up as automation changes in Live. But when we enable the LFO which causes the slider to be updated on each k-cycle with a cabbageSetValue
, the movement is not tracked by Live. In order to track the LFO movement as automation, we must enable CSOUND_GESTURES
via the corresponding button.
<Cabbage>
form caption("test") size(300, 400), colour(58, 110, 182), pluginId("taf5"), guiMode("queue")
rslider bounds(2, 22, 120, 120) range(0, 1, 1, 1, 0.001) channel("OscFrq") colour(0, 255, 0, 255) trackerColour(255, 0, 0, 255)
button bounds(150, 30, 100, 30) channel("enableLFO"), text("Enable LFO")
button bounds(150, 70, 100, 30) channel("enableGestures"), text("Enable gestures")
csoundoutput bounds(10, 160, 280, 240)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d
</CsOptions>
<CsInstruments>
ksmps = 32
nchnls = 2
0dbfs = 1
instr 1
kGesture, kTrig cabbageGetValue "enableGestures"
kLFO cabbageGetValue "enableLFO"
printf "Csound Gestures set to: %s\n", kTrig, kGesture == 1 ? "On" : "Off"
if kTrig == 1 then
chnset kGesture, "CSOUND_GESTURES"
endif
if kLFO ==1 then
kOscFrq oscili 1, .1
cabbageSetValue "OscFrq", abs(kOscFrq)
endif
endin
</CsInstruments>
<CsScore>
f0 z
i 1 0 -1
</CsScore>
</CsoundSynthesizer>