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.6, 3.7, 3.8, and 3.9).

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.

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

Uploaded Source

Built Distributions

python_rtmidi-1.4.8-cp39-cp39-win32.whl (86.5 kB view details)

Uploaded CPython 3.9 Windows x86

python_rtmidi-1.4.8-cp39-cp39-macosx_10_9_x86_64.whl (126.8 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

python_rtmidi-1.4.8-cp38-cp38-win_amd64.whl (96.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

python_rtmidi-1.4.8-cp38-cp38-win32.whl (84.4 kB view details)

Uploaded CPython 3.8 Windows x86

python_rtmidi-1.4.8-cp38-cp38-macosx_10_9_x86_64.whl (126.3 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

python_rtmidi-1.4.8-cp37-cp37m-win_amd64.whl (94.0 kB view details)

Uploaded CPython 3.7m Windows x86-64

python_rtmidi-1.4.8-cp37-cp37m-win32.whl (82.0 kB view details)

Uploaded CPython 3.7m Windows x86

python_rtmidi-1.4.8-cp37-cp37m-macosx_10_9_x86_64.whl (126.5 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

python_rtmidi-1.4.8-cp36-cp36m-win_amd64.whl (93.8 kB view details)

Uploaded CPython 3.6m Windows x86-64

python_rtmidi-1.4.8-cp36-cp36m-win32.whl (82.1 kB view details)

Uploaded CPython 3.6m Windows x86

python_rtmidi-1.4.8-cp36-cp36m-macosx_10_6_intel.whl (233.1 kB view details)

Uploaded CPython 3.6m macOS 10.6+ intel

File details

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

File metadata

  • Download URL: python-rtmidi-1.4.8.tar.gz
  • Upload date:
  • Size: 255.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.3

File hashes

Hashes for python-rtmidi-1.4.8.tar.gz
Algorithm Hash digest
SHA256 319e9fbb84cf3f4d657255dc37fbfc6ce9a3ccd1f883bc488f783749b9f27a41
MD5 2cf172ee016de769ef0ddc136fe2a2db
BLAKE2b-256 4e6bc00278ee5561c5c2c785d1cffa9a462ed6dc6b12dbe66d833b030dd17d88

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.4.8-cp39-cp39-win32.whl.

File metadata

  • Download URL: python_rtmidi-1.4.8-cp39-cp39-win32.whl
  • Upload date:
  • Size: 86.5 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1

File hashes

Hashes for python_rtmidi-1.4.8-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 af83f364e4cad53e021c9b4843cf4852810bec21830579ddf5f13c4ca3d2571a
MD5 2909ded2527f2f14221792056456c107
BLAKE2b-256 ac19b3228e75f9546c052c24955747d418dce8ce7f047e091ed8049217ebc7e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.8-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 126.8 kB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.0

File hashes

Hashes for python_rtmidi-1.4.8-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 644ad12607f720c5bd0ddd53527f397e0d32bbcc21dd743b2f695cb68607497d
MD5 cfabe5642307a0abf9aef44797302886
BLAKE2b-256 7b58107004e9107b5d45c52d0052e8011d0abc0d4d43f4339554a698fe943de4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.8-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 96.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.0

File hashes

Hashes for python_rtmidi-1.4.8-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 192fe6f3c4a830eb3fd6b15c153da175e8d20d6e2c26f47ae45ca275dbef3911
MD5 ca518560088005108634910ea66a893a
BLAKE2b-256 969d19127e9a635c9494a8a62a282ace601cfa40fd94b4914aa66be52916e4a4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.8-cp38-cp38-win32.whl
  • Upload date:
  • Size: 84.4 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.0

File hashes

Hashes for python_rtmidi-1.4.8-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 001654f1d6aaa770fa5585bc519ac8b064ab8ce7cf44f3aaef912691d7d886b1
MD5 1c62a623c2dc1f6bbcdea6a1c6ada6cf
BLAKE2b-256 729bd3fd7d70a5576dd65c6b115c8503e64a00a98862fc7a3ebecee6d199f180

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.8-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 126.3 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.6

File hashes

Hashes for python_rtmidi-1.4.8-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 71de504f117d8fdb686df214dee76937dfff07c4e690409ad3e613e218ab62bf
MD5 10f0400de47a1b97a77ce57b454ed269
BLAKE2b-256 4f486f9970042f385725ef2582238ac594636d82f09a5910b56e1e131c07989a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.8-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 94.0 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.5

File hashes

Hashes for python_rtmidi-1.4.8-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 2936699fa127182154b8cc65cbe4e9a4938a79a7b429fb2adce7ce0e4a0b5568
MD5 9769ab93ec9447eba4071e23ca03181a
BLAKE2b-256 d474d01e2432d3bf41ad71d9fb8c88d72052e29fa1a45aaae25b42634b5bb185

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.8-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 82.0 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.5

File hashes

Hashes for python_rtmidi-1.4.8-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 a2b0ac9ef82cfbf1f8f7fa46af8837dbda69736614ee659f27d2ba74f40bf060
MD5 06f6950e78378ccf6f680ffc2e1bc063
BLAKE2b-256 dffb52e8ccbcf640b867bd3f7261d345042e5ff860c8fbc4891fcb81baaa7bdd

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.4.8-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: python_rtmidi-1.4.8-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 126.5 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for python_rtmidi-1.4.8-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e802ff7be71e1e5557185b2930a18a5051a7914cec45155a9d1f4d12aefce014
MD5 fa2b6c364e85fefa860e92e26c7284d7
BLAKE2b-256 12b90eebd782ab7846a82d34668228cb9fb8d04b64d94d0aab3e6fe68fbc5921

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.8-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 93.8 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.8-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 98931bcaa2538d55776f9f4b6a73021786c8e94d19a313c9485e03ddb29e3ae5
MD5 5d879583683a0dc3bae066bc9a1ec693
BLAKE2b-256 45dcfdf20aac05c7278c20749a4697b1bb98c57dc2b0a8cdc13fdeb801ae744d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.8-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 82.1 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.8-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 73f726f0dd1b14eedb12c5a15ab1bdb4144059861af9ecaa69ba43e7835f04c3
MD5 36f71b307d3e6ee297ebb50d9e3f3942
BLAKE2b-256 cbe64737cec05dd6d447406b44ddc24a402678fbc45a56a1843a2ff79ae05cab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.8-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 233.1 kB
  • Tags: CPython 3.6m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.8-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 25ff79e516d232f48f3f034e9fd93f258432549e55edff02620f39e57cb55d30
MD5 b348805b4ccc45565f008b4cd52023df
BLAKE2b-256 51ef3fb9779e0db34dfcc7228d7cf4c97753ca4a389ed97b775aef0ed42381dd

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