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.4-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79373aa56729c566c377f639e1d7b145c1d27cd9d593da8fceb09219f8a00d77 |
|
MD5 | 9b4fc56827adbba0464a389129ef3bd1 |
|
BLAKE2b-256 | 37a657fd49e16763e826e3acbf31fa3992293c2d655344c036185791e42e5ec5 |
Hashes for python_rtmidi-1.5.4-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56d369f29b70d7c838919b3c02bc819baa5a20a9149acaf2a3a248eb83e43c1c |
|
MD5 | 26b573793b2801e8e378c1bbd6717db8 |
|
BLAKE2b-256 | 0974783bf7081dff5250461f9a62887d07c8adec0043aad57c84cbe3ac1fa0ea |
Hashes for python_rtmidi-1.5.4-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60b9a92ab049f5c5d44af8fc4e6502f044a608b1fe9a33889e4b94e3df4cf17c |
|
MD5 | f96aaaaa732fb11cad3df2ac24b83541 |
|
BLAKE2b-256 | 0101db382267670adf6e5fcbb9ab889d50e30d32b1568eadb3a7b17d41d466f0 |
Hashes for python_rtmidi-1.5.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2862391236f692a55451a476097b4a2bd05eabbc257a6e7b64e969a599ed7486 |
|
MD5 | e6beec8883388ded76a1df54411599e4 |
|
BLAKE2b-256 | 61cafc8b44c5bf2b0c9fd0d749ba84ed80f20f9d227459ba124637840166bc3c |
Hashes for python_rtmidi-1.5.4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d844099e62b26cc7c1295b0e0ce13466a947aabe00628963238a07759eb6ca11 |
|
MD5 | 4e1dbb2ccd5b6937a22aab2935c46e81 |
|
BLAKE2b-256 | 10efea3ed16e6d08a1ea506eb7a02c77f8747832814b7c18fb0ee02e28072ee2 |
Hashes for python_rtmidi-1.5.4-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 201ede931bc3c1be76654c26660bb4232b19b7a39971c075912cafc421308843 |
|
MD5 | fe96716803caef5a07b49e263ef54e18 |
|
BLAKE2b-256 | e57326d01dc828bc2fd9bc63b8d4e8339b27d3b27b6aa354b22e7761bb79764a |
Hashes for python_rtmidi-1.5.4-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fbb95f785ea0682e1a2e30fccf18e05e3a152b6527c68829b6e2eabd4e657f0 |
|
MD5 | 0e9dc2fddeb461e33583b19a521b06ea |
|
BLAKE2b-256 | 07dbc742455d99c2bd71f5c125e147c8eda477e3496289fbedff56e2bc210bd7 |
Hashes for python_rtmidi-1.5.4-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e1ae45801512f3fc6183c72980b6cdee4f4755274323000c30be822789ff7d3 |
|
MD5 | 15f4da6a3f8753b2b7baa13b8f9191ea |
|
BLAKE2b-256 | bc05a34ae2d6041c669da28341ffc14fa050cd74f56212e805de7750719177f7 |
Hashes for python_rtmidi-1.5.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32a9c7a4e671954a8d8c6eef8166f340c73a76e3db14ac1cdb6c8b0984ccd90c |
|
MD5 | b6c6d884859fa3dad25875193c1a8e92 |
|
BLAKE2b-256 | 2026edfacb7b871da223a54841ef31980abf158f3e45012de6b926d99b715749 |
Hashes for python_rtmidi-1.5.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4d5e5883af24c7f8eaeae080828e996eed95f1b6d42def12148c4f45156b462 |
|
MD5 | 9b3b4f8015f37ada4c41939da52b0da5 |
|
BLAKE2b-256 | d29f734e3f09e284159d6da4ad5bb84c77720a250776822bd62f9cbf41511e45 |
Hashes for python_rtmidi-1.5.4-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57985fc7470eff883d81fd563f5084725e9c92999320364363923b1eb6fd045e |
|
MD5 | 349a699350b823229b94860bf688cc91 |
|
BLAKE2b-256 | 10214538d372dcacb3fd25c0afda4d2e515caea5b6ebe01b988a89d57c4b330d |
Hashes for python_rtmidi-1.5.4-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49e1d3e801289b68855c632f10ae9d1f8a604b6064619a7bd2cadd58dbe7a8f1 |
|
MD5 | 8c67506be89075c55198cb281dfc10f4 |
|
BLAKE2b-256 | 7eef5547235be8d08f408b7c4b53feea98459e2a79dd4c409e79352037e6e375 |
Hashes for python_rtmidi-1.5.4-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5fcd4b132c3bf13f51296ff40f5325eb2d92c9badc4ee197b21ad3e9bf8acb4 |
|
MD5 | 74781ac155892a93c70148215d963c31 |
|
BLAKE2b-256 | c009bb8273e4d4ea303f5293f496721cd7c188c34b86bf1ffef665a347e4c767 |
Hashes for python_rtmidi-1.5.4-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2ca4034589bae698b0cca501a0caa4983009cf3250d200b22908b6a68d9e180 |
|
MD5 | 4b49ac871d04922867e136770accf667 |
|
BLAKE2b-256 | 936101da1a7f29d82ce90e353f5e93c9af3749e6b10897272a81c3a5347ebef6 |
Hashes for python_rtmidi-1.5.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa917ad102323ffdfa5bf8e39af4baf4c7ea84452b920da35bbb45a24a311b0e |
|
MD5 | eacd28a76ce3841451eb0b63416e45c5 |
|
BLAKE2b-256 | 2b8bb03e13bdc8340739b6447f88323ebb81e0afeb1c608b09010a1e6f758366 |
Hashes for python_rtmidi-1.5.4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bd2a90456276bc785de5f4da047e52f25758dfa76e5933ac3e14099f2954ff5 |
|
MD5 | 787d4ccf904baae2c71c98158dae9ab6 |
|
BLAKE2b-256 | baf1b7f06028a32d43c0cecc1bb0994a22499013fe5469834347b10c97f1f042 |
Hashes for python_rtmidi-1.5.4-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 649ce2acaf59da0e8be730d6441fc06659a7a7f8b4c1d70c9362685f06573447 |
|
MD5 | fc5e6b4fbe743ecb887d2ba7157aa7cf |
|
BLAKE2b-256 | 66a220dd0c7cfcd903b0164e500d1a3e0981fffac873281491910c9130aa8a5f |
Hashes for python_rtmidi-1.5.4-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d0cf60664b909ef9b8a7186be336d36e134e3a02b166b0a3262a75e5d458f71 |
|
MD5 | 81b3f85863241adce6d9680bbc5fa8bf |
|
BLAKE2b-256 | 80c167a61dc8a0e0793a373754664a3bee814dcd60d8f61b590a4758cbadb7f4 |
Hashes for python_rtmidi-1.5.4-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c05622151bbd714bbb39a98101d656ac26bb6a0af769256f22ddd323862bdb54 |
|
MD5 | a0b0a690e059eb5cb679c54704c84153 |
|
BLAKE2b-256 | 6567b352855e6ef678602100497108cbc29b5641444576a73f6e026b24a995e7 |
Hashes for python_rtmidi-1.5.4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a6d17cbe27f01cf33c52576f9e7ab9f250ae4e3f6df9f9252da83e623732973 |
|
MD5 | ef3f111b4ac103b92e54fba9e20d9a80 |
|
BLAKE2b-256 | c3d57b10b0611a37d61ed41196647fcc1be202a38a604509156c2bde3a15d9c8 |