Skip to main content

A Python binding for the RtMidi C++ library implemented using Cython.

Project description

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 (CoreMIDI & JACK), and Windows (MultiMedia Library) 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 2 (tested with Python 2.7) and Python 3 (3.4, 3.5, 3.6 and 3.7).

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")

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)

del midiout

More usage examples can be found in the examples directory of the source distribution.

The documentation provides installation instructions and an API reference.

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.1.2rc2.tar.gz (203.8 kB view details)

Uploaded Source

Built Distributions

python_rtmidi-1.1.2rc2-cp37-cp37m-win_amd64.whl (78.9 kB view details)

Uploaded CPython 3.7m Windows x86-64

python_rtmidi-1.1.2rc2-cp37-cp37m-win32.whl (68.3 kB view details)

Uploaded CPython 3.7m Windows x86

python_rtmidi-1.1.2rc2-cp37-cp37m-macosx_10_6_intel.whl (165.1 kB view details)

Uploaded CPython 3.7m macOS 10.6+ intel

python_rtmidi-1.1.2rc2-cp36-cp36m-win_amd64.whl (79.1 kB view details)

Uploaded CPython 3.6m Windows x86-64

python_rtmidi-1.1.2rc2-cp36-cp36m-win32.whl (68.5 kB view details)

Uploaded CPython 3.6m Windows x86

python_rtmidi-1.1.2rc2-cp36-cp36m-macosx_10_6_intel.whl (164.7 kB view details)

Uploaded CPython 3.6m macOS 10.6+ intel

python_rtmidi-1.1.2rc2-cp35-cp35m-win_amd64.whl (78.3 kB view details)

Uploaded CPython 3.5m Windows x86-64

python_rtmidi-1.1.2rc2-cp35-cp35m-win32.whl (67.6 kB view details)

Uploaded CPython 3.5m Windows x86

python_rtmidi-1.1.2rc2-cp27-cp27m-win_amd64.whl (75.6 kB view details)

Uploaded CPython 2.7m Windows x86-64

python_rtmidi-1.1.2rc2-cp27-cp27m-win32.whl (64.3 kB view details)

Uploaded CPython 2.7m Windows x86

python_rtmidi-1.1.2rc2-cp27-cp27m-macosx_10_6_intel.whl (164.5 kB view details)

Uploaded CPython 2.7m macOS 10.6+ intel

File details

Details for the file python-rtmidi-1.1.2rc2.tar.gz.

File metadata

  • Download URL: python-rtmidi-1.1.2rc2.tar.gz
  • Upload date:
  • Size: 203.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for python-rtmidi-1.1.2rc2.tar.gz
Algorithm Hash digest
SHA256 d1a80b01b4133b183a41cb25db513e1c9ff20634904b71de44cb7008e80bfc22
MD5 6619e7a3177bd6fbaae9e2e7ac5205a2
BLAKE2b-256 b855f289af936adc6047a2359f6dc0aa2e586737f9a852776ebf1270746475bb

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.1.2rc2-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: python_rtmidi-1.1.2rc2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 78.9 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for python_rtmidi-1.1.2rc2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 23cce8b2f2eaead736e7315826f1a124bd1ecc73d70c01fa0fcab80ccb7ae493
MD5 c4199202e3d4c591b3981d22a96f2cca
BLAKE2b-256 e80c94b9aae6dd2a2d02a202db2405ec8cebe88ff5eb569a58fb7df261e34c73

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.1.2rc2-cp37-cp37m-win32.whl.

File metadata

  • Download URL: python_rtmidi-1.1.2rc2-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 68.3 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for python_rtmidi-1.1.2rc2-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 2f9bda709168376a8db60e8ac9edc5d4b3ae8000440c73f8836160651f1c01b8
MD5 ca0c3ada8d1bc1819cef53646aa5a94f
BLAKE2b-256 8451aa6372f743c2a8adc341129a1914dfeacf31d2d6acff7c965920ad658ade

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.1.2rc2-cp37-cp37m-macosx_10_6_intel.whl.

File metadata

  • Download URL: python_rtmidi-1.1.2rc2-cp37-cp37m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 165.1 kB
  • Tags: CPython 3.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for python_rtmidi-1.1.2rc2-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 0ff2189111b647f9bd89bfdddd5618ded94017f518c2393dc36a3c53434fbafa
MD5 245b3816af81318bbec054df76e7e3ac
BLAKE2b-256 3db10e308c513d6325817c32890f54e9e6b2f919212875cde832fe99623992b4

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.1.2rc2-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: python_rtmidi-1.1.2rc2-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 79.1 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6

