A Python binding for the RtMidi C++ library implemented using Cython.
Reason this release was yanked:
Install error with Python 2 and/or old setuptools versions
Project description
Welcome to python-rtmidi!
A Python binding for the RtMidi C++ library implemented using Cython.
Overview
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 3 (3.5, 3.6, 3.7, and 3.8).
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.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for python_rtmidi-1.4.4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c00a38ea8e5d6c98f2ce5748e7f748fe45dc6c5c17b1eb48c9de9db4f2cae960 |
|
MD5 | cd0762895f120ab8721327414c8fd006 |
|
BLAKE2b-256 | 2368c8d0f8998c38df118f74731c843c4cb50c8f9a33989e0d8578d412aabc8a |
Hashes for python_rtmidi-1.4.4-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9689ccc1bda7e81067c53056c463d8833791a6d732be9cec02f6e907cba083f6 |
|
MD5 | d1bd17c5a2ff4065caa702ff0cdab8bb |
|
BLAKE2b-256 | ae9a45789e31821b0b489e4fb56ba5a35e9330dc4a25cc536039bded3c2d8207 |
Hashes for python_rtmidi-1.4.4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91f2a7102e265d7df384696de191e5cd27d61d576ba75354aa3b5e0160f4ed27 |
|
MD5 | fb5dafebdde67b648635c0a5e67fccaf |
|
BLAKE2b-256 | 956538811e520864e82af604580d8c7abef23f7cddc4697afe5d549af8131209 |
Hashes for python_rtmidi-1.4.4-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e99c5b7194ceb51b2f24c638b1e3d18c885a54dcb800a0d4c7f94323311da72f |
|
MD5 | 59a01e0890218f96cb5e07bd914fd7aa |
|
BLAKE2b-256 | 9d75a225a6ffc2c5fca94bb72c13405cbbee98d05fb835d243c33374ea47d7e8 |
Hashes for python_rtmidi-1.4.4-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4847fb5f94cab3c7d561bc449dff323246bda9980d7f954ac7bed61743e355e |
|
MD5 | 5f281fe74e9826a42cf56aea3a36b61b |
|
BLAKE2b-256 | a9c74bd3437472845af1dee3f6565903cf3e2397db5ec8dfd12087c20ea2c5c1 |
Hashes for python_rtmidi-1.4.4-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc3f0f22df001b441754b5d52b14995d5ded35fd2b4e136e6b8df3a63de5bf28 |
|
MD5 | dee9837e27f8876d649f101491c217a0 |
|
BLAKE2b-256 | 12a2c010de0564b5bb9c7452d8955f479961b04fd1090323a5f9ba1516a38fb9 |
Hashes for python_rtmidi-1.4.4-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1c48aeaebdbfc7b06897b904a94cf2746f54aec93a035b71ce014a57b8590f3 |
|
MD5 | 3107c7a7b46492e83ae096bf9dd946e4 |
|
BLAKE2b-256 | d9c59188f97bce9a8750d6b62694c94b8fd0592ca9174f76acd0f4d3edb15494 |
Hashes for python_rtmidi-1.4.4-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc5c5af09ed9e18f484c59da6b90ba6bba6aeedd40de480f07a1ce9ee987c166 |
|
MD5 | 19a9d91a639f0bc034c6285f9d37ff84 |
|
BLAKE2b-256 | 045658d5246890ee42c26db3b003bd6a42045ffb8b2f315adb65d01fdf2e9486 |
Hashes for python_rtmidi-1.4.4-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b98921e343ad62f19b6ea5fa58c0b637aff5f938bf5a1faf2b145270986987f4 |
|
MD5 | 200363a18991f547eae01f96987cdb03 |
|
BLAKE2b-256 | 0916b9c2115d83bec38d61f1683cb014c593d6600712b9f5e53b5d46a7d3656c |
Hashes for python_rtmidi-1.4.4-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 445a6f150af65695e232423955bbda08ec4bf3d3c90c624057a24c6bfdb47f7d |
|
MD5 | 74257a0cd4dcadf6e449570a1e72a209 |
|
BLAKE2b-256 | d7d3a830ed93e09501fe892e87c71eaa2a45908503443e211c00f34719ef5be6 |
Hashes for python_rtmidi-1.4.4-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6270d81435940a7a4d7350ff687cbbb5f8586d80d6ec4cdb30b147f438fdb32a |
|
MD5 | 81b1a6b5f654250d90dbd5c413acd342 |
|
BLAKE2b-256 | 50d033cfbf4cc38c41f5ccaea53e8285feaa7616b976e93913e3df79f4df77c2 |