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.6.tar.gz (367.4 kB view details)

Uploaded Source

Built Distributions

python_rtmidi-1.5.6-cp311-cp311-win_amd64.whl (408.4 kB view details)

Uploaded CPython 3.11 Windows x86-64

python_rtmidi-1.5.6-cp311-cp311-manylinux_2_28_x86_64.whl (766.9 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.6-cp311-cp311-manylinux_2_28_aarch64.whl (740.9 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.6-cp311-cp311-macosx_11_0_arm64.whl (147.6 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

python_rtmidi-1.5.6-cp311-cp311-macosx_10_9_x86_64.whl (151.5 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

python_rtmidi-1.5.6-cp310-cp310-win_amd64.whl (407.9 kB view details)

Uploaded CPython 3.10 Windows x86-64

python_rtmidi-1.5.6-cp310-cp310-manylinux_2_28_x86_64.whl (765.0 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.6-cp310-cp310-manylinux_2_28_aarch64.whl (739.0 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.6-cp310-cp310-macosx_11_0_arm64.whl (146.0 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

python_rtmidi-1.5.6-cp310-cp310-macosx_10_9_x86_64.whl (149.7 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

python_rtmidi-1.5.6-cp39-cp39-win_amd64.whl (409.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

python_rtmidi-1.5.6-cp39-cp39-manylinux_2_28_x86_64.whl (765.1 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.6-cp39-cp39-manylinux_2_28_aarch64.whl (739.1 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.6-cp39-cp39-macosx_11_0_arm64.whl (146.0 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

python_rtmidi-1.5.6-cp39-cp39-macosx_10_9_x86_64.whl (149.8 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

python_rtmidi-1.5.6-cp38-cp38-win_amd64.whl (422.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

python_rtmidi-1.5.6-cp38-cp38-manylinux_2_28_x86_64.whl (782.3 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.6-cp38-cp38-manylinux_2_28_aarch64.whl (753.1 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.6-cp38-cp38-macosx_11_0_arm64.whl (150.6 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

python_rtmidi-1.5.6-cp38-cp38-macosx_10_9_x86_64.whl (156.1 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for python_rtmidi-1.5.6.tar.gz
Algorithm Hash digest
SHA256 b2a0a399bb4a5e1a56477798afd41d022a18b5e954f6d0ff92b45bb99bee3710
MD5 19d8c0cf01387113ca271d3b2202c397
BLAKE2b-256 6d1357481471e0535151686ce18bb7e74a4884519474408872ffaca7732f9946

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ca000906a0a06e9281667aae20de7d697b50edfc4a899e7e0d945a058d087a65
MD5 a5c1b0b08bc21b738eaf12ebbafc6b6f
BLAKE2b-256 8a76ae0211343c0cdb4af93cf2428025bdb5d36eeb8ecc6f995d750b3df202a5

See more details on using hashes here.

File details

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

File metadata

File hashes

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

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.6-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 af04dc56c98a0cf362f4b8da54b7477a68a4efdd7d8c8e2bf4997737d332a91a
MD5 a0c0b7f601e8892f0dee30c3bad61e32
BLAKE2b-256 c8ff542dd349a1222de153f68bd3801d3758a6e74b1e73882536f874b18510e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bb41bf25014447f6235139d96866c89041588dc67249199c97a2037779543022
MD5 e2287431c1882b50563459cb2aeba22c
BLAKE2b-256 2fd95ee3595eab1d30d023e680ee0da01164e8673d6dc2de5aad3001e1b65cec

See more details on using hashes here.

File details

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

File metadata

File hashes

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

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f3cada5737e9db1d0f9de0ddb8e288928b35e506d713cfc2b72614553e830bef
MD5 ebd4d084d252775f2e6e857a97b435c6
BLAKE2b-256 c2c0e0218e080c92b93249fa44cf826af78190dc7828d3c0da81df33ff474ba8

See more details on using hashes here.

File details

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

File metadata

File hashes

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

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.6-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f1201cab39a05ecdaf039553bdefce90d2b0927d4d4378bcebcb141f3934fd2a
MD5 d31819d99e587e8e97ac886133911fa7
BLAKE2b-256 4b7a52bddf00f82a4db7d03c035d07614e25f5876d38e6a5cf860ea1715afb3b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 81ea5f11e5ada292da6c90fd451c4c3105bee1334c7c6aa5fddb57162bbf605b
MD5 c4ab4ce411ee49268938cb585e76b219
BLAKE2b-256 1e8003bb8449224ca74c7ddf556897f1cba22308132db2bd1910c55f68c181fd

See more details on using hashes here.

File details

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

File metadata

File hashes

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

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.6-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 9390e434244eec925a5d2fc308e03ecea39117cae76ef513c74d40f78d448cc0
MD5 6bfc83c5d2545606a7c712e33876a211
BLAKE2b-256 a2bd17c4077353c274135429b41d4a7e5500b30daa74607ebf74ca859942f471

See more details on using hashes here.

File details

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

File metadata

File hashes

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

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.6-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d5fe85c21a596810a0bef28aeee394cf6ee9139265af7837ab1781d899f7a488
MD5 60e87832094b8be2f1fd6e88e2abd4ef
BLAKE2b-256 f2d0205e59078373ef26a09b80c5ea5efbb2fb6d4c621490a9aa93633a7be7a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.6-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c8a4ae8a75b3425136772acbd8153847211f98c1cd2eb73eb606df9eaab99a8c
MD5 dbdbad4806a198d54d967d9693192ec6
BLAKE2b-256 4d7485791cd94b04e9f3f2d43cbb6f83d03a40a39ecb19e3a26595a29dd9496e

See more details on using hashes here.

File details

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

File metadata

File hashes

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

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.6-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 7d436d9f2bba11d1f82d951a2213d5f66cc5975e4e8c8ac5899fd402b1a73b34
MD5 18630d02a5829e888a3134b970206375
BLAKE2b-256 6216b8527698ad4a20fd1fd48ed0be6854f2399fa494339c76e9ef15217f99ee

See more details on using hashes here.

File details

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

File metadata

File hashes

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

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.6-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f522243a06cbd8fae20d7631eded32c67b0e727278a8a487b309062a0608e024
MD5 a4e01b8ef6efb56652a47c5ef2cffa39
BLAKE2b-256 fe713cda4717b255f19c8e36936f4c1156555237d096f3efa48cc0790fe6fb72

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.6-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4c89e8f867307e6d92962e57254fbd7d296a59adbcf3b23d7f22429c7eed073f
MD5 15dc6d1d360cd19b70ed0f0222c06d22
BLAKE2b-256 3eab84664144280d7d5b92a779f896e1d67a426997984773460b492e5f49fe26

See more details on using hashes here.

File details

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

File metadata

File hashes

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

See more details on using hashes here.

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