File hashes

Hashes for python_rtmidi-1.1.2rc2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 0f6d286c7be7cd09b0b375be623cd951d0b1cfa9f5c8b6b938736ba5d41806c2
MD5 6043a36fc04581377ab396e065d80e90
BLAKE2b-256 0aaa27952a040744076076f512b6dca898c45bb0851e774c0309f399c5a5e437

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.1.2rc2-cp36-cp36m-win32.whl.

File metadata

  • Download URL: python_rtmidi-1.1.2rc2-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 68.5 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6

File hashes

Hashes for python_rtmidi-1.1.2rc2-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 8ce6a4de043cfbc2bfff01fd3bf84aa3a3e936863be2c1f8f8938e3a3d1cf269
MD5 422b66b1796ba67b71bcf98ab5ec14a1
BLAKE2b-256 5e8421ba600a9e7fc17199b3a2dad1f6ab5829b68854194a5246f16c71bca5ed

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.1.2rc2-cp36-cp36m-macosx_10_6_intel.whl.

File metadata

  • Download URL: python_rtmidi-1.1.2rc2-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 164.7 kB
  • Tags: CPython 3.6m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6

File hashes

Hashes for python_rtmidi-1.1.2rc2-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 54a9e1c74fe086b3d19aa471eefe471dc66e016a74e4ccaa5257981a924bf486
MD5 deeb9547f3edb6b9200f513ffe6f1265
BLAKE2b-256 d0cad567b33002176f176995c980ed6b7bc7e5f81750332605d40388e76b14f0

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.1.2rc2-cp35-cp35m-win_amd64.whl.

File metadata

  • Download URL: python_rtmidi-1.1.2rc2-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 78.3 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.4

File hashes

Hashes for python_rtmidi-1.1.2rc2-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 152e709f175d0a095d8c77826d120f968947b9fec521a6027abdafe242b14323
MD5 ee790aa707478ccdad2c6f13bb665487
BLAKE2b-256 0e00d3f9752f2895ab3d7f2c4480ae1d11c4bf42611fe0f360fe44da5a77a418

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.1.2rc2-cp35-cp35m-win32.whl.

File metadata

  • Download URL: python_rtmidi-1.1.2rc2-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 67.6 kB
  • Tags: CPython 3.5m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.4

File hashes

Hashes for python_rtmidi-1.1.2rc2-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 db62709d93519c331ccf5ae51c16525ccd8bd36e7b67bc46aa30d4326bccd2bf
MD5 0b8d308055543591a47fdd30538385ee
BLAKE2b-256 8d683e6726adea61806907614db80f6149debf58ba081a24ec854f5f23c141b8

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.1.2rc2-cp27-cp27m-win_amd64.whl.

File metadata

  • Download URL: python_rtmidi-1.1.2rc2-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 75.6 kB
  • Tags: CPython 2.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.15

File hashes

Hashes for python_rtmidi-1.1.2rc2-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 7459cdedb0c784bddb472e6da4b8c04102d1fa9270cef1b3b5580bf1f4a03f7b
MD5 05e481fe4d69e7c05ead088366148bcc
BLAKE2b-256 cd2fb38c69f5c8316227120a9c375c5ba09e97f5985ef2ba272f42940023b075

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.1.2rc2-cp27-cp27m-win32.whl.

File metadata

  • Download URL: python_rtmidi-1.1.2rc2-cp27-cp27m-win32.whl
  • Upload date:
  • Size: 64.3 kB
  • Tags: CPython 2.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.15

File hashes

Hashes for python_rtmidi-1.1.2rc2-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 ac22d8e56c1ddcf9d2974ca01b92d7a6fa67404b07d4f268d062fc4eaaa3b53d
MD5 73b4816819bf0d5f08244a06cd6ac616
BLAKE2b-256 ea8662fc5d3781e22aad573bb501ac15c8918bfabb1f8a25e39fba6ada7c2c59

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.1.2rc2-cp27-cp27m-macosx_10_6_intel.whl.

File metadata

  • Download URL: python_rtmidi-1.1.2rc2-cp27-cp27m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 164.5 kB
  • Tags: CPython 2.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.15

File hashes

Hashes for python_rtmidi-1.1.2rc2-cp27-cp27m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 d388d2e489af427fd86f3390cc5f31ea00896ea86eb10b4383a1df74feaf835a
MD5 3bc0cb203a0e5d189871338ccdf1b757
BLAKE2b-256 773bb245f7284f8f0dd02e1547e8b332d28d022199d0babfbf02923561aefba5

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