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.8+).
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.5-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a1e6dc4a04f19e330f3f798d59ee247b2dcdfa7115d9d588a64e882f8c9187a |
|
MD5 | fc56d96ddbab6d0dee602b9ee9140ba7 |
|
BLAKE2b-256 | 7029137ca5bd032cb618916f399638c33b74132bb2478d624aa109d2eecf8062 |
Hashes for python_rtmidi-1.5.5-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc0c4e151423e070162220f27fe85741f8efb0ef99a73af92f9b25296cd3e9de |
|
MD5 | b302d0d7254ba95af235c1c92fc02eb6 |
|
BLAKE2b-256 | 8ceb54a88a589423458ce36fd18a207f44f9cf5ddabe8d73250ce75b14521687 |
Hashes for python_rtmidi-1.5.5-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30a18f01081cb2b8f9d046576f1fabc18d7c6a77248d0a5e40f31137f140792e |
|
MD5 | 56000694041f6c8d6072ec510274d050 |
|
BLAKE2b-256 | 26f11318f0fe938256fbb545b9a2834eec2f988f32498ba12f90b67f3c3d2aa3 |
Hashes for python_rtmidi-1.5.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 137f301066d02cb95e0434f16b02cc15dd335b5ed908d0d2fe2c9369f84b8398 |
|
MD5 | db05cbfaae4a7522c2f01fdf7e11da56 |
|
BLAKE2b-256 | 0f57725390c15dc4dc45f0f971259c96e8f42c4fd3d4d62385827b96ad01939c |
Hashes for python_rtmidi-1.5.5-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a7d580ea66b305958df8c6c312c15b02fd256a72ce774fdf14000c611bd3a46 |
|
MD5 | 8eee7751fffa2638910be387510f7e60 |
|
BLAKE2b-256 | b7b6a8b397a0005e72400cd267e924e30aed52a204dac6f8b1153f139dff7f46 |
Hashes for python_rtmidi-1.5.5-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ad968b87a7665913d524c9731f00877a23b1e3ae5b040bc4eb3a4c82d548afd |
|
MD5 | 94239ecbdad4d2753c4c04279ba5adae |
|
BLAKE2b-256 | 151e00cab542145b5e2590ec383a73c2e1c389e0396aed2439345e62f937a901 |
Hashes for python_rtmidi-1.5.5-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5438ccedafbf0d6eddf8d8164947008f1030de34c44c449a8a98d1f66174b1c |
|
MD5 | 30f8aef0e673daf21389bd108030e827 |
|
BLAKE2b-256 | 642bca45ae59ef1e26ec491f67ae57a0eeba9280e0805e26d94e1d71721964d1 |
Hashes for python_rtmidi-1.5.5-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aea56cc19142b40961ea3317d1562b948e12291c9a9376b95eb77cb55324dc23 |
|
MD5 | 8655e2c355a5e5cc7e0bad697497f5be |
|
BLAKE2b-256 | 4a441c98f63144376c825cd537211689187dc4e5f237e83eafdb975dc36dd00d |
Hashes for python_rtmidi-1.5.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26834d895952d83df921d9fdf758daf6ed1b0a4a48043e91861bd9f461d183be |
|
MD5 | 6808ec808378c55ad5214832c846fced |
|
BLAKE2b-256 | 02508eaba2e925440c5275fdbb08dcefe8a45a4518a2b85fe1be5b34cdc25d4b |
Hashes for python_rtmidi-1.5.5-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09a3bd3bc30f1f289509a8bff61b2e3505b75fb489bd692514e72a53a7b14fe2 |
|
MD5 | f32639c9b0132f9cfa423a952433c8b1 |
|
BLAKE2b-256 | e49abc747b69013e31216df77cd696b1fbff7c293a618df7478191826c0d944d |
Hashes for python_rtmidi-1.5.5-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c5d22c8f2fad83a92d1b110b47bac5ab60f945c825b2ba43f707b3c6b648401 |
|
MD5 | 3fff5d289b378d047ef03d2e8294d9d3 |
|
BLAKE2b-256 | 42b3a84d8a1defc4092be8afb763758b688ef6edbe7977ea2a3462c974450c30 |
Hashes for python_rtmidi-1.5.5-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfb59345d6f5339405aa7aff58330f24edf21872ba6fb537223e2c37cb536e56 |
|
MD5 | 7e49371e54cdbd79b60ccdb53930016c |
|
BLAKE2b-256 | c7b43da0d7a0f353913998fa3171d71bcdb361eb0eb5d4237fc9cb1d582f6bcd |
Hashes for python_rtmidi-1.5.5-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dea82f0e4ecc0770773ed2276862a9f34282b49528e3cc2200e6820ea77bdff4 |
|
MD5 | 7e4be6909c890576a7d8734d67cd5ac2 |
|
BLAKE2b-256 | d1ed042f10f5aada7fc4fcb5729fdb28d82b73f694b0dd145e99f62a1dc59190 |
Hashes for python_rtmidi-1.5.5-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24ad4202be3915a83f2d07f97d4eb3566cf6f629349c99a8eac0fa63330b2273 |
|
MD5 | ef243a8ac0c6c49ddee195ec269e59eb |
|
BLAKE2b-256 | 8fc7eb041afd02f18677befa60b89ff08427af2a2fb72d0893da8de215401bcd |
Hashes for python_rtmidi-1.5.5-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb110b59eb1d7a0f24d1e0d72b00b5b20e47927e231af7c05f0005ffe54918b9 |
|
MD5 | 39a67fe94353e8d17ddfba19396fa657 |
|
BLAKE2b-256 | ef9ec5987957d70fdfa341613f748a1038d78675a7b7efea2f73b31a2ce133ac |
Hashes for python_rtmidi-1.5.5-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0496c29aad3f8dbdc76b372a7dd14c323bd7a51ea5afe3ca20883a7002ab56a4 |
|
MD5 | 9c9e92ee5dab4a0806e1ad049c0e23e8 |
|
BLAKE2b-256 | 1ad6c5c026a1f3d45b1bf091bd34513cdb7dce8319e1eba9712f4c405ba966b0 |
Hashes for python_rtmidi-1.5.5-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cb91a66b2e5eba8dd8657528574e9b2793a6f0ba85442b8ee9a569b5e866470 |
|
MD5 | 8f09f756654bbfa6785b6e785af911c2 |
|
BLAKE2b-256 | 6ff1baefed6bcebb1aa38acd024e139adfc3795921e2919a7bd145b840e79cd0 |
Hashes for python_rtmidi-1.5.5-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db31012542863ddbacf531a32985576065cc98961c9d80aed064a45d37d930c9 |
|
MD5 | bff15a5558e072d41171e7cf7f9b60dd |
|
BLAKE2b-256 | 7a590c103b1d60e48a4f3ec24dea9a2d30ae4739e730ec0c6e9a3103280d640b |
Hashes for python_rtmidi-1.5.5-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b9559817c66076ca47149b939442a7ba677e152e219d4e76c3a9cce716c8859 |
|
MD5 | 092defb8792923cdc69d695a25846eae |
|
BLAKE2b-256 | ac60dd7fc8c359140d1c46ff0c2783c268ff1a5f6abe31cc488c3255e2d0e2e9 |
Hashes for python_rtmidi-1.5.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d64057900d1530d355f3f41a09e3460d2eb598e1c7e87e947f4ebd015bc90358 |
|
MD5 | a895b28fb9764456c6d3cd3ae3d09c66 |
|
BLAKE2b-256 | 25ae45321398fc7638d139aa3601a9aef7c43f2d0e0da878e787dfd02f320f80 |