python-rtmidi
A Python binding for the RtMidi C++ library implemented using Cython.
Decision gist · record as of 2026-08-14
Yes, if you need MIDI I/O in Python. The package is stable (Production/Stable status), permissively licensed, has no runtime dependencies, and offers broad platform and Python version coverage. Install friction is moderate due to compiled bindings, but pre-built wheels mitigate this for standard platforms. The last release is from November 2023 and the repository remains active; aging maintenance is typical for a mature, feature-complete library.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a MIDI output device or virtual MIDI port available on the system; on Linux, ALSA or JACK must be configured; on macOS, CoreMIDI is built-in; on Windows, MultiMedia System is built-in.
- Medium install friction due to compiled C++ bindings; wheels are available for Python 3.8–3.12 on macOS (Intel and ARM), Linux (x86_64 and aarch64), and Windows.
- Last release was in November 2023; repository remains active with a recent commit in January 2026.
License · maintenance · safety
permissive license (permissive) — MIT License (permissive). The package and its underlying RtMidi C++ library are both released under MIT terms, allowing free use, modification, and distribution with minimal restrictions.
last release 2023-11-20 (998 days) · last repo commit 2026-01-23 · 411 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 103,536 downloads/mo, #12,800 on PyPI
Alternatives
Verify before relying
import rtmidi
import time
midiout = rtmidi.MidiOut()
available_ports = midiout.get_ports()
if available_ports:
midiout.open_port(0)
else:
midiout.open_virtual_port("My virtual output")
with midiout:
note_on = [0x90, 60, 112]
note_off = [0x80, 60, 0]
midiout.send_message(note_on)
time.sleep(0.5)
midiout.send_message(note_off)- Whether the package handles MIDI input (MidiIn) with the same API surface as MidiOut, or if input support has different constraints.
- Performance characteristics and latency guarantees for real-time MIDI applications.
- Whether virtual port creation is supported on all three platforms or only on some.
What it is and what it does
python-rtmidi is a thin Python wrapper around the RtMidi C++ library, implemented using Cython. It exposes a cross-platform API for MIDI input and output on Windows (MultiMedia System), macOS (CoreMIDI and JACK), and Linux (ALSA and JACK). The package adapts RtMidi's C++ interface to Python conventions, allowing developers to open MIDI ports, send note-on/note-off messages, and manage virtual ports without writing C++ code.
The library is production-stable and supports Python 3.8 and later. It has no runtime Python dependencies, only the compiled RtMidi C++ bindings. Wheels are pre-built for common platforms (macOS Intel/ARM, Linux x86_64/aarch64, Windows x86_64), reducing installation friction for most users. The package is suitable for music software, hardware control, and real-time MIDI sequencing applications.
Use it for
- Send MIDI note messages to a synthesizer or DAW from a Python script or application.
- Receive MIDI input from a keyboard or controller and process it in real-time.
- Create a virtual MIDI port to route messages between applications on the same system.
- Build a Python-based MIDI sequencer or control surface for music production.
- Interface with hardware MIDI devices (drum machines, synthesizers) from Python code.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need MIDI I/O in Python.
The package is stable (Production/Stable status), permissively licensed, has no runtime dependencies, and offers broad platform and Python version coverage. Install friction is moderate due to compiled bindings, but pre-built wheels mitigate this for standard platforms. The last release is from November 2023 and the repository remains active; aging maintenance is typical for a mature, feature-complete library.
Install
python-rtmidi on PyPI
Before you install
Medium install friction due to compiled C++ bindings; wheels are available for Python 3.8–3.12 on macOS (Intel and ARM), Linux (x86_64 and aarch64), and Windows. Last release was in November 2023; repository remains active with a recent commit in January 2026.
Requires a MIDI output device or virtual MIDI port available on the system; on Linux, ALSA or JACK must be configured; on macOS, CoreMIDI is built-in; on Windows, MultiMedia System is built-in.
License in practice
MIT License (permissive). The package and its underlying RtMidi C++ library are both released under MIT terms, allowing free use, modification, and distribution with minimal restrictions.
Quickstart
import rtmidi
import time
midiout = rtmidi.MidiOut()
available_ports = midiout.get_ports()
if available_ports:
midiout.open_port(0)
else:
midiout.open_virtual_port("My virtual output")
with midiout:
note_on = [0x90, 60, 112]
note_off = [0x80, 60, 0]
midiout.send_message(note_on)
time.sleep(0.5)
midiout.send_message(note_off)
Verify before relying
- Whether the package handles MIDI input (MidiIn) with the same API surface as MidiOut, or if input support has different constraints.
- Performance characteristics and latency guarantees for real-time MIDI applications.
- Whether virtual port creation is supported on all three platforms or only on some.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Aging 998 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 103,536 / month, #12,800 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/StableEnvironment :: ConsoleEnvironment :: MacOS XEnvironment :: Win32 (MS Windows)Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Multimedia :: Sound/Audio :: MIDITopic :: Software Development :: Libraries :: Python Modules |
Evidence: python_rtmidi-1.5.8-cp310-cp310-macosx_10_9_x86_64.whl; python_rtmidi-1.5.8-cp310-cp310-macosx_11_0_arm64.whl; python_rtmidi-1.5.8-cp310-cp310-manylinux_2_28_aarch64.whl; python_rtmidi-1.5.8-cp310-cp310-manylinux_2_28_x86_64.whl; python_rtmidi-1.5.8-cp310-cp310-win_amd64.whl; python_rtmidi-1.5.8-cp311-cp311-macosx_10_9_x86_64.whl; python_rtmidi-1.5.8-cp311-cp311-macosx_11_0_arm64.whl; python_rtmidi-1.5.8-cp311-cp311-manylinux_2_28_aarch64.whl; python_rtmidi-1.5.8-cp311-cp311-manylinux_2_28_x86_64.whl; python_rtmidi-1.5.8-cp311-cp311-win_amd64.whl; python_rtmidi-1.5.8-cp312-cp312-macosx_10_9_x86_64.whl; python_rtmidi-1.5.8-cp312-cp312-macosx_11_0_arm64.whl; python_rtmidi-1.5.8-cp312-cp312-manylinux_2_28_aarch64.whl; python_rtmidi-1.5.8-cp312-cp312-manylinux_2_28_x86_64.whl; python_rtmidi-1.5.8-cp312-cp312-win_amd64.whl; python_rtmidi-1.5.8-cp38-cp38-macosx_10_9_x86_64.whl; python_rtmidi-1.5.8-cp38-cp38-macosx_11_0_arm64.whl; python_rtmidi-1.5.8-cp38-cp38-manylinux_2_28_aarch64.whl; python_rtmidi-1.5.8-cp38-cp38-manylinux_2_28_x86_64.whl; python_rtmidi-1.5.8-cp38-cp38-win_amd64.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 input output python”
- python-rtmidipython-rtmidi provides a Python interface to the RtMidi C++ library…
- pyobjc-framework-CoreMIDIProvides Python bindings to macOS's CoreMIDI framework, enabling MIDI…
- midoMido provides a Python library for creating, parsing, and sending…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also mido · pyobjc-framework-CoreMIDI · symusic · pretty-midi · python-osc · music21 · wiim · PyAudio · python-mpv