form caption("test") size(370, 280) guiMode("queue"), pluginId("hsd1")
rslider bounds(132, 14, 160, 152) channel("master") range(0, 1, 0, 1, 0.001), visible(0)
rslider bounds(132, 14, 160, 152) channel("rslider1") range(0, 1, 0, 1, 0.01), visible(1), automatable(0)
rslider bounds(132, 14, 160, 152) channel("rslider2") range(0, 1, 0, 1, 0.5), visible(0), automatable(0)
rslider bounds(132, 14, 160, 152) channel("rslider3") range(0, 1, 0, 1, 1), visible(0), automatable(0)
combobox bounds(18, 20, 80, 20) channel("stepSize"), items("0.01", "0.5", "1"), value(1)
button bounds(18, 44, 80, 40) channel("masterValue"), text("Print master value")
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 --midi-key-cps=4 --midi-velocity-amp=5
</CsOptions>
<CsInstruments>
ksmps = 32
nchnls = 2
0dbfs = 1
instr 1
SSliders[] init 3
SSliders[0] = "rslider1"
SSliders[1] = "rslider2"
SSliders[2] = "rslider3"
kCnt = 0
kStepIndex, kTrig cabbageGetValue "stepSize"
;update visibility of selected slider
if kTrig == 1 then
while kCnt < lenarray(SSliders) do
if kCnt == kStepIndex-1 then
cabbageSetValue SSliders[kCnt], cabbageGetValue:k("master"), kTrig
cabbageSet kTrig, SSliders[kCnt], "visible", 1
else
cabbageSet kTrig, SSliders[kCnt], "visible", 0
endif
kCnt += 1
od
endif
;update master slider with value of most recently changed slider
SChannel, kSliderTrig cabbageChanged SSliders
cabbageSetValue "master", cabbageGetValue:k(SChannel), kSliderTrig
;button to print current master value, which is read by the host..
kBut, kMasterPrintTrig cabbageGetValue "masterValue"
printf "Master Value: %f\n", kMasterPrintTrig , cabbageGetValue:k("master")
endin
</CsInstruments>
<CsScore>
i1 0 z
</CsScore>
</CsoundSynthesizer>```
Would this work?