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

Uploaded Source

Built Distributions

python_rtmidi-1.3.0-cp37-cp37m-win_amd64.whl (97.4 kB view details)

Uploaded CPython 3.7m Windows x86-64

python_rtmidi-1.3.0-cp37-cp37m-win32.whl (83.4 kB view details)

Uploaded CPython 3.7m Windows x86

python_rtmidi-1.3.0-cp37-cp37m-macosx_10_6_intel.whl (229.9 kB view details)

Uploaded CPython 3.7m macOS 10.6+ intel

python_rtmidi-1.3.0-cp36-cp36m-win_amd64.whl (97.3 kB view details)

Uploaded CPython 3.6m Windows x86-64

python_rtmidi-1.3.0-cp36-cp36m-win32.whl (83.4 kB view details)

Uploaded CPython 3.6m Windows x86

python_rtmidi-1.3.0-cp36-cp36m-macosx_10_6_intel.whl (230.1 kB view details)

Uploaded CPython 3.6m macOS 10.6+ intel

python_rtmidi-1.3.0-cp35-cp35m-win_amd64.whl (95.1 kB view details)

Uploaded CPython 3.5m Windows x86-64

python_rtmidi-1.3.0-cp35-cp35m-win32.whl (81.2 kB view details)

Uploaded CPython 3.5m Windows x86

python_rtmidi-1.3.0-cp27-cp27m-win_amd64.whl (90.7 kB view details)

Uploaded CPython 2.7m Windows x86-64

python_rtmidi-1.3.0-cp27-cp27m-win32.whl (78.2 kB view details)

Uploaded CPython 2.7m Windows x86

python_rtmidi-1.3.0-cp27-cp27m-macosx_10_6_intel.whl (209.7 kB view details)

Uploaded CPython 2.7m macOS 10.6+ intel

File details

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

File metadata

  • Download URL: python-rtmidi-1.3.0.tar.gz
  • Upload date:
  • Size: 233.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for python-rtmidi-1.3.0.tar.gz
Algorithm Hash digest
SHA256 61e9d1c1f1202a1577f06644948af985427030984ff956970a22b50f080d4c2d
MD5 aa7e8c3cf3dbfe623bcedfb1e9c8420a
BLAKE2b-256 affb705cbdc6f27bdb428f57f4751034665798ca166fad7acb57a28a148a1549

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 97.4 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for python_rtmidi-1.3.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 f32074ae6fefe43ab37c5ab8a52a1b2133ab488a43c6dfe256de1dd693d5bf7c
MD5 d9b0ea5048c8ac552b04651fc38487f0
BLAKE2b-256 6ffcd20877198b0e74da09119e5ca41d20530c6598ca27e198ad2f80168be05f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 83.4 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for python_rtmidi-1.3.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 178fbd5b648c7df2290567090c74eb721d5c547b9261a3509c228bb4be2ada24
MD5 fdd3182d4737b41a261251386b64917c
BLAKE2b-256 2fae89f5bc9302be5490ef3b00b088727779b50201d6019f136161b808933802

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.0-cp37-cp37m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 229.9 kB
  • Tags: CPython 3.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for python_rtmidi-1.3.0-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 de3b919715d3e86ff4fdf3077934a6932611cc28f40bd89ea97e44c387e61dbb
MD5 fa9067ebe8e334b649da55b3a1a74ea7
BLAKE2b-256 7af5c57219a27adbb9c2abc5c2be8504a77d53d78b622b41e153dc531fa3d1d8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 97.3 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.3.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 db2031d4ec4429fae3dffaadb0d2bf46e764b009581fc27ef1c94224e95a3ed5
MD5 22777cb7ffc67822e4b9fc525dc50960
BLAKE2b-256 3d1368359bb0f6b75a0619a990fafa3f9a35d264d2388277e1be13fab96b9978

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.0-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 83.4 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.3.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 a5aaba71160f43223bd2e9ffcc99951b682d6fd50370916ccb55354625a81cd7
MD5 af69080f1042bbd885aab2284d0c3266
BLAKE2b-256 1509fffbee5b339aea493b3024314b2b70d7aeaa85961bce26077810310f92d1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.0-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 230.1 kB
  • Tags: CPython 3.6m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.3.0-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 7de81e8c807fbc8c2af3890a970ebe38994c031a15b0b8ef64e622bdec1116a9
MD5 e953fbbcfad50dfe7879c211df3d8692
BLAKE2b-256 a7e860472beaa24469aa7aa9a7bf218eddd9d593b6c8a35640d8de0c6a306841

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.0-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 95.1 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.4

File hashes

Hashes for python_rtmidi-1.3.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 cbd7f4ca4a950776ee1b9aee66a9d03cbc1f8576135699373d2c5d690970a80f
MD5 72eac5be2911b5a036831f4084883aa6
BLAKE2b-256 a8ba6b8a5e22f139ae14beba23206841649500d39aedb1235019d8c8c2464f1b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.0-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 81.2 kB
  • Tags: CPython 3.5m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.4

File hashes

Hashes for python_rtmidi-1.3.0-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 cf4fce7eb13bf5e276c7357bd5db31decdee7f5e5746848b3aa56f3f325dfdcc
MD5 a7b7b93954b7ba79a424d01ce9ebeb72
BLAKE2b-256 fac112176458dbbf253a23817989b1f6d7913c915f7d86b3f39b1e2dbfaa04e0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.0-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 90.7 kB
  • Tags: CPython 2.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15

File hashes

Hashes for python_rtmidi-1.3.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 171eaa08fe9b7efefbf1ff9edd9f4ace4c588e6771bf33f75f301d071ba72b20
MD5 0ab3f7b2533eeda115e39874b1edc1e3
BLAKE2b-256 72e25bd7e426b0ae1a3adcb4e7ee65dc1f75e9c66b7e82417f912fea3fc2627c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.0-cp27-cp27m-win32.whl
  • Upload date:
  • Size: 78.2 kB
  • Tags: CPython 2.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15

File hashes

Hashes for python_rtmidi-1.3.0-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 4390763bdfc27e3b6e5cd3ba8a44d3a7b5ff5af37f4e06124939548ad93fe5f1
MD5 0511651d25681526e2d8d00f2c8709d1
BLAKE2b-256 73869f15cf8addfff66db1c6e66894fdcf883d4f8e81463c11beae4b6492e3a7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.0-cp27-cp27m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 209.7 kB
  • Tags: CPython 2.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15

File hashes

Hashes for python_rtmidi-1.3.0-cp27-cp27m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 f108d55feebcdf537ab435557e29bc0c77f685daddc7b665223222e4914ef9d1
MD5 8b21d978b5de05494f1180be7a40524c
BLAKE2b-256 169279fae4b64be79cade505da45e017099aa58483f157852d82058ba65877c4

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