Skip to content
Simple MIDI parser
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Simple MIDI

Simple MIDI is a library for parsing byte streams of MIDI and emit MIDI events.

  • Simple event based interface
  • Handles running status
  • Handles system real-time messages


The example program reads MIDI data on stdin and outputs a textual representation of some MIDI events. Pipe a MIDI stream into it to use as a simple MIDI monitor.

./example </dev/midi1

Handling SYSEX

System exclusive messages was not made a special case in the parser and system exclusive data works as though it was a single-data byte status; MIDI_SYSEX will not be emitted until the first following data byte (vendor ID) appears, and each following data byte will appear as a MIDI_SYSEX event, until interrupted by another status (normally EOX, end of SysEx).

Note off events

This library makes no effort to hide the fact that some vendors use note-on events with velocity 0 instead of note-off. This is allowed by the MIDI 1.0 specification.


  • make to build the library
  • make example to build the example program
You can’t perform that action at this time.