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 / OS X (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 and tests directories of the source repository.

The documentation provides installation instructions, a history of changes per release and an API reference.

See the file LICENSE.txt about copyright and usage terms.

For more information, visit https://chrisarndt.de/projects/python-rtmidi.

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m Windows x86

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

Uploaded CPython 3.7m macOS 10.6+ intel

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

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m Windows x86

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

Uploaded CPython 3.6m macOS 10.6+ intel

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

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m Windows x86

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

Uploaded CPython 2.7m Windows x86-64

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

Uploaded CPython 2.7m Windows x86

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

Uploaded CPython 2.7m macOS 10.6+ intel

File details

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

File metadata

  • Download URL: python-rtmidi-1.1.2.tar.gz
  • Upload date:
  • Size: 204.5 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.2.tar.gz
Algorithm Hash digest
SHA256 776e0ed1c0c66d3794b380f1e6af8aae9288e6d6ab6b2ef32b88a8f02320c445
MD5 299809317f099da635f004268ab15c3c
BLAKE2b-256 2c7816f6d12abfccb6b1d330b1e1c6228536fa8d8ef6c14d560aba20176f044c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.1.2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 79.3 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.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 eab13d4d7950646234a4a4526c8b655b136e7722dee8e4f1db9fc4e05dd5a477
MD5 375e3652f922be708d7768aa5bf5db04
BLAKE2b-256 684df2493da1a6c4645f145f84b9b5a85b90287d953e0a7412bfea43f5c6dc63

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.1.2-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 68.7 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.2-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 0693c98d12bd568f359f8e25816f06bda1e921595d41f13e6af549e68871be0b
MD5 4ee6427304d6a30d070494b3c3526890
BLAKE2b-256 2dd82a2af0b56b37fc11e2bd9ce201049c830350b370dacb225d6416d3d9c6dc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.1.2-cp37-cp37m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 165.7 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.2-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 cf6b8a742989feda2009260ec6e019d960fe8f9c22831189c8f2d9795faa009e
MD5 ccfc6e4d2262958b19cdbd28d9343bf5
BLAKE2b-256 952f0c90c55a745f02e80c6bf28b27bb06ca9db8821ba22bad51f90640451499

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.1.2-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 79.5 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.2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 7ea0ec498299d9663e9003476e3ad9caecae6acbd5db1453cce967cd18309d0d
MD5 2e2aefb427fec7fab6cae558eab600ae
BLAKE2b-256 25efe8ee3f4f194d5e57672dddc27ae947d54edd49fae417157681a0f672eb02

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.1.2-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 68.9 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.2-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 82e6fde0d37a25726163245120eebd8873e959ec608c855cb32193c061f192f5
MD5 ea82b8ceda8607973bfae8f27d6c4f8a
BLAKE2b-256 e0f8ed0f8d5d0334eebed48712518d10b00cd95db17fddf4e407d212098db53b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.1.2-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 165.4 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.2-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 1a126193398d88715c1c5b9b2e715399d7b59435c4d21c1541babfd467eb2fa3
MD5 18f1d90edda1fb8f2792567247425e09
BLAKE2b-256 f4fa97bdc64b72325f823cadaab6f3a034e8d8d186523eecd7972b11dbac049a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.1.2-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 78.7 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.2-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 c09dd7a5b24619bc09a89eac2f3c1435cccad75c10eec4b88bfd4be6c09b0e00
MD5 f92fae7f78b18c2e2141eb5cc1b5eb73
BLAKE2b-256 d873f0afda53d7a53c17b33b3c53c2cfbeb42b9cac5131deb3a4b284e6bff68d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.1.2-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 68.0 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.2-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 e5788048b0c73b8b4f76c851aa56c75a649e211906d1a42e9d59ed144388452e
MD5 8208c6a608d0cdc0ae6700bf8abcc2db
BLAKE2b-256 0ff0074b16bedc96ed5d1b0bd09690b68b42c667081bd2d5b9b4a1c68f142f07

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.1.2-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 75.9 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.2-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 67e149aaf9392d1d3bf9ad9bd7fb2b0a966a215c3f7560d7dcf8c61c8425dc61
MD5 378af48da97d2a75545968a928654126
BLAKE2b-256 2069885bdaf843920cc911f5c53ee1cae85ba0b61bbe7a77e2cca0e25c48b146

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.1.2-cp27-cp27m-win32.whl
  • Upload date:
  • Size: 64.7 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.2-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 68c3f5f880f0c62c85f7b627539020bd512939e18a234a40c7bba3fc67dd7230
MD5 59337bdfba96006d433297aff8241695
BLAKE2b-256 4e115d8246b01ddca3afc10b23caba4eb89199d55388da0e30d6afef1eddf616

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.1.2-cp27-cp27m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 165.0 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.2-cp27-cp27m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 558f2d05a8aace53c970bb5bad7f0599eaf178dd1d65db0a3d6e19949623ca31
MD5 8a2e58bffc5f09bcbaa7da4c3b750dab
BLAKE2b-256 3b97960d5df865460327c756a723952e4cb004a50cb2ebc9abedfc3ac0ca150a

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