Python bindings for the RtMidi C++ library, providing real-time MIDI input/output using Cython. Current version 1.5.8, updates irregularly.
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Old import path from version <1.0
from rtmidi import MidiIn
Old import path from version <1.0
from rtmidi import MidiOut
Basic setup: list ports, open input, set callback.
from rtmidi import MidiIn, MidiOut
# List available ports
midi_in = MidiIn()
print('Input ports:', midi_in.get_ports())
midi_out = MidiOut()
print('Output ports:', midi_out.get_ports())
# Open first port and listen
if midi_in.get_ports():
midi_in.open_port(0)
# Callback example
def callback(message, data):
print(message)
midi_in.set_callback(callback)
import time
time.sleep(2)
midi_in.close_port()
else:
print('No MIDI input ports found.')
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.
Agent activity
0 hits · last 30 days
No traffic data recorded yet.