midifilein
Returns a generic MIDI message from a MIDI file.
Syntax
Initiatialization
index -- MIDI event index in MIDI file (0 - midifilevents()].
id (optional, default=0) -- MIDI file id, defaults to 0, the id of any file passed to the -F flag.
status -- the type of MIDI message. Can be:
- 128 (note off)
- 144 (note on)
- 160 (polyphonic aftertouch)
- 176 (control change)
- 192 (program change)
- 208 (channel aftertouch)
- 224 (pitch bend)
- 0 if no MIDI message are pending in the MIDI IN buffer
chan -- MIDI channel (1-16 if only one input port is used, higher if channel is port mapped.)
data1, data2 -- message-dependent data values
Performance
Same as above, but operational only at performance time. Users should select the appropriate overload for init or perf-time.
Examples
Here is an example of the midifilein opcode. It uses the file midifilein.csd.
See also
Sensing and Control: Tempo and Sequencing
Credits
Author: Victor Lazzarini
May 2025
New in Csound 7