A Python binding for the RtMidi C++ library implemented using Cython.
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.7+).
The documentation provides installation instructions, a history of changes per release and an API reference.
See the file LICENSE.md about copyright and usage terms.
The source code repository and issue tracker are hosted on GitHub:
https://github.com/SpotlightKid/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.5.2-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eae9c6e4e34751f6577584183baa8cba5250e2087656d285ee81e7f105f24e14 |
|
MD5 | d17c5d14c4d203e7728416457f9e93d5 |
|
BLAKE2b-256 | b748bd8544210a2ff5e39435079cf43e890ace4cd17342c25883c4a43b7627e2 |
Hashes for python_rtmidi-1.5.2-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cee85ee1bce781609a7e65e5b85dda9d5682002024daaca9abb71add8aea74c |
|
MD5 | 2c2655b2abb9405fd34ad16b89fac32a |
|
BLAKE2b-256 | b55a880af5f1f6b0fbda5aed5192286f3f0ae0687e6c299b477a1df3f7f3c2a8 |
Hashes for python_rtmidi-1.5.2-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 674a48a3d2e23f36f5572fec46fbb3791eeb5c7ba4d8d34570ef8f3aba52d653 |
|
MD5 | 82fc21df988705b6a706a0cb97ce5c20 |
|
BLAKE2b-256 | ffdce3020ee981042f593a9ee19022af788633cd31277a41f6b5f9abce2de783 |
Hashes for python_rtmidi-1.5.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7076db7c40fed27a8ca3165271072ad8ccccb5dd077f797dd1bb6e3e5b0f0232 |
|
MD5 | 0bd9b30302fb0ba2440689ebc9f4bcf8 |
|
BLAKE2b-256 | f0cfd0b2102c34a1d02fcc1f7f6ceb8bbea6353b1fd6323f4c22fa8e4bda06c3 |
Hashes for python_rtmidi-1.5.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b77c5b5cfcb6a903a2ce860a749f0c41ea0d634faa72f89ea9bf62b8a96587d |
|
MD5 | e090639044f368a057ae54da2f64289e |
|
BLAKE2b-256 | 33d0c7e16d29122c11e93902e38198813e1e7f0de568dcbf71fdb9eabb6ae6dc |
Hashes for python_rtmidi-1.5.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77ecd1906d83570a5b3d6dd935d09f265b4b99802145a4a9cb2ea0295db2f6e5 |
|
MD5 | 26f6cc03f4fa3eceab4d9d0ffb3577d9 |
|
BLAKE2b-256 | 9f2ede71d39636e0812a930e257eeb6de088fafb970b152c177b57a90b365d2a |
Hashes for python_rtmidi-1.5.2-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee20b495e5923b72bc1be351a6c0208fdb2f26f336f382cd0b77ab0acb7bb34c |
|
MD5 | f8d9d29da3b8917b3297e0589ce12062 |
|
BLAKE2b-256 | 0b06dbb78dd23692672980804fe8989887fc185f659a42dccc28ee808b881e29 |
Hashes for python_rtmidi-1.5.2-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b1bd9ff5d83355045d461fe02235463524d1cb0f12de7e115bd8be6199b20fe |
|
MD5 | 0d29d37e475f0a1c089329e1968a6b7d |
|
BLAKE2b-256 | 20c4d0d32155b4d28718bf7780dea964c9ba11b100feaf0bda2ead89c7f26371 |
Hashes for python_rtmidi-1.5.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3828215f652695651430cd2c59d63e132076a27be23dccb248b283a2c260031 |
|
MD5 | cd3d1b4ab7ad3ef179eb4641b0d63abc |
|
BLAKE2b-256 | 2d5b43b637de095b56ef33405217c2834ae93fca04168a350f46daaf74c5a616 |
Hashes for python_rtmidi-1.5.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 146b8c0a0e2a2a177247ae19b90a2f624cec6d8373f47d2d6019b2746432e183 |
|
MD5 | f435d32cb2bea13ed36bb999d42270e6 |
|
BLAKE2b-256 | 62a8646f6e273cf179a2cbe242255f324da2f377c04dba52f05dc9711b77392c |
Hashes for python_rtmidi-1.5.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f07d59af0c5156ba9e1b2d9ea8e55a4cfe990afd4e37ca905ff99d8ec75c5507 |
|
MD5 | cd7c6805e2f0788c41ce7570853f46c1 |
|
BLAKE2b-256 | 6b9bf5ac6b91d480a8f8f9fad7a2d93fcbe49e3ffeb0c48842a9c3600d79fb02 |
Hashes for python_rtmidi-1.5.2-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 299935b29f3d82e22c7070a4507c5ece7a8aadc1cb67fe021e4db2c2e10ae840 |
|
MD5 | cb26d4f1f5292607b569a7807ee48714 |
|
BLAKE2b-256 | 58aec2ddf2f126e2a997fc98be3df82064af483ae3b172ad50a0b4c3a8e7273b |
Hashes for python_rtmidi-1.5.2-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3da38b7682b3e614d455ea34b3d4b408e11b98508587159d9e5903ade4cf08ee |
|
MD5 | 0bafd044b8cbed97504ddcee18b8d866 |
|
BLAKE2b-256 | 9e2be2ffa97fba98e814c05a79621b9968d24a5bcad91c364bcdc23ec7e012da |
Hashes for python_rtmidi-1.5.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cd43c1d9d31cf78ff450273ddbd6c12153a96961f0359c9caaecd41b4c7b231 |
|
MD5 | 45d4a9a870d74f00ead1935020fcf1c7 |
|
BLAKE2b-256 | 6f8d28ebf13a00cade8e1682b9f4d4801cde9cfff16bc566979d161e04f8b4ee |
Hashes for python_rtmidi-1.5.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1bea8ce5cda70edd172d2cc6364926448e3bff6024debed08983ecae4ef28d9 |
|
MD5 | 0005db061e4386f11fec440bb7da6023 |
|
BLAKE2b-256 | 61ea74954f6a405d6d86bfff6bf0800395131aea8be0ab53b56afeef3eb216ee |
Hashes for python_rtmidi-1.5.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 705c9866f200e71879af2d6bf3aa11d312a88612421a816a82468cc528c9e2f4 |
|
MD5 | 163d8a016678b46b9bd7602246e56a14 |
|
BLAKE2b-256 | b22203d050bb5d4b8e57f58979f90ff3b0dfc7463377aeadd29f07bd031ea48a |
Hashes for python_rtmidi-1.5.2-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ed56dda66316ed77ec5eeb5b6787fb7af5c6b226bec7931490c77cd8fe9eed6 |
|
MD5 | 9a3a937c3e67e8603ee5854ac075fca2 |
|
BLAKE2b-256 | 8158e0986a64a414f790ef186c5a9b038e0f6e3091c9a0efca070ff353af7e7a |
Hashes for python_rtmidi-1.5.2-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f587bcff441d194cb7c653979c773f539666ed92e19917ca9c7eee3a98a2d50b |
|
MD5 | cb339aaeb3459d5e59824c4fbd708042 |
|
BLAKE2b-256 | dd599a80443e0b9b1407705161395e775be28501b380149d0abd5be142b171ae |
Hashes for python_rtmidi-1.5.2-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb0e5cee15806157a0dfcfbe3bbd6397f46b45f33e1b151a73d85ac20f22b642 |
|
MD5 | 6b6250086778322eb451c4aee7d158ce |
|
BLAKE2b-256 | f280237601a1f0db810d7fce981b06461f1527009c6ec054da38e26a3dafbbf8 |
Hashes for python_rtmidi-1.5.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a9a77df213e29d4e50ed79b19281683deb966e4c999f62680d35d521796e33d |
|
MD5 | 59420e7bcb731200a3f05bb42f4c2576 |
|
BLAKE2b-256 | 6430c154c95332c21f954ae07545fe5a2ab098762e2dfbfc8aec7195c4977500 |