MIDIUtil
Pure-Python library for programmatically creating and writing multi-track MIDI files.
| Language | Python |
|---|---|
| Category | MIDI tools |
| License | MIT |
| Platforms | macOS Windows Linux |
| Install | pip install MIDIUtil |
| First released | ~2016 |
| Maintained | Not actively maintained (last activity 2018) |
| Links | Website · Source |
Strengths
- Pure Python, no dependencies
- Simple API for notes, tempo, controllers
- Multi-track support
Limitations
- Write-only: cannot read existing MIDI files
- Unmaintained since 2018
Best for
Simple, dependency-free generation of MIDI files from code.
Minimal example
from midiutil import MIDIFile
mf = MIDIFile(1)
mf.addNote(0, 0, 60, 0, 1, 100)
with open('out.mid', 'wb') as f:
mf.writeFile(f)