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

Uploaded Source

Built Distributions

python_rtmidi-1.5.5-cp311-cp311-win_amd64.whl (403.3 kB view details)

Uploaded CPython 3.11 Windows x86-64

python_rtmidi-1.5.5-cp311-cp311-manylinux_2_28_x86_64.whl (766.7 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.5-cp311-cp311-manylinux_2_28_aarch64.whl (740.7 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.5-cp311-cp311-macosx_11_0_arm64.whl (147.0 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

python_rtmidi-1.5.5-cp311-cp311-macosx_10_9_x86_64.whl (150.7 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

python_rtmidi-1.5.5-cp310-cp310-win_amd64.whl (401.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

python_rtmidi-1.5.5-cp310-cp310-manylinux_2_28_x86_64.whl (764.3 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.5-cp310-cp310-manylinux_2_28_aarch64.whl (738.3 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.5-cp310-cp310-macosx_11_0_arm64.whl (145.0 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

python_rtmidi-1.5.5-cp310-cp310-macosx_10_9_x86_64.whl (148.7 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

python_rtmidi-1.5.5-cp39-cp39-win_amd64.whl (402.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

python_rtmidi-1.5.5-cp39-cp39-manylinux_2_28_x86_64.whl (764.4 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.5-cp39-cp39-manylinux_2_28_aarch64.whl (738.4 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.5-cp39-cp39-macosx_11_0_arm64.whl (145.0 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

python_rtmidi-1.5.5-cp39-cp39-macosx_10_9_x86_64.whl (148.8 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

python_rtmidi-1.5.5-cp38-cp38-win_amd64.whl (416.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

python_rtmidi-1.5.5-cp38-cp38-manylinux_2_28_x86_64.whl (781.6 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.5-cp38-cp38-manylinux_2_28_aarch64.whl (752.5 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.5-cp38-cp38-macosx_11_0_arm64.whl (149.8 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

python_rtmidi-1.5.5-cp38-cp38-macosx_10_9_x86_64.whl (155.2 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: python_rtmidi-1.5.5.tar.gz
  • Upload date:
  • Size: 357.6 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.5.tar.gz
Algorithm Hash digest
SHA256 3f3e9b0fa497e813cc0bdd73b28ae07977c91803e4d5550bc7c7a34a1501cbde
MD5 f44d699aab29ae8e0eb86c097145a28a
BLAKE2b-256 3fecf0b65000abe18272258b04955fa88fcca132cd4a4a12c2cf9af2656cf789

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9a1e6dc4a04f19e330f3f798d59ee247b2dcdfa7115d9d588a64e882f8c9187a
MD5 fc56d96ddbab6d0dee602b9ee9140ba7
BLAKE2b-256 7029137ca5bd032cb618916f399638c33b74132bb2478d624aa109d2eecf8062

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cc0c4e151423e070162220f27fe85741f8efb0ef99a73af92f9b25296cd3e9de
MD5 b302d0d7254ba95af235c1c92fc02eb6
BLAKE2b-256 8ceb54a88a589423458ce36fd18a207f44f9cf5ddabe8d73250ce75b14521687

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 30a18f01081cb2b8f9d046576f1fabc18d7c6a77248d0a5e40f31137f140792e
MD5 56000694041f6c8d6072ec510274d050
BLAKE2b-256 26f11318f0fe938256fbb545b9a2834eec2f988f32498ba12f90b67f3c3d2aa3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 137f301066d02cb95e0434f16b02cc15dd335b5ed908d0d2fe2c9369f84b8398
MD5 db05cbfaae4a7522c2f01fdf7e11da56
BLAKE2b-256 0f57725390c15dc4dc45f0f971259c96e8f42c4fd3d4d62385827b96ad01939c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7a7d580ea66b305958df8c6c312c15b02fd256a72ce774fdf14000c611bd3a46
MD5 8eee7751fffa2638910be387510f7e60
BLAKE2b-256 b7b6a8b397a0005e72400cd267e924e30aed52a204dac6f8b1153f139dff7f46

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3ad968b87a7665913d524c9731f00877a23b1e3ae5b040bc4eb3a4c82d548afd
MD5 94239ecbdad4d2753c4c04279ba5adae
BLAKE2b-256 151e00cab542145b5e2590ec383a73c2e1c389e0396aed2439345e62f937a901

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e5438ccedafbf0d6eddf8d8164947008f1030de34c44c449a8a98d1f66174b1c
MD5 30f8aef0e673daf21389bd108030e827
BLAKE2b-256 642bca45ae59ef1e26ec491f67ae57a0eeba9280e0805e26d94e1d71721964d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 aea56cc19142b40961ea3317d1562b948e12291c9a9376b95eb77cb55324dc23
MD5 8655e2c355a5e5cc7e0bad697497f5be
BLAKE2b-256 4a441c98f63144376c825cd537211689187dc4e5f237e83eafdb975dc36dd00d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 26834d895952d83df921d9fdf758daf6ed1b0a4a48043e91861bd9f461d183be
MD5 6808ec808378c55ad5214832c846fced
BLAKE2b-256 02508eaba2e925440c5275fdbb08dcefe8a45a4518a2b85fe1be5b34cdc25d4b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 09a3bd3bc30f1f289509a8bff61b2e3505b75fb489bd692514e72a53a7b14fe2
MD5 f32639c9b0132f9cfa423a952433c8b1
BLAKE2b-256 e49abc747b69013e31216df77cd696b1fbff7c293a618df7478191826c0d944d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 8c5d22c8f2fad83a92d1b110b47bac5ab60f945c825b2ba43f707b3c6b648401
MD5 3fff5d289b378d047ef03d2e8294d9d3
BLAKE2b-256 42b3a84d8a1defc4092be8afb763758b688ef6edbe7977ea2a3462c974450c30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cfb59345d6f5339405aa7aff58330f24edf21872ba6fb537223e2c37cb536e56
MD5 7e49371e54cdbd79b60ccdb53930016c
BLAKE2b-256 c7b43da0d7a0f353913998fa3171d71bcdb361eb0eb5d4237fc9cb1d582f6bcd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 dea82f0e4ecc0770773ed2276862a9f34282b49528e3cc2200e6820ea77bdff4
MD5 7e4be6909c890576a7d8734d67cd5ac2
BLAKE2b-256 d1ed042f10f5aada7fc4fcb5729fdb28d82b73f694b0dd145e99f62a1dc59190

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 24ad4202be3915a83f2d07f97d4eb3566cf6f629349c99a8eac0fa63330b2273
MD5 ef243a8ac0c6c49ddee195ec269e59eb
BLAKE2b-256 8fc7eb041afd02f18677befa60b89ff08427af2a2fb72d0893da8de215401bcd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cb110b59eb1d7a0f24d1e0d72b00b5b20e47927e231af7c05f0005ffe54918b9
MD5 39a67fe94353e8d17ddfba19396fa657
BLAKE2b-256 ef9ec5987957d70fdfa341613f748a1038d78675a7b7efea2f73b31a2ce133ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 0496c29aad3f8dbdc76b372a7dd14c323bd7a51ea5afe3ca20883a7002ab56a4
MD5 9c9e92ee5dab4a0806e1ad049c0e23e8
BLAKE2b-256 1ad6c5c026a1f3d45b1bf091bd34513cdb7dce8319e1eba9712f4c405ba966b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9cb91a66b2e5eba8dd8657528574e9b2793a6f0ba85442b8ee9a569b5e866470
MD5 8f09f756654bbfa6785b6e785af911c2
BLAKE2b-256 6ff1baefed6bcebb1aa38acd024e139adfc3795921e2919a7bd145b840e79cd0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 db31012542863ddbacf531a32985576065cc98961c9d80aed064a45d37d930c9
MD5 bff15a5558e072d41171e7cf7f9b60dd
BLAKE2b-256 7a590c103b1d60e48a4f3ec24dea9a2d30ae4739e730ec0c6e9a3103280d640b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0b9559817c66076ca47149b939442a7ba677e152e219d4e76c3a9cce716c8859
MD5 092defb8792923cdc69d695a25846eae
BLAKE2b-256 ac60dd7fc8c359140d1c46ff0c2783c268ff1a5f6abe31cc488c3255e2d0e2e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d64057900d1530d355f3f41a09e3460d2eb598e1c7e87e947f4ebd015bc90358
MD5 a895b28fb9764456c6d3cd3ae3d09c66
BLAKE2b-256 25ae45321398fc7638d139aa3601a9aef7c43f2d0e0da878e787dfd02f320f80

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