mido
MIDI Objects for Python
Decision gist · record as of 2026-08-14
Yes. Mido is a stable, actively maintained library with no known vulnerabilities, low install friction, and permissive licensing. It is the standard choice for MIDI work in Python and has a clear, well-documented API. Install it if you need to work with MIDI messages, files, or hardware in any capacity.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- For port I/O, you may need to install an optional backend (e.g., mido[ports-rtmidi]) and have the corresponding system library (RtMidi, PortMidi, or Pygame) available.
- Low friction installation with only two lightweight runtime dependencies (packaging and importlib-metadata).
- The project is actively maintained with a recent commit on 2026-06-27 and has been stable since its initial 2013 release.
License · maintenance · safety
MIT (permissive) — MIT license is permissive and imposes no restrictions on commercial or proprietary use, modification, or redistribution as long as the license text is included.
last release 2024-10-25 (658 days) · last repo commit 2026-06-27 · 1,632 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 893,445 downloads/mo, #4,795 on PyPI
Alternatives
Verify before relying
pip install mido
import mido
msg = mido.Message('note_on', note=60)
print(msg.type, msg.note)
with mido.open_input() as inport:
for msg in inport:
print(msg)- Whether the default installation works without optional port backends or if RtMidi/PortMidi system libraries are required for basic MIDI I/O
- Performance characteristics when handling large MIDI files or high-frequency message streams
What it is and what it does
Mido is a Python library for working with MIDI (Musical Instrument Digital Interface) messages and files. It abstracts away the complexity of MIDI protocol details by providing convenient message objects that you can create, inspect, and modify. The library supports reading and writing MIDI files, sending and receiving MIDI messages through ports, and includes a reusable MIDI stream parser.
The core use case is building music production tools, sequencers, controllers, or any application that needs to communicate with MIDI hardware or software synthesizers. Mido handles all 18 standard MIDI message types and provides a unified port API that works across multiple backends (RtMidi, PortMidi, Pygame), so you can write code once and switch backends without changing your application logic. It also supports MIDI over TCP/IP for wireless communication between computers.
Use it for
- Build a MIDI controller or sequencer that sends note messages to a synthesizer or DAW
- Read and playback MIDI files programmatically with full access to every message and meta-event
- Listen to incoming MIDI from hardware controllers and respond in real time
- Convert between MIDI file formats or extract/modify MIDI data from existing files
- Implement wireless MIDI communication between computers using TCP/IP sockets
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Mido is a stable, actively maintained library with no known vulnerabilities, low install friction, and permissive licensing. It is the standard choice for MIDI work in Python and has a clear, well-documented API. Install it if you need to work with MIDI messages, files, or hardware in any capacity.
Install
mido on PyPI
Before you install
Low friction installation with only two lightweight runtime dependencies (packaging and importlib-metadata). The project is actively maintained with a recent commit on 2026-06-27 and has been stable since its initial 2013 release.
For port I/O, you may need to install an optional backend (e.g., mido[ports-rtmidi]) and have the corresponding system library (RtMidi, PortMidi, or Pygame) available.
License in practice
MIT license is permissive and imposes no restrictions on commercial or proprietary use, modification, or redistribution as long as the license text is included.
Quickstart
pip install mido
import mido
msg = mido.Message('note_on', note=60)
print(msg.type, msg.note)
with mido.open_input() as inport:
for msg in inport:
print(msg)
Verify before relying
- Whether the default installation works without optional port backends or if RtMidi/PortMidi system libraries are required for basic MIDI I/O
- Performance characteristics when handling large MIDI files or high-frequency message streams
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release ~=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagespackagingimportlib-metadata |
| Maintenance | Actively maintained 658 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 893,445 / month, #4,795 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Multimedia :: Sound/Audio :: MIDITopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities |
Evidence: mido-1.3.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “MIDI message handling python”
- midoMido provides a Python library for creating, parsing, and sending…
- pretty-midiProvides utilities for reading, modifying, and synthesizing MIDI data…
- python-rtmidipython-rtmidi provides a Python interface to the RtMidi C++ library…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also python-rtmidi · symusic · pretty-midi · pyobjc-framework-CoreMIDI · music21 · aubio · PyAudio · wiim · pydub