It was a mistake of my own doing This instrument works fine, and I can output to different channel.
<Cabbage>
form caption("MIDI Arp Out"), size(400,220), pluginId("Mout"), guiMode("queue")
keyboard bounds(0,0,400,80)
hslider bounds(14, 80, 381, 40) range(0, 10, 5, 1, 0.001), channel("tempo"), text("Tempo")
rslider bounds(14, 130, 60, 60) channel("midiChan") range(1, 16, 1, 1, 1)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-dm0 -n -Q0 -M0 --midi-velocity-amp=4 --midi-key-cps=5
</CsOptions>
<CsInstruments>
;sr is set by the host
ksmps = 16
nchnls = 2
0dbfs = 1
instr 1
prints "\n"
kNoteIndex init 0
kTempo chnget "tempo"
kNoteArray[] fillarray 0, 5, 7, 12
kMetro metro kTempo
kChannel init 0
kChan cabbageGetValue "midiChan"
if kMetro == 1 then
midion2 kChan, p4+kNoteArray[kNoteIndex], p5, 1
endif
endin
</CsInstruments>
<CsScore>
f0 z
</CsScore>
</CsoundSynthesizer>
For what itâs worth this is the simple MIDI monitor Iâm testing it with.
<Cabbage>
form size(500, 300), caption("MIDI Monitor")
csoundoutput bounds(10, 10, 480, 280)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-odac -M0
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 64
nchnls = 2
instr 1
kstatus, kchan, kdata1, kdata2 midiin
kChanged changed kstatus, kchan, kdata1, kdata2
if(kChanged == 1) then
printks "Status:%d Value:%d ChanNo:%d CtrlNo:%d\n", 0, kstatus, kdata2, kchan, kdata1
endif
endin
</CsInstruments>
<CsScore>
i1 0 z
</CsScore>
</CsoundSynthesizer>