Setting this requires a little extra work. I don’t think we can directly manipulate the channel just yet, so in the mean time you need to do something like this (see below). So you need to set minValue/maxValue
, with the first channel passed to the slider. I know it’s ugly. I really need to revisit that code!
<Cabbage>
form caption("Untitled") size(400, 300), guiMode("queue") pluginId("def1")
rslider bounds(296, 162, 100, 100), channel("gain"), range(0, 1, 0, 1, .01), text("Gain"), trackerColour("lime"), outlineColour(0, 0, 0, 50), textColour("black")
hrange bounds(106, 64, 250, 40) channel("rangesliderMin", "rangesliderMax") max(1) min(0) range(0, 1, 0:1, 1, 0.001)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d
</CsOptions>
<CsInstruments>
; Initialize the global variables.
ksmps = 32
nchnls = 2
0dbfs = 1
instr 1
kGain, kTrig cabbageGetValue "gain"
cabbageSet kTrig, "rangesliderMin", "minValue", kGain
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>