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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m Windows x86

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

Uploaded CPython 3.7m macOS 10.6+ intel

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

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m Windows x86

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

Uploaded CPython 3.6m macOS 10.6+ intel

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

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m Windows x86

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

Uploaded CPython 2.7m Windows x86-64

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

Uploaded CPython 2.7m Windows x86

python_rtmidi-1.2.0-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.0.tar.gz.

File metadata

  • Download URL: python-rtmidi-1.2.0.tar.gz
  • Upload date:
  • Size: 228.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for python-rtmidi-1.2.0.tar.gz
Algorithm Hash digest
SHA256 8e7a50fff1b0bab16b71e19af17dfc91aad580d46ceb0bf36307555413a44d06
MD5 ce07360fa1ce54ee21349fc4d802b437
BLAKE2b-256 1314007a87de6b097fe0c46535d5f83f960baa16da5d33ea0020d5e9f0b6aa89

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.0-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.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 5eb0b5679e94717101641d8e3725d17dd2abd68f1c0d4b061315bf3192260268
MD5 f29b4d23aae3bd9b5cab25c920cd86fc
BLAKE2b-256 069eb81811108c4a1a1b5d1eea1a7b403c4bd91540989e2798534e5036e69f4c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.0-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.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 cbdc7dbeae1602e2681306116537373917f73d2fd82034413127d038ec611da2
MD5 05a41e877af0c8e32e968b5894fd8ab1
BLAKE2b-256 689dad926fc98cce5857b15fe6443ab8f8e9d794b106a445d258a95c3a06f522

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.0-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.0

File hashes

Hashes for python_rtmidi-1.2.0-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 37f56d4a7697a043fda23d3429b92484eeed3d347ae9da0fbe72b595bab331e8
MD5 6cd3f205aa1c4964287a2209d02ea8e4
BLAKE2b-256 bfad8b49c68a0e3636a0215e374edf92493a72d2b330810b395cd0b6e9eb8e2c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.0-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.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 d7c343325377c73a02ed67a8ad95b56a6527aada76118a58d378722503ee8ccf
MD5 f6c746fa1b3721d79cd33902837a4867
BLAKE2b-256 3bb6fc92ae76ad766d0c2e19fc0dc291d3d4015e61b4468314a996b666c33b13

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.0-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.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 b1f2a4ee3198713e83fb1f173e112daec424779b96ce47565e1bd2f332a13aa7
MD5 7101175d3402fa12e020e8351cc77935
BLAKE2b-256 21d180e9d66b3661a4aabc48d2ce84bfda66417e90b2991e30294792f9b7995a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.0-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.6

File hashes

Hashes for python_rtmidi-1.2.0-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 438beaa92edd6afe22f92cc00b10301b53717cebd3ce2e49fd95ece7f68c24c2
MD5 ce1ef4e139dfb902ed85d916d824ffe9
BLAKE2b-256 04590f3bbab240e43eabcdf36c1bf74a056d6de4c6ed9115f1c13ab589ff8c98

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.0-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.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 8cfb71213eeebc674a076aa457bf7346c3295bb1b73a3b5eb4b6462f4418cab7
MD5 1283037df13ffaa5855ba3e23b9607d1
BLAKE2b-256 dbd8c13fc28209b3496a0d634625c26aada879515b017efe33ba77f2efb3e241

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.0-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.0-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 450b47c3f1230d6db2ac904b2a6ba7201538a9a71ae73a0257597b32fcd00279
MD5 2e2f3a832baee720d3136b91e22a544f
BLAKE2b-256 2d94574d6fdb0a8d6329dcdcf74c9924ec657f18922689e82047808b64de3644

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.0-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.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 15c35ac752fef475ef6870631cdac7155b965b88666c75146cdb48b231999740
MD5 4cb54d4f89de277c6adb78f306b5b718
BLAKE2b-256 17d23fd371ccb8fc640c57ddd6a6267da1598aec3750345ddefe2acb0ec85263

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.0-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.0-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 a859511b91ed9a575a96c6117c2baa2acfb1719a5a911f414c96ed9bd2c602b9
MD5 340ff1e0a921a7b2246f9b4b0bbc055a
BLAKE2b-256 c0ce590cc9b88938b2eb8a3d898f0e22a9fea1fec657518a73d2b1681febf9f8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.0-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.0-cp27-cp27m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 2eb82b9e0c972375ff2395dd1fc0ea9d0f5d80062b662d406a6217c8310d2640
MD5 3bc7377c2e9b2c20a476b8811175588d
BLAKE2b-256 79624d1914b7d6cb0a7a3c69f3a3d11b481d0d0d379fb870f204f4d70fbcfe16

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