Real-time MIDI Support

Csound supports realtime MIDI input and output, as well as input from MIDI files. For realtime input (and output) the correct Command line flags and devices must be chosen. MIDI input is activated with the flag -M (or --midi-device=DEVICE) followed by the device number. On some systems, using an out of range number like 999 will print available devices. MIDI output is activated using the -Q flag. You can load a MIDI file from the command line using the flag -F or --midifile=FILE

When MIDI input is enabled (with -M or -F), each incoming noteon message will generate a note for an instrument which has by default the same number as the channel of the event (see massign and pgmassign). This means that MIDI controlled instruments are polyphonic by default.

See the MIDI/Score Interoperability opcodes for information on designing instruments which can be used from the score or driven by MIDI.

MIDI input

The following opcodes can recieve MIDI information:

massign can be used to specify the csound instrument to be triggered by a particular MIDI channel. pgmassign can be use to assign a csound instrument to a specific MIDI program.