I’m tinkering with mixing the score and live midi (using the cabbage on screen keyboard), but I’m having trouble getting both to play nicely with each other.
<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>
ksmps = 32
nchnls = 2
0dbfs = 1
massign 0, 2
instr 1
kEnv madsr .1, .2, .6, .4
aOut vco2 p5, p4
outs aOut*kEnv, aOut*kEnv
endin
instr 2
kEnv madsr .1, .2, .6, .4
aOut vco2 p5, p4
outs aOut*kEnv, aOut*kEnv
endin
</CsInstruments>
<CsScore>
r 10
i 1 0 0.25 440 0.5
i 1 1 0.25 440 0.5
s
e
</CsScore>
</CsoundSynthesizer>
Any midi key held “over the loop” plays forever. If I replace the entire score with f0 z
it works as expected. Where am I going wrong?
Thanks in advance!