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.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


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

Uploaded Source

Built Distributions

python_rtmidi-1.5.3-cp311-cp311-win_amd64.whl (334.2 kB view details)

Uploaded CPython 3.11 Windows x86-64

python_rtmidi-1.5.3-cp311-cp311-manylinux_2_28_x86_64.whl (748.8 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.3-cp311-cp311-manylinux_2_28_aarch64.whl (727.8 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.3-cp311-cp311-macosx_11_0_arm64.whl (114.7 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

python_rtmidi-1.5.3-cp311-cp311-macosx_10_9_x86_64.whl (127.1 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

python_rtmidi-1.5.3-cp310-cp310-win_amd64.whl (334.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

python_rtmidi-1.5.3-cp310-cp310-manylinux_2_28_x86_64.whl (747.6 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.3-cp310-cp310-manylinux_2_28_aarch64.whl (726.5 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.3-cp310-cp310-macosx_11_0_arm64.whl (113.8 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

python_rtmidi-1.5.3-cp310-cp310-macosx_10_9_x86_64.whl (125.9 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

python_rtmidi-1.5.3-cp39-cp39-win_amd64.whl (338.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

python_rtmidi-1.5.3-cp39-cp39-manylinux_2_28_x86_64.whl (749.2 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.3-cp39-cp39-manylinux_2_28_aarch64.whl (728.2 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.3-cp39-cp39-macosx_11_0_arm64.whl (115.9 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

python_rtmidi-1.5.3-cp39-cp39-macosx_10_9_x86_64.whl (128.5 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

python_rtmidi-1.5.3-cp38-cp38-win_amd64.whl (350.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

python_rtmidi-1.5.3-cp38-cp38-manylinux_2_28_x86_64.whl (765.1 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.3-cp38-cp38-manylinux_2_28_aarch64.whl (741.0 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.3-cp38-cp38-macosx_11_0_arm64.whl (119.6 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

python_rtmidi-1.5.3-cp38-cp38-macosx_10_9_x86_64.whl (133.8 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for python_rtmidi-1.5.3.tar.gz
Algorithm Hash digest
SHA256 d16093167bde2ed83c26fe32a6c60737b18e97b066da74fc68fe68911403d056
MD5 e9cd1ed0e66b66ff6eae1346c5183848
BLAKE2b-256 b343581861dc8c46fd32c31e304370dcab52084ff5bc920845fba7485a54b611

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9fc0ece10af2cc176e241df25051e5ac67fbee2c188acd7d2fb307a2d4894277
MD5 70c1bed3b16a7697c9bfa03616fe76b4
BLAKE2b-256 da76366472ba6bc783825e09f3bef9e8414b1a5fdfd15a1cd25619756a994790

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a624252676914a4c5291ef4e283e3383280e448af567687b97819c73f1d32286
MD5 caef8e67ac9c38e1cbf5c9bd92b7552c
BLAKE2b-256 afb8a272e41cc99d7d62ecaaf27b940d623e15cb4271163c52d1307f33ad55a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f68284fc7a924e4abd8bd58c0cf50e5dc18ec2a2036673c023b6db0d6714d066
MD5 422e639951abd13e374f1be96d86fbea
BLAKE2b-256 6f6a637079019b652041d6c96b3b121efc4e01995a9ba0cb933062b21b69e82a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4dddf25b72f5d91b70e4a9acf32b6da6ef0152c5eeb24a63f5ad28143774caa4
MD5 020823b91b2c592a567b3914d499b02c
BLAKE2b-256 413febf6e2547a58e5c2b26d1f15e5f103ecbd998ab7a1dde69e563068cb10a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6ae1687993252ae38efbdb36f35aaff1f0b33330ff95bbbf21220aea518c98aa
MD5 577703a3281a1787c69380046e9eafde
BLAKE2b-256 8157f88795e58bdd65eb35862c96a46dff7c4f802416cbdbc64215280bcb1883

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 352f3aa82ab423ef8a107180dfc3d872a51d4a3133eb942bc1b8b9c8e7303f22
MD5 3a58f6c68895467353bb2e8e06f88edd
BLAKE2b-256 05da34c73c0688d8908d1c92bd1c95615b6c9dfb0b0adfccf2a4a122fd0e9284

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 867c8a2d9572435a03d729a1bcdc7ea5a3c38db0798796723d051ac749b3550a
MD5 7024c7d466896c9bb2ee6f4db30c6f73
BLAKE2b-256 59601d29cf143420be2c4981daf7764eba23828756c092019eea3ab0077edb70

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f421630650be9b10f72abf342e98e8d19dbba41770e6b7dc0a8143e3ae88db45
MD5 e9f825e4f4d1202d904ba4832fe0ac02
BLAKE2b-256 511bb8bd54814818ddfdbc707e4a7ac0ca2ef2c3526b88e138751dcf6e6a6bb2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9bcda07b3b33af5cb5576103772e755c4a1d276828985e495a7d90e0dc854eed
MD5 5a002a7edf9f31d4f18d10c8c7525af2
BLAKE2b-256 80211f79d7448ca9f040c42e123585297a4fd18db2228a8bf820aa8312c87f7e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 314c39d160fc15235885119cbe670521ffed7716563679c4f65ae4e7bc3eb89e
MD5 e8210a1512e836dd134fd7cc7598d516
BLAKE2b-256 2bed3c0d6caa20128a9f14d3b358725982df1bac9bc8189994f0be87d223281a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 229b70c7ecd8122f2d9e523b4bcb0d745b7e5b797ee36deabf438104004243cf
MD5 8fce05761c1da29a1d0cf2af7447774b
BLAKE2b-256 6f9ce4f8ae24c2973df4fd09699b37fd956e66f139145aa2900034f7004580c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f0b4b3d339ed39d146d54ae23af695e1f76964e7d2485d46510d0de83ae24801
MD5 9342c608208879a1b5a44be591779533
BLAKE2b-256 4d1fdb61f75bce4addfcdfa2687ac249a15a3917d738cfaca56a504af5e28ad1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1c216dccfac2005dbd9fd4914740a53f1c8323ce505aceeae34a4833fa5321f6
MD5 f206355e0f171a812be71e68c87d8a50
BLAKE2b-256 6bc1898bc55a8c36eb0d6686d4eb4aaf3c7d19ed408780e17b9ae5815398212d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0795dcbb8bce73f02214bfd81bda083ec57ba870fbcaf1d8dbe2dc8eaac105a4
MD5 b9107a3ef8031d53e39fa1fe497af398
BLAKE2b-256 52c99f940c72cc20ee747472b6b833392523d5b2e7295efab2da2b97bc81748e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 001cc86b702aa32a3ae0bed5f2dd94b229ce894fe83feaac36f5e1a4efb97a5b
MD5 aa03b55c6a75390b2adc6c55632534a3
BLAKE2b-256 c834d7b814c3c5d759cb845f8b4463fd83263429aa59db8ebe62a4dc3ac8d24c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 b19741321b47c31c7864fff8e022a95e9199fdc1aa94978bb783d18c0e83360a
MD5 7946b7130486a21ba9dde7dd317c0b21
BLAKE2b-256 efd9e2708af745663df5ea7c7120a962666e2c76866c307ad3ad7a7564805597

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3d51eb57a9bcc1a173decc69e070f67d6af31ad852a25238a0299b0a11f7558f
MD5 c4565e1b64ef155bc786037a5ec47e8c
BLAKE2b-256 aec7764c393fae160f85335409e8e21f38a0bfd917e5aea9dcfee9220349f963

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1aaaaac38fbbc169e6760c2325e4eb823a87a6fa7b6ee04180408bc8126f4203
MD5 43922d762b0424138a3128cee7f81d58
BLAKE2b-256 1711b0e4f06be4d1ed9ebad0fd0a10c6739776e4eb75a5ebfc979bb90d58345a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 feca8491d6f93ec0f6f113f9461bd9c74089f2cf1f59e13356da6fc8b8381fe3
MD5 db4120e9faf1f504cc60589c8297fb4b
BLAKE2b-256 05beaf1f4c03a1c368894c82d056a3ba13314cec98929999d9c09466fe9f03ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e6220c3bc9045e9964b1f5fdc9a796431f0141367cebf3d188176d392dc7e317
MD5 6f9d7cd90494b006b8e1768c8aaf1527
BLAKE2b-256 42c79af240021202aaa50fa98436268e344a05cc55d7cd6e7f3f7badf47d0d4d

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