Mido
Library for working with MIDI messages, ports, and files via convenient message objects.
| Language | Python |
|---|---|
| Category | MIDI tools |
| License | MIT |
| Platforms | macOS Windows Linux |
| Install | pip install mido |
| First released | 2013 |
| Maintained | Yes |
| Links | Website · Source |
Strengths
- Clean message/port abstraction over RtMidi, PortMidi, Pygame backends
- Read/write MIDI and SysEx files
- MIDI over TCP/IP support
Limitations
- Real-time I/O needs an extra backend (e.g. python-rtmidi)
- No music-theory or notation features
Best for
Reading, writing, and sending/receiving raw MIDI messages and files.
Minimal example
import mido
msg = mido.Message('note_on', note=60, velocity=64)
port = mido.open_output()
port.send(msg)