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

Uploaded Source

Built Distributions

python_rtmidi-1.2.1-cp37-cp37m-win_amd64.whl (95.5 kB view details)

Uploaded CPython 3.7m Windows x86-64

python_rtmidi-1.2.1-cp37-cp37m-win32.whl (81.8 kB view details)

Uploaded CPython 3.7m Windows x86

python_rtmidi-1.2.1-cp37-cp37m-macosx_10_6_intel.whl (223.4 kB view details)

Uploaded CPython 3.7m macOS 10.6+ intel

python_rtmidi-1.2.1-cp36-cp36m-win_amd64.whl (95.4 kB view details)

Uploaded CPython 3.6m Windows x86-64

python_rtmidi-1.2.1-cp36-cp36m-win32.whl (81.9 kB view details)

Uploaded CPython 3.6m Windows x86

python_rtmidi-1.2.1-cp36-cp36m-macosx_10_6_intel.whl (223.5 kB view details)

Uploaded CPython 3.6m macOS 10.6+ intel

python_rtmidi-1.2.1-cp35-cp35m-win_amd64.whl (93.0 kB view details)

Uploaded CPython 3.5m Windows x86-64

python_rtmidi-1.2.1-cp35-cp35m-win32.whl (79.7 kB view details)

Uploaded CPython 3.5m Windows x86

python_rtmidi-1.2.1-cp27-cp27m-win_amd64.whl (88.9 kB view details)

Uploaded CPython 2.7m Windows x86-64

python_rtmidi-1.2.1-cp27-cp27m-win32.whl (76.7 kB view details)

Uploaded CPython 2.7m Windows x86

python_rtmidi-1.2.1-cp27-cp27m-macosx_10_6_intel.whl (203.6 kB view details)

Uploaded CPython 2.7m macOS 10.6+ intel

File details

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

File metadata

  • Download URL: python-rtmidi-1.2.1.tar.gz
  • Upload date:
  • Size: 228.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.1

File hashes

Hashes for python-rtmidi-1.2.1.tar.gz
Algorithm Hash digest
SHA256 024a7a466c5b97f8fbbbcb2a6c968f10f4344f348a318188c3c0a7ae5f3e1b19
MD5 614879e2f51b9d9bfb72109de7369149
BLAKE2b-256 89858065fcfe81b5bd74e8ac13d954fb7cc3f2a4e3173505c02881b8ad53e087

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 95.5 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.0

File hashes

Hashes for python_rtmidi-1.2.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 308fc922fd1e0f110bab6091e899e1d5fccbc8889a423de82bbd0999ea2258d0
MD5 50f9574081210ec56ca4949f2007330e
BLAKE2b-256 07bd09888ee584b67c4b0975842887f1c751608f2c35cfd5e46f0094d0c78750

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.1-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 81.8 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.0

File hashes

Hashes for python_rtmidi-1.2.1-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 b0dc5b6a8f0bee92200425056dd2d753042ba5386feb316b0c8d7fb9d4ea19f8
MD5 cd5e4e75b8aae62c8a6ce42fef80190c
BLAKE2b-256 5cb54b39c154a727fb3adedebaf0ab07bea94ec927ae39c6997c5cc644ca0ec7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.1-cp37-cp37m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 223.4 kB
  • Tags: CPython 3.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.2

File hashes

Hashes for python_rtmidi-1.2.1-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 a9b444eb0706eed6de4fb81f2a08df2b7b5b62ee304bcf95d3e65c8cbaf7c789
MD5 5315080a186e22b1df7748aa47951b6d
BLAKE2b-256 acdd71299d7477c677818515973499ae0bcd0edb54bbecbfc9774dab2a439dec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 95.4 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.6

File hashes

Hashes for python_rtmidi-1.2.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 dee4fbe88a5d7b124de3f91831804fb31a92ec13ace6ab192d1ea76143d2a261
MD5 55cff0a5956db96637b5d5e754ca509a
BLAKE2b-256 90743e078379eb80a09f32d3e66d9a3728b3e7a39a99552706e30d54f5d7ae8b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.1-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 81.9 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.6

File hashes

Hashes for python_rtmidi-1.2.1-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 542970637ece4183c5160285661ae71246c80fc37e8d69edaee507c768a65af8
MD5 c81220850ee9219fbc45b2e0b73fdf76
BLAKE2b-256 5a7dcdae6f374258dae02c53b1f01c906485f2e60763613625f9ad4b2677c488

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.1-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 223.5 kB
  • Tags: CPython 3.6m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.2.1-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 31a4031f75e38d7257476c8abed1c8466ee04f65e9bd4380c581f5e394c85a0f
MD5 00dbca7e2db50180b835adccd30a8e74
BLAKE2b-256 f79d1adbf0c56072a12feaf34e67e3ddfece1d5d387efa156a4d12c2c58b1eaf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.1-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 93.0 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.5.4

File hashes

Hashes for python_rtmidi-1.2.1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 7e82585912e0f68a6561ea95c981cc6669d00744bc9ac48fb094cfa595411d3a
MD5 128ee9a4e6c71f219102478ff84d4a86
BLAKE2b-256 5c128068908cc07b8ac634216b41544f2c6b72971588362845a0aba6dbd5c4a1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.1-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 79.7 kB
  • Tags: CPython 3.5m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.5.4

File hashes

Hashes for python_rtmidi-1.2.1-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 136a6ab2ca38ce97324266411c47cb1004fb0a84c35946d52579c1c66acf4aa6
MD5 844fe504473f6905f11eb7c3a9c9be6b
BLAKE2b-256 5c2e3ecc0a2e39c8a1adc2b04a9c275d7251b06254a1cf658c46a119b6e39c42

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.1-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 88.9 kB
  • Tags: CPython 2.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15

File hashes

Hashes for python_rtmidi-1.2.1-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 b240d10966debe6fcbe6f5bb5d20ccaad128fc1c5732a88ad8ad82094759ee8c
MD5 6725ef7a0bf79d40383442415050751d
BLAKE2b-256 95c353423185dea69ba0a22a658e12aa3ecf1a73e77f78c4117b39564a52a545

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.1-cp27-cp27m-win32.whl
  • Upload date:
  • Size: 76.7 kB
  • Tags: CPython 2.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15

File hashes

Hashes for python_rtmidi-1.2.1-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 78ace337b36e94a2a83bcb4e3cc80d1a45f740ace0978b60d689bdd9c870eaf0
MD5 d00737f4c1c4325fe040e558a09cf2ec
BLAKE2b-256 35330e0935850bb559471cff5f64578ead729e01898d3e3b389eab5db20221ef

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.1-cp27-cp27m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 203.6 kB
  • Tags: CPython 2.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15

File hashes

Hashes for python_rtmidi-1.2.1-cp27-cp27m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 c4137111ce8cca60c959f00e592087d343c1c8a036b687c72f7e4c33ca982a92
MD5 7d47304afb3dbe2fb38e3896f852b20e
BLAKE2b-256 9e46e059583fd58e7d8c8f47b99ce0f12e2b0c1a7f7c44629e05df6fb6958fcf

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