Project description
RtMidi is a set of C++ classes which provides a concise and simple,
cross-platform API (Application Programming Interface) for realtime MIDI
input / output across Linux (ALSA & JACK), macOS / OS X (CoreMIDI & JACK),
and Windows (MultiMedia System) operating systems.
python-rtmidi is a Python binding for RtMidi implemented using Cython and
provides a thin wrapper around the RtMidi C++ interface. The API is basically
the same as the C++ one but with the naming scheme of classes, methods and
parameters adapted to the Python PEP-8 conventions and requirements of the
Python package naming structure. python-rtmidi supports Python 2 (tested
with Python 2.7) and Python 3 (3.4, 3.5, 3.6 and 3.7).
Usage example
Here’s a quick example of how to use python-rtmidi to open the first
available MIDI output port and send a middle C note on MIDI channel 1:
import time
import rtmidi
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] # channel 1, middle C, velocity 112
note_off = [0x80, 60, 0]
midiout.send_message(note_on)
time.sleep(0.5)
midiout.send_message(note_off)
time.sleep(0.1)
del midiout
More usage examples can be found in the examples and tests directories
of the source repository.
The documentation provides installation instructions, a history of changes
per release and an API reference.
See the file LICENSE.txt about copyright and usage terms.
For more information, visit https://chrisarndt.de/projects/python-rtmidi .
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages .
Files for python-rtmidi, version 1.3.1
Filename, size
File type
Python version
Upload date
Hashes
Filename, size
python_rtmidi-1.3.1-cp27-cp27m-macosx_10_6_intel.whl
(213.1 kB)
File type
Wheel
Python version
cp27
Upload date
Oct 15, 2019
Hashes
View
Filename, size
python_rtmidi-1.3.1-cp27-cp27m-win32.whl
(79.3 kB)
File type
Wheel
Python version
cp27
Upload date
Oct 15, 2019
Hashes
View
Filename, size
python_rtmidi-1.3.1-cp27-cp27m-win_amd64.whl
(92.7 kB)
File type
Wheel
Python version
cp27
Upload date
Oct 15, 2019
Hashes
View
Filename, size
python_rtmidi-1.3.1-cp35-cp35m-win32.whl
(82.4 kB)
File type
Wheel
Python version
cp35
Upload date
Oct 15, 2019
Hashes
View
Filename, size
python_rtmidi-1.3.1-cp35-cp35m-win_amd64.whl
(96.4 kB)
File type
Wheel
Python version
cp35
Upload date
Oct 15, 2019
Hashes
View
Filename, size
python_rtmidi-1.3.1-cp36-cp36m-macosx_10_6_intel.whl
(234.5 kB)
File type
Wheel
Python version
cp36
Upload date
Oct 15, 2019
Hashes
View
Filename, size
python_rtmidi-1.3.1-cp36-cp36m-win32.whl
(84.7 kB)
File type
Wheel
Python version
cp36
Upload date
Oct 15, 2019
Hashes
View
Filename, size
python_rtmidi-1.3.1-cp36-cp36m-win_amd64.whl
(98.8 kB)
File type
Wheel
Python version
cp36
Upload date
Oct 15, 2019
Hashes
View
Filename, size
python_rtmidi-1.3.1-cp37-cp37m-macosx_10_6_intel.whl
(234.9 kB)
File type
Wheel
Python version
cp37
Upload date
Oct 15, 2019
Hashes
View
Filename, size
python_rtmidi-1.3.1-cp37-cp37m-win32.whl
(84.7 kB)
File type
Wheel
Python version
cp37
Upload date
Oct 15, 2019
Hashes
View
Filename, size
python_rtmidi-1.3.1-cp37-cp37m-win_amd64.whl
(99.1 kB)
File type
Wheel
Python version
cp37
Upload date
Oct 15, 2019
Hashes
View
Filename, size
python-rtmidi-1.3.1.tar.gz
(237.6 kB)
File type
Source
Python version
None
Upload date
Oct 15, 2019
Hashes
View