Real-time MIDI Support Csound supports realtime MIDI input and output, as well as input from MIDI files. Realtime MIDI input is activated using the -M (or --midi-device=DEVICE) command line flag. You must specify the device number or name after the -M. For example to use device number 2, you would use something like: csound -M2 myrtmidi.csd You can find out the available alsa devices by using: cat /proc/asound/cards You must then use something like: csound -+rtmidi=alsa -M hw:3 myrtmidi.csd Realtime MIDI output is activated using -Q, using device number or names as shown above. You can also load a MIDI file using the -F or --midifile=FILE command line flag. The MIDI file is read in realtime, and behaves as if it was being performed or received in realtime. So the csound program is not aware if MIDI input comes from a MIDI file or directly from a MIDI interface. Once realtime MIDI input and/or output has been activated, opcodes like MIDI Input and MIDI Output will have effect. When MIDI input is enabled (with -M or -F), each incoming noteon message will generate a note event for an instrument which has the same number as the channel of the event (see massign and pgmassign to change this behavior). This means that MIDI controlled instruments are polyphonic by default, since each note will generate a new instance of the instrument. See the MIDI/Score Interoperability opcodes for information on designing instruments which can be used from the score or driven by MIDI. &midiinput; &midioutput; &midigeneric; &midiconvert; &midiextender; &midionoff; &midiinterop; &midirealtime; &midisliderbk;