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 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.5, 3.6, 3.7, and 3.8).

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.

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

Uploaded Source

Built Distributions

python_rtmidi-1.4.0-cp38-cp38-win_amd64.whl (101.5 kB view details)

Uploaded CPython 3.8 Windows x86-64

python_rtmidi-1.4.0-cp38-cp38-win32.whl (87.0 kB view details)

Uploaded CPython 3.8 Windows x86

python_rtmidi-1.4.0-cp38-cp38-macosx_10_9_x86_64.whl (130.7 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

python_rtmidi-1.4.0-cp37-cp37m-win_amd64.whl (99.3 kB view details)

Uploaded CPython 3.7m Windows x86-64

python_rtmidi-1.4.0-cp37-cp37m-win32.whl (84.9 kB view details)

Uploaded CPython 3.7m Windows x86

python_rtmidi-1.4.0-cp37-cp37m-macosx_10_6_intel.whl (235.4 kB view details)

Uploaded CPython 3.7m macOS 10.6+ intel

python_rtmidi-1.4.0-cp36-cp36m-win_amd64.whl (99.0 kB view details)

Uploaded CPython 3.6m Windows x86-64

python_rtmidi-1.4.0-cp36-cp36m-win32.whl (84.9 kB view details)

Uploaded CPython 3.6m Windows x86

python_rtmidi-1.4.0-cp36-cp36m-macosx_10_6_intel.whl (235.0 kB view details)

Uploaded CPython 3.6m macOS 10.6+ intel

python_rtmidi-1.4.0-cp35-cp35m-win_amd64.whl (96.6 kB view details)

Uploaded CPython 3.5m Windows x86-64

python_rtmidi-1.4.0-cp35-cp35m-win32.whl (82.5 kB view details)

Uploaded CPython 3.5m Windows x86

File details

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

File metadata

  • Download URL: python-rtmidi-1.4.0.tar.gz
  • Upload date:
  • Size: 243.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.8.1

File hashes

Hashes for python-rtmidi-1.4.0.tar.gz
Algorithm Hash digest
SHA256 4ed5da58e4b57e84074f15e9c27bb3fc1b535258c502517f3c7e1042ed74ffe4
MD5 4cceac45f92af80ab803a1f083c8bb16
BLAKE2b-256 3171a550e9f30e04ab3f03c1a1c044d828c4fb3d5f72ea04f53e569bc6ac764f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 101.5 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

File hashes

Hashes for python_rtmidi-1.4.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1791458d0dc4d3dd408b381d0b3613a09a99b1cf38fbe7b0fcb470616423a4b2
MD5 a148bd5c6787e7d05e8c37e24b5fed0a
BLAKE2b-256 5a944fdb53a7f82545a0c60f6c1f33afc7636405efc0641796c038c6d919418f

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.4.0-cp38-cp38-win32.whl.

File metadata

  • Download URL: python_rtmidi-1.4.0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 87.0 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

File hashes

Hashes for python_rtmidi-1.4.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 07ef73412820c08d0e5ed15927eb41f986efd5ccb23ad1065e7128d4275fe8b9
MD5 c6712294690f396e63e799f3919bce46
BLAKE2b-256 d33ddf7f16375e4e8f3f084b96b0e5ada6f9da087a972531583c31e1bf21e11d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.0-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 130.7 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

File hashes

Hashes for python_rtmidi-1.4.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e86fe9951340e10db66c21c5ae9e63d3249e70148e74cbeb37d16257e2f39f53
MD5 3cf995cdd6cb25836a7579e4f833ac04
BLAKE2b-256 71bd455f91e0df09c455c1a13a4c19d058410d262fc65e53c34598e0926c06b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 99.3 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

File hashes

Hashes for python_rtmidi-1.4.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 7cf3559bc9264d1ae3d85d636271df2a7beea0d6e2582a860513c8b272cfc46a
MD5 afc406d025acaa4936acc652640b9bb2
BLAKE2b-256 1628559c3f7377cd4ba7c10f2605a429e1493aac44f52c80b1b9cb9b457f9fee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 84.9 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

File hashes

Hashes for python_rtmidi-1.4.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 e74fd4e7fc4c783f41724ecd2b0a17cbd7792795145a654421c46c3bdb292f02
MD5 24c9099af2fee6863a0f5c06d26a3ec6
BLAKE2b-256 afdc747f8b34c16c58189cc4226e0d3fa8fdfb8c5d824d4d533edb94bc1c55c7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.0-cp37-cp37m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 235.4 kB
  • Tags: CPython 3.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for python_rtmidi-1.4.0-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 3fd151b801128bdedcffa3be4899a68958a0ad5a102d100a3f2bce7e01d42ced
MD5 ace8ccd1ab204db462f857e652a23213
BLAKE2b-256 509e1f4fc28f2432a5a1206628722700ffe3e9d381b09fdb017c95c39f16e1b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 99.0 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 fe763f863471b24c24b8d103dd52e4a0d1e55339a2cfde5e06d635a909c08719
MD5 892be2e39146a86cf1eec7ddb082367b
BLAKE2b-256 b983a29e134d6bc9d11361e347b6c875be7619842a39e13736d60e827530943d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.0-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 84.9 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 3e97028ae8039fe7d9b802a42105c771268ea8b57533441e5ec46a8dc8229984
MD5 2f0805427ed1edf627f279c6e79e346b
BLAKE2b-256 6b61b3fb03284c4edeecdbd50875bc2da4cc32f3d82ee1b23b2229d85cb06aad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.0-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 235.0 kB
  • Tags: CPython 3.6m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.0-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 3b5913e6a3126788578566312064e73c90b8819673aee9a39dc985fed17099f7
MD5 d733d6854c370cdaad5cf2ff00d98684
BLAKE2b-256 834ccb9151e6cfc24ff7cdb4e2c61b6630aea76fb5006700c4aaa2c2db9ba05a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.0-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 96.6 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.5.4

File hashes

Hashes for python_rtmidi-1.4.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 3fce8e85c4c09fd480fb976189c576377293ab120a32e330e7d5489e858dd427
MD5 d63a2cac3516242c7f5a4873312fa776
BLAKE2b-256 634f62460bffbd0fb07af906a8288a9e144ba8b49585004392ec3cc21319ee49

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.0-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 82.5 kB
  • Tags: CPython 3.5m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.5.4

File hashes

Hashes for python_rtmidi-1.4.0-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 da22994bef4aec2fd5adb14be80a8cfc3710fd8964204bbf5f33e257ea79442d
MD5 3487829ea9ab765a20ba7fea53827ff9
BLAKE2b-256 3976e6cd44f3aa0b455d8981d840ed0f8b55c6dfdddc19ed56fd1c33ca164fc7

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