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.6-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca000906a0a06e9281667aae20de7d697b50edfc4a899e7e0d945a058d087a65 |
|
MD5 | a5c1b0b08bc21b738eaf12ebbafc6b6f |
|
BLAKE2b-256 | 8a76ae0211343c0cdb4af93cf2428025bdb5d36eeb8ecc6f995d750b3df202a5 |
Hashes for python_rtmidi-1.5.6-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b35455350513e4a82a930df3583eea6ac10dab9dc69a47a2ff5be4d9d06cd952 |
|
MD5 | 2874f57ceef4aade7d26492c16e289ae |
|
BLAKE2b-256 | de53562be8dbbf4d1527863a09f4a96ab1383eda5152ca2ac9f9dce97adae803 |
Hashes for python_rtmidi-1.5.6-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af04dc56c98a0cf362f4b8da54b7477a68a4efdd7d8c8e2bf4997737d332a91a |
|
MD5 | a0c0b7f601e8892f0dee30c3bad61e32 |
|
BLAKE2b-256 | c8ff542dd349a1222de153f68bd3801d3758a6e74b1e73882536f874b18510e2 |
Hashes for python_rtmidi-1.5.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb41bf25014447f6235139d96866c89041588dc67249199c97a2037779543022 |
|
MD5 | e2287431c1882b50563459cb2aeba22c |
|
BLAKE2b-256 | 2fd95ee3595eab1d30d023e680ee0da01164e8673d6dc2de5aad3001e1b65cec |
Hashes for python_rtmidi-1.5.6-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12b2e0b3f7f3946a62d28866150a3f779ed462a39b447896e6b8096f6da520fd |
|
MD5 | b8a9617e055057807c5d163eafd8e8a8 |
|
BLAKE2b-256 | 0e602f20bbcd134e0796c2f4482e14b02e9d427c9f9dceffca8e028d8b918140 |
Hashes for python_rtmidi-1.5.6-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3cada5737e9db1d0f9de0ddb8e288928b35e506d713cfc2b72614553e830bef |
|
MD5 | ebd4d084d252775f2e6e857a97b435c6 |
|
BLAKE2b-256 | c2c0e0218e080c92b93249fa44cf826af78190dc7828d3c0da81df33ff474ba8 |
Hashes for python_rtmidi-1.5.6-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68883106c4eadde1f9861895ccd8d90868e2380cfa70486ae5e52719eaf5c26e |
|
MD5 | f5a5fe7a3290722c075c212954cd4e97 |
|
BLAKE2b-256 | bff0a6c12f7b3641100d6e5e2860e898c6c30f1801d93273cb87c7ccc90a3c95 |
Hashes for python_rtmidi-1.5.6-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1201cab39a05ecdaf039553bdefce90d2b0927d4d4378bcebcb141f3934fd2a |
|
MD5 | d31819d99e587e8e97ac886133911fa7 |
|
BLAKE2b-256 | 4b7a52bddf00f82a4db7d03c035d07614e25f5876d38e6a5cf860ea1715afb3b |
Hashes for python_rtmidi-1.5.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81ea5f11e5ada292da6c90fd451c4c3105bee1334c7c6aa5fddb57162bbf605b |
|
MD5 | c4ab4ce411ee49268938cb585e76b219 |
|
BLAKE2b-256 | 1e8003bb8449224ca74c7ddf556897f1cba22308132db2bd1910c55f68c181fd |
Hashes for python_rtmidi-1.5.6-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39042b963b63f5fd7dc02943f412d29aaef6770b0dec6d2de975e32ed200561e |
|
MD5 | 98f5d085ea53a90c546b6a97e5348739 |
|
BLAKE2b-256 | ffde00eb9e6804db2e1453c5de5836e20e4c570ed24579b63fa2b269c56c8975 |
Hashes for python_rtmidi-1.5.6-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9390e434244eec925a5d2fc308e03ecea39117cae76ef513c74d40f78d448cc0 |
|
MD5 | 6bfc83c5d2545606a7c712e33876a211 |
|
BLAKE2b-256 | a2bd17c4077353c274135429b41d4a7e5500b30daa74607ebf74ca859942f471 |
Hashes for python_rtmidi-1.5.6-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25e93bae54b164642788df8d064dd45051b2a81bcb49866388de01802f97ce9b |
|
MD5 | 45ab6a444cdbd4af2097f954007a4391 |
|
BLAKE2b-256 | f1f9ea0f34266bf4fffdd57b0cbaf76c3b9222fcfb923b2bedda488d6f1bcc6d |
Hashes for python_rtmidi-1.5.6-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5fe85c21a596810a0bef28aeee394cf6ee9139265af7837ab1781d899f7a488 |
|
MD5 | 60e87832094b8be2f1fd6e88e2abd4ef |
|
BLAKE2b-256 | f2d0205e59078373ef26a09b80c5ea5efbb2fb6d4c621490a9aa93633a7be7a6 |
Hashes for python_rtmidi-1.5.6-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8a4ae8a75b3425136772acbd8153847211f98c1cd2eb73eb606df9eaab99a8c |
|
MD5 | dbdbad4806a198d54d967d9693192ec6 |
|
BLAKE2b-256 | 4d7485791cd94b04e9f3f2d43cbb6f83d03a40a39ecb19e3a26595a29dd9496e |
Hashes for python_rtmidi-1.5.6-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67936128df85ded6c71e6a2dd8dc4134eca424c96a24e6954c84d4fddc0526cf |
|
MD5 | a065bcbd9df622c881c598a7b7f7c356 |
|
BLAKE2b-256 | c1ff3905348f33d4ac2e2f25ebc4b0c96381a6dcd36bae20a8c44fd46fe3c4f9 |
Hashes for python_rtmidi-1.5.6-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d436d9f2bba11d1f82d951a2213d5f66cc5975e4e8c8ac5899fd402b1a73b34 |
|
MD5 | 18630d02a5829e888a3134b970206375 |
|
BLAKE2b-256 | 6216b8527698ad4a20fd1fd48ed0be6854f2399fa494339c76e9ef15217f99ee |
Hashes for python_rtmidi-1.5.6-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e85537cdd8721724b024206d812c3289cbceef4b99dda5c030bbb29f30a3c0b |
|
MD5 | aa0b677dd8bc7c0eced085f522d162af |
|
BLAKE2b-256 | ba85a2ca35cab44a1c6202f391046076de3508c6b7d8b790e8187c56be9db2bf |
Hashes for python_rtmidi-1.5.6-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f522243a06cbd8fae20d7631eded32c67b0e727278a8a487b309062a0608e024 |
|
MD5 | a4e01b8ef6efb56652a47c5ef2cffa39 |
|
BLAKE2b-256 | fe713cda4717b255f19c8e36936f4c1156555237d096f3efa48cc0790fe6fb72 |
Hashes for python_rtmidi-1.5.6-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c89e8f867307e6d92962e57254fbd7d296a59adbcf3b23d7f22429c7eed073f |
|
MD5 | 15dc6d1d360cd19b70ed0f0222c06d22 |
|
BLAKE2b-256 | 3eab84664144280d7d5b92a779f896e1d67a426997984773460b492e5f49fe26 |
Hashes for python_rtmidi-1.5.6-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce5d38597f687b6f70ddb7fb10c8b42481e802c1d48befe1fb9ad70850d9c126 |
|
MD5 | f323f32359b861339c50deaf496678d9 |
|
BLAKE2b-256 | 07b131a0bfa63dec736cfca7cf3548ef35ff28c0e61aca02aa0e8e2d63591b5a |