Hello. I have a small issue with a custom scrubber I’m making. If you hold several keys simultaneously, the scrubbers will start blinking.
Wondering if anyone has any tips on how to solve this.
<Cabbage>
form caption("Untitled") size(400, 300), guiMode("queue"), pluginId("def1")
keyboard bounds(8, 158, 381, 95)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 --midi-key-cps=4 --midi-velocity-amp=5
</CsOptions>
<CsInstruments>
; Initialize the global variables.
ksmps = 32
nchnls = 2
0dbfs = 1
instr 2
iWidget = 0
giCount = 0
// Create scrubbers
while iWidget < 20 do
SScrubber sprintf "bounds(-10, 0, 2, 100), channel(\"Scrubber%d\"), colour(255, 255, 255, 255)", iWidget+1
cabbageCreate "image", SScrubber
iWidget += 1
od
endin
instr 1
SCurrentScrubber sprintfk "Scrubber%d", giCount
giCount += 1
if (giCount == 20) then
giCount = 0
endif
kEnv madsr .5, .2, 1, .4
kPositionX = kEnv*200
kSizeY = 100
kMetro = metro(60)
cabbageSet kMetro, SCurrentScrubber, "bounds", kPositionX, 10, 1, kSizeY
endin
</CsInstruments>
<CsScore>
;causes Csound to run for about 7000 years...
f0 z
i2 0 z
</CsScore>
</CsoundSynthesizer>