You can use an always on instrument, and then
midiin to read the incoming MIDI messages. Don’t use the
--midi-key-cps=4 --midi-velocity-amp=5 command line flags as they operate differently. Although
Maybe there is an easier way to do this. If
instr 1 is triggered with each note then you can simple output each successive note to a new channel? Use a global variable to keep count of the channel, and when it gets to 16, simply start again at 1? you know what I mean? Something like this:
form caption("Untitled") size(400, 110), guiMode("queue") pluginId("def1")
keyboard bounds(0, 2, 400, 100) channel("keyboard10000")
-n -d -+rtmidi=NULL -M0 -m0d --midi-key-cps=4 --midi-velocity-amp=5
; Initialize the global variables.
ksmps = 32
nchnls = 2
0dbfs = 1
giMidiChannel init 1
prints "This note goes to channel %d\n", giMidiChannel
giMidiChannel = (giMidiChannel < 15 ? giMidiChannel+1 : 1)
;causes Csound to run for about 7000 years...