Hi, I’d like to invert vslider so 0 is at the top, and the value moves up as you move the slider down. Is this possible in 2.9.0?
Invert vslider
1 Like
Hi @jeffc111, no this is not possible, although you can create a workaround:
<Cabbage>
form size(500, 300), caption("Untitled"), guiMode("queue")
vslider bounds(57, 42, 50, 150) channel("vslider10000") range(0, 1, 1, 1, 0.001)
label bounds(48, 198, 70, 18) channel("label10001"), text("0")
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-odac
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 128
nchnls = 2
0dbfs = 1
instr 2
kValue, kTrig cabbageGetValue "vslider10000"
cabbageSet kTrig, "label10001", sprintfk("text(\"%.2f\")", 1-cabbageGetValue:k("vslider10000"))
endin
</CsInstruments>
<CsScore>
i2 0 z
</CsScore>
</CsoundSynthesizer>