A Python binding for the RtMidi C++ library implemented using Cython.
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") 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) 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.
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.2.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5eb0b5679e94717101641d8e3725d17dd2abd68f1c0d4b061315bf3192260268 |
|
MD5 | f29b4d23aae3bd9b5cab25c920cd86fc |
|
BLAKE2b-256 | 069eb81811108c4a1a1b5d1eea1a7b403c4bd91540989e2798534e5036e69f4c |
Hashes for python_rtmidi-1.2.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbdc7dbeae1602e2681306116537373917f73d2fd82034413127d038ec611da2 |
|
MD5 | 05a41e877af0c8e32e968b5894fd8ab1 |
|
BLAKE2b-256 | 689dad926fc98cce5857b15fe6443ab8f8e9d794b106a445d258a95c3a06f522 |
Hashes for python_rtmidi-1.2.0-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37f56d4a7697a043fda23d3429b92484eeed3d347ae9da0fbe72b595bab331e8 |
|
MD5 | 6cd3f205aa1c4964287a2209d02ea8e4 |
|
BLAKE2b-256 | bfad8b49c68a0e3636a0215e374edf92493a72d2b330810b395cd0b6e9eb8e2c |
Hashes for python_rtmidi-1.2.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7c343325377c73a02ed67a8ad95b56a6527aada76118a58d378722503ee8ccf |
|
MD5 | f6c746fa1b3721d79cd33902837a4867 |
|
BLAKE2b-256 | 3bb6fc92ae76ad766d0c2e19fc0dc291d3d4015e61b4468314a996b666c33b13 |
Hashes for python_rtmidi-1.2.0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1f2a4ee3198713e83fb1f173e112daec424779b96ce47565e1bd2f332a13aa7 |
|
MD5 | 7101175d3402fa12e020e8351cc77935 |
|
BLAKE2b-256 | 21d180e9d66b3661a4aabc48d2ce84bfda66417e90b2991e30294792f9b7995a |
Hashes for python_rtmidi-1.2.0-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 438beaa92edd6afe22f92cc00b10301b53717cebd3ce2e49fd95ece7f68c24c2 |
|
MD5 | ce1ef4e139dfb902ed85d916d824ffe9 |
|
BLAKE2b-256 | 04590f3bbab240e43eabcdf36c1bf74a056d6de4c6ed9115f1c13ab589ff8c98 |
Hashes for python_rtmidi-1.2.0-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cfb71213eeebc674a076aa457bf7346c3295bb1b73a3b5eb4b6462f4418cab7 |
|
MD5 | 1283037df13ffaa5855ba3e23b9607d1 |
|
BLAKE2b-256 | dbd8c13fc28209b3496a0d634625c26aada879515b017efe33ba77f2efb3e241 |
Hashes for python_rtmidi-1.2.0-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 450b47c3f1230d6db2ac904b2a6ba7201538a9a71ae73a0257597b32fcd00279 |
|
MD5 | 2e2f3a832baee720d3136b91e22a544f |
|
BLAKE2b-256 | 2d94574d6fdb0a8d6329dcdcf74c9924ec657f18922689e82047808b64de3644 |
Hashes for python_rtmidi-1.2.0-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15c35ac752fef475ef6870631cdac7155b965b88666c75146cdb48b231999740 |
|
MD5 | 4cb54d4f89de277c6adb78f306b5b718 |
|
BLAKE2b-256 | 17d23fd371ccb8fc640c57ddd6a6267da1598aec3750345ddefe2acb0ec85263 |
Hashes for python_rtmidi-1.2.0-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a859511b91ed9a575a96c6117c2baa2acfb1719a5a911f414c96ed9bd2c602b9 |
|
MD5 | 340ff1e0a921a7b2246f9b4b0bbc055a |
|
BLAKE2b-256 | c0ce590cc9b88938b2eb8a3d898f0e22a9fea1fec657518a73d2b1681febf9f8 |
Hashes for python_rtmidi-1.2.0-cp27-cp27m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2eb82b9e0c972375ff2395dd1fc0ea9d0f5d80062b662d406a6217c8310d2640 |
|
MD5 | 3bc7377c2e9b2c20a476b8811175588d |
|
BLAKE2b-256 | 79624d1914b7d6cb0a7a3c69f3a3d11b481d0d0d379fb870f204f4d70fbcfe16 |