Skip to main content

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.

Latest version Project status MIT License Python versions Distribution format CI status

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_rtmidi-1.5.8.tar.gz (368.1 kB view details)

Uploaded Source

Built Distributions

python_rtmidi-1.5.8-cp312-cp312-win_amd64.whl (129.8 kB view details)

Uploaded CPython 3.12 Windows x86-64

python_rtmidi-1.5.8-cp312-cp312-manylinux_2_28_x86_64.whl (315.6 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.8-cp312-cp312-manylinux_2_28_aarch64.whl (305.7 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.8-cp312-cp312-macosx_11_0_arm64.whl (153.4 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

python_rtmidi-1.5.8-cp312-cp312-macosx_10_9_x86_64.whl (158.9 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

python_rtmidi-1.5.8-cp311-cp311-win_amd64.whl (132.9 kB view details)

Uploaded CPython 3.11 Windows x86-64

python_rtmidi-1.5.8-cp311-cp311-manylinux_2_28_x86_64.whl (305.4 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.8-cp311-cp311-manylinux_2_28_aarch64.whl (294.8 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.8-cp311-cp311-macosx_11_0_arm64.whl (146.7 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

python_rtmidi-1.5.8-cp311-cp311-macosx_10_9_x86_64.whl (150.2 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

python_rtmidi-1.5.8-cp310-cp310-win_amd64.whl (132.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

python_rtmidi-1.5.8-cp310-cp310-manylinux_2_28_x86_64.whl (304.1 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.8-cp310-cp310-manylinux_2_28_aarch64.whl (293.3 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.8-cp310-cp310-macosx_11_0_arm64.whl (145.4 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

python_rtmidi-1.5.8-cp310-cp310-macosx_10_9_x86_64.whl (148.8 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

python_rtmidi-1.5.8-cp39-cp39-win_amd64.whl (132.5 kB view details)

Uploaded CPython 3.9 Windows x86-64

python_rtmidi-1.5.8-cp39-cp39-manylinux_2_28_x86_64.whl (304.0 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.8-cp39-cp39-manylinux_2_28_aarch64.whl (293.2 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.8-cp39-cp39-macosx_11_0_arm64.whl (145.3 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

python_rtmidi-1.5.8-cp39-cp39-macosx_10_9_x86_64.whl (148.9 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

python_rtmidi-1.5.8-cp38-cp38-win_amd64.whl (136.4 kB view details)

Uploaded CPython 3.8 Windows x86-64

python_rtmidi-1.5.8-cp38-cp38-manylinux_2_28_x86_64.whl (321.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.8-cp38-cp38-manylinux_2_28_aarch64.whl (307.6 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.8-cp38-cp38-macosx_11_0_arm64.whl (150.2 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

python_rtmidi-1.5.8-cp38-cp38-macosx_10_9_x86_64.whl (155.4 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file python_rtmidi-1.5.8.tar.gz.

File metadata

  • Download URL: python_rtmidi-1.5.8.tar.gz
  • Upload date:
  • Size: 368.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.6

File hashes

Hashes for python_rtmidi-1.5.8.tar.gz
Algorithm Hash digest
SHA256 7f9ade68b068ae09000ecb562ae9521da3a234361ad5449e83fc734544d004fa
MD5 1249c323511c769987cca5f56a09141f
BLAKE2b-256 ddee0f91965dcc471714c69df21e5ca3d94dc81411b7dee2d31ff1184bea07c9

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 052c89933cae4fca354012d8ca7248f4f9e1e3f062471409d48415a7f7d7e59e
MD5 84b427a0971c8668c8fa9cf7bc473121
BLAKE2b-256 93466af077d262f521ea2bf1ab60b8aad72f34fe6dd55af739176605369d449c

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cec30924e305f55284594ccf35a71dee7216fd308dfa2dec1b3ed03e6f243803
MD5 d8f8c8d7410e776cb8febd2d8f8ecbe3
BLAKE2b-256 f6925a60f56dfb2740e644e932233928947423cd2101895319b331f84527eb31

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 25f5a5db7be98911c41ca5bebb262fcf9a7c89600b88fd3c207ceafd3101e721
MD5 20200c6879ffc1f2cdadaccce0c37413
BLAKE2b-256 6f5bdc19c53d9d512b74dc2cca3725591cc612b9465645695a0696352a8c8b54

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 29d9c9d9f82ce679fecad7bb4cb79f3a24574ea84600e377194b4cc1baacec0e
MD5 b718e4df12f6640379285ce70c524c85
BLAKE2b-256 4dec57cecde253daab896ce53778520cd41eb062641862ebdb0ee6f97511b1d9

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5443634597eb340cdec0734f76267a827c2d366f00a6f9195141c78828016ac2
MD5 94cd289f950aad603d4f2fee8f7cced4
BLAKE2b-256 5127887b0378e0a907489a07bdeb808fa5ed349675245c6ee14d9f6d00304f96

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 cfea32c91752fa7aecfe3d6827535c190ba0e646a9accd6604f4fc70cf4b780f
MD5 6d789753a409619154d6be475abb9b68
BLAKE2b-256 13ff2c55797dbf020d462132d1bc5b34d596b400fa197e2a259b8dd2ea2e5954

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 46bbf32c8a4bf6c8f0df1c02a68689d0757f13cb7a69f27ccbbed3d7b2365918
MD5 3a2d83bb191142883d8615bbf50d2d41
BLAKE2b-256 a0791ddb4fb1bdb1a8b8bd62007ca4980344a53b7f29633a7bca1088eed964ce

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 271d625c489fffb39b3edc5aba67f7c8e29a04a0a0f056ce19e5a888a08b4c59
MD5 fad7cefb558682a0d94b80cc68a819af
BLAKE2b-256 535eb866491545135c699bfbed62f54b93c4d6587afc2bba6e2cbbe898570c32

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4e234dca7f9d783dd3f1e9c9c5c2f295f02b7af3085301d6eed3b428cf49d327
MD5 54540a3942dfa9716eb7603689226362
BLAKE2b-256 4b1237d41151b08a292719f05dbeae15475537f8aa291cda34c6634b35916dff

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 30d117193dcad8af67c600c405f53eb096e4ff84849760be14c97270af334922
MD5 718b342465fb6619bb84ea61393f8747
BLAKE2b-256 4b0c23be16b75c90946784b8d233e61db14cf0482def5396821a1ae0bdcd2739

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f2138005c6bd3d8b9af05df383679f6d0827d16056e68a941110732310dcb7dd
MD5 0452e16abf8e608b0170265071f63f8b
BLAKE2b-256 9b0ccf771eca1b64610e627ca1e67be8390ecdf5e0e1914efbdd9d50ac4c5986

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 878ce085dfb65c0974810a7e919f73708cbb4c0430c7924b78f25aea1dd4ebee
MD5 070fc911bdcded17bc944b0dac2b3063
BLAKE2b-256 bf2432dc239047a56f44d8d8090d55010f85a38ed959ffe517c2e87a2aa34190

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8bbaf7c7164471712a93ac60c8f9ed146b336a294a5103223bbaf8f10709a0bf
MD5 96713055eaf25126dc661857fa8a2ea0
BLAKE2b-256 b548aa1d4924f7aa238a192d69aa565b315af0037f684c9475e8b860c679a655

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 844bd12840c9d4e03dfc89b2cd57c55dcbf5ed7246504d69c6c661732249b19c
MD5 78fe9d99a7d59fd10720a6d2de3b9767
BLAKE2b-256 bf9b8e452d6edc2c04e3407f542d3185c66ffc2d39c8811cf2b117653a0a4d63

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 efc07413b30b0039c0d35abe25a81d740c7405124eb58eed141a8f24388e6fe0
MD5 1735ac8952ff2eb33554c9326fa9b52c
BLAKE2b-256 469c95c0a6a43bd24a17568e1e31008b1fab7e9a2e54c0ed7301e8d5cc9fa109

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 dd2bcbea822488fca6b8d9fc7e78a91da12914f3b88dc086f051cb65a643449f
MD5 997b36e69e500af3e48e186b15b29d18
BLAKE2b-256 c9ea2b775358c10f7ab13e4bbf07c488f9ea7e26728ac3337657b85116c1323d

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 29661939f9b7bd1a4e29835f50f4790e741dacd21a5cb143297aefb51deefdec
MD5 28eb47481497b51f3fc7ef31544b3d3b
BLAKE2b-256 c70a9c719afb56538041c5b970dc3dea41447fec2850039d0d65f9661ea46f50

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp39-cp39-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5966172ed28add6ff2b76d389702931bfc7ff3cc741c0e4b0d1aaae269ab7a8e
MD5 4f8d10c2c11c7cf755de10ca7c9e80bb
BLAKE2b-256 25890a844ce7f774784f08fe230cbd114dccff722122203efcc1a888876ba5d5

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a706e9850e22acc57fa840c60fdc4541baafe462a05ff7631a6d9eb91c65e171
MD5 07b1c7989e1e3defb49bbb4375f4ffd0
BLAKE2b-256 4d2945cc82f68de966069d5884a0ae92f8f04c596f4045f0bf93955c3fe3c2a9

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 82e61bc1b51aa91d9e615827056e80f78dbe364248eecd61698b233f7af903f6
MD5 9162692d5c3d3975886f69ddf97814db
BLAKE2b-256 254b5ca7936f22974fce66f600a3b30e50bb17acb94dbadee0b15b310aaf7066

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 26149186367341bf5b0a3ac17b495f6a25950bd3da6b4f13d25ac0a9ce8208dd
MD5 91acd6cc514a162429e753e84df9c10b
BLAKE2b-256 6a257e6b825e0bacec6ae38b25d82aeaf5796eafff782f2b3417b552ea90b8a1

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c60dd180e5130fb87571e71aea30e2ef0512131aab45865a7d67063ed8e52ca4
MD5 c78f4e485e7cde0ebffebc870260c78a
BLAKE2b-256 d7353d3222f330669f59df9592f926f8d7e9735107473898ccc8d348349ab84c

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp38-cp38-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a5582983ad57ea7f0a7797ddc3e258efb00f8326113b6ddfa85b5165a4151806
MD5 88de15ebca7c6d05dd266f9c87256a95
BLAKE2b-256 ea10fbf8ff2b69f07423fa775bcb688fd1021989dae388318d6906d6cfe060bb

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1d5da765184150fb946043d59be4039b36a8060ede025f109ef20492dbf99075
MD5 1258493039203f324ad8c39a09e3e857
BLAKE2b-256 6ede81eda7f8f7ab5ee9f28a4d7b59ed2442d0545adb9ba210218bf31dcd1701

See more details on using hashes here.

Provenance

File details

Details for the file python_rtmidi-1.5.8-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.8-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7bce7f17c71a71d8ef0bfeae3cb8a7652dd02f0d5067de882e1ee44eb38518db
MD5 cc5e44d815b36bd8942d6f55673085bf
BLAKE2b-256 6c61062735cb57ca237f78a60fb7ca097ead1d83f542fa2d172e06416cb7d0f2

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page