midion — Plays MIDI notes.
kchn -- MIDI channel number (1-16)
knum -- note number (0-127)
kvel -- velocity (0-127)
midion (k-rate note on) plays MIDI notes with current kchn, knum and kvel. These arguments can be varied at k-rate. Each time the MIDI converted value of any of these arguments changes, last MIDI note played by current instance of midion is immediately turned off and a new note with the new argument values is activated. This opcode, as well as moscil, can generate very complex melodic textures if controlled by complex k-rate signals.
Any number of midion opcodes can appear in the same Csound instrument, allowing a counterpoint-style polyphony within a single instrument.