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 Travis 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.0.tar.gz (330.8 kB view details)

Uploaded Source

Built Distributions

python_rtmidi-1.5.0-cp311-cp311-win_amd64.whl (650.2 kB view details)

Uploaded CPython 3.11 Windows x86-64

python_rtmidi-1.5.0-cp311-cp311-manylinux_2_28_x86_64.whl (601.4 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.0-cp311-cp311-manylinux_2_28_aarch64.whl (581.3 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.0-cp311-cp311-macosx_10_9_universal2.whl (130.4 kB view details)

Uploaded CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64)

python_rtmidi-1.5.0-cp310-cp310-win_amd64.whl (651.4 kB view details)

Uploaded CPython 3.10 Windows x86-64

python_rtmidi-1.5.0-cp310-cp310-manylinux_2_28_x86_64.whl (603.7 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.0-cp310-cp310-manylinux_2_28_aarch64.whl (582.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.0-cp310-cp310-macosx_10_9_universal2.whl (133.7 kB view details)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)

python_rtmidi-1.5.0-cp39-cp39-win_amd64.whl (653.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

python_rtmidi-1.5.0-cp39-cp39-manylinux_2_28_x86_64.whl (606.3 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.0-cp39-cp39-manylinux_2_28_aarch64.whl (585.0 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.0-cp39-cp39-macosx_10_9_universal2.whl (136.4 kB view details)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)

python_rtmidi-1.5.0-cp38-cp38-win_amd64.whl (655.0 kB view details)

Uploaded CPython 3.8 Windows x86-64

python_rtmidi-1.5.0-cp38-cp38-manylinux_2_28_x86_64.whl (620.0 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.0-cp38-cp38-manylinux_2_28_aarch64.whl (595.5 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.0-cp38-cp38-macosx_10_9_universal2.whl (139.9 kB view details)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file python-rtmidi-1.5.0.tar.gz.

File metadata

  • Download URL: python-rtmidi-1.5.0.tar.gz
  • Upload date:
  • Size: 330.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for python-rtmidi-1.5.0.tar.gz
Algorithm Hash digest
SHA256 92e619f4343f262daed7874236c910a6a60d10481ed7c4db86c7cba80f35e9e7
MD5 02d536dd46b0600e04ae5c000f3f03b2
BLAKE2b-256 b6949f57c5459d0cda4032967fd551442d3b953094a4c6514d57d2cf0ad2f44d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d9f1b5fc9d1fcb967f644f796387552c1a573bd634f5da5bf4a6100e2973d497
MD5 ac51d00c0b522764243ac5f5508bac6a
BLAKE2b-256 737239aa94b99ad26acd7b5ef0966e9c021a8bf8a423d52daddac52f9ebe700b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7e752532b64f51a277a749de549014f6588189902df0b656cba3a4a4c980df7f
MD5 b6c676c3076a33e9d9dbf968c6ceb812
BLAKE2b-256 1e1e67b51c6a1290ce4feadefd049a07e25f835d73b843a71cc5ad4add2f1a02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 19a34425806d6cf3fb46f4d679ad34de2a42b82833ec5b98b637345d77cf5e0a
MD5 59938b674720d870b98e43b8f013cbc8
BLAKE2b-256 ed9667d1c57b8f07de2cccc5e8d57426dc14b8c94a985c9e99db428f65ac3c1d

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.0-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a3f543efd038afb0a15b492ca0a807941b2716bbed046e8fcc5770c0074faa32
MD5 2588020ed43d79a18f6205feff013f10
BLAKE2b-256 aab2735e53d04c58f03a71388b734d7776e70a35106e4a9fb4984b078b324b26

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 91362c4b7adc11b2d266adb2ca8e5d50be4b8b58ced1cebf8f5281d81b998a10
MD5 76489d8d689a5d2e4a9f133cac36431e
BLAKE2b-256 6d848d9b9804ab9c673316eb8b4f771af78f1b78b91ef30a522acbd7dcb1ed50

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 659558070e15dca97660341919f95ae0f6e86c5383af6789813d9b16ba51863c
MD5 908865dabea46189a1e116b57e8817a5
BLAKE2b-256 5f76ad7fbbcfcd57c3cf824fa9ad43c42c36a74eee7cea525df45e3eb1dd3fbb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8090467b36be0529ea0b687849901c9a517de5f47edca09771a502f5e377f60e
MD5 6f093fffd751641da750e9bbfe05517c
BLAKE2b-256 af7127d88d73ba5469a3862c241f29235e11916110ddba7997ea88663c2f0a83

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.0-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f54299b7b83e99fa2a533cf6ca24e17ccb492429562c309654143bfb6537bc00
MD5 1bf45d5218d7a8cc8740347290337a82
BLAKE2b-256 bea151cff167d6d614fd4af42f2a9c95b156c605fe9efe069869d1db5b73457f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e089c5014926437c62ee8dc25c8a293a5fb70f1e406564094c3871dfd8846bd7
MD5 fd8ed8433f7d331cf7e966798cf566bd
BLAKE2b-256 2e54b423925dfa7e1a6ae8c1bfc2c52371145c43ccd71e7f3112a3a5efe19c09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 14744ec6169cd21dd42e0dadac31482906121f7cf50191b9a230eda8183ac8f2
MD5 30edc611e78be5069d7d03a9e9ad6f84
BLAKE2b-256 09acaabe1fa59da540c81b97005029c6799ebcbb747d469148bac5cf942917f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.0-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4fcdc2372900334cefa6cd48c66b3b3681b6b03f683a0562b679a89f233ae700
MD5 7359ab616419e494576a9480c3d30c01
BLAKE2b-256 309656baddef887ab2001878287120488462e999efe386814eeb4790d25d9f96

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.0-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 07145ab1137aaf879895ec449b1793fea72dc661f0470769cb5d03fe80ff728a
MD5 c448483fd41f50d269c5f10fdd200ca3
BLAKE2b-256 4ae1e360733de95700b20ab2f3edaac7294962df00d0cac736c81f2a24637105

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 39d52382bda5f16013a03b4589e2c2378f373345eb238ffed61e8bad3ce5b29a
MD5 4a34e49f1104fc089fcae809d32d0e0d
BLAKE2b-256 cba7a90f18aa5567e2d0600056878334dbe272dde24c83e776eb6c4bf51adba6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.0-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bf9ab4a5e5a2ba9399abfeaf7b2047dd8c287ac0bbffd33649f623765788db07
MD5 14176aa6ce9e26d8561645a67d394c85
BLAKE2b-256 ee43c54d9becd79eda6b21c7c227da81d8491c7071e2655fa744c00565b0231d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.0-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 afd6ed249a9cbd6673e102e1cd2b1838c622b5c47cd0ba9f6dc8f6591921fc63
MD5 ef979ea8f79ab03563b27c74771f2744
BLAKE2b-256 f648eef8019a50f6e17224763ea4e475ce3ccb76b1395f5ba3ffddd08c986258

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.0-cp38-cp38-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.0-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6293bb8bccbaeb43d5484d6b3ea28f7ba18138c9ba5fda2db1e81213c680b445
MD5 f8ee4ac4ccac6659279ebc3020acc8b0
BLAKE2b-256 f9cf5ff11c218fb82af1ce7f9c11a64b57654edd2925c5ded7a4f3b5bfa62e65

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