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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m Windows x86

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

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m Windows x86

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

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m Windows x86

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

Uploaded CPython 2.7m Windows x86-64

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

Uploaded CPython 2.7m Windows x86

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.1rc1-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.1rc1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 a2fad52fe160fac9bf6cb161319cde6072db9e95f044e9714b9b86fba0aa7e10
MD5 c13063e69ce3cefc55d1401b5471eba5
BLAKE2b-256 b6606610ef83fa31eefdbaac160a6627f1e6b9787eee4d73c576817712243641

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.1rc1-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 81.9 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.1rc1-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 2e60fb1be3352c5233fd3fe24485667f417410b8c496e6efb6bc56532d2131aa
MD5 d9452338af2f71bf5308eb13a0b7c9f7
BLAKE2b-256 f7b6bf0a8b9c0a55daf6bf5746bbd41f828512214334d8c5ee0eb70be949e8a7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.1rc1-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.1rc1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 5b1a0fa7d5ccaab85bf5bf2945cda2d5d1ba1919237403ac2efdd2aa5b14cc91
MD5 cdfc85603f66987771479fd6430649b6
BLAKE2b-256 0e08551bd77cc9705cdb9e952584ab3e177cd2f0510a2e9fda3aed5e548381a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.1rc1-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.1rc1-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 f20145143bea63b7c8b7571019c10114ecda706b9723168038388c001a1687f2
MD5 f6e273ac0c24d7e672eeecb23e06f97d
BLAKE2b-256 9afe95fdfe1d337c93f51cf817f5b3bcbee61696658038cbf8f69e9bba554cd1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.1rc1-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 93.1 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.1rc1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 043b0f7068d05ce708e7d49fd698baf2a91d7717cfdc32686e498fb741c843be
MD5 9a8ed488ef6dc11a39200ed2a4e9648c
BLAKE2b-256 15069df433ffb473e616957369f82951e94671e51f02280d0580c6c03bfc9043

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.1rc1-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.1rc1-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 a9716710e80308b2bf66a3936a982542753b47323f0a25be6f633055a7cb5f73
MD5 95fec6e13b1445c40e77eab62c004b87
BLAKE2b-256 e97e7e81cf67de65eed6464d260103b2d3af5212617368ac132ca323b6ed3afa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.1rc1-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 89.0 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.1rc1-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 897c23e4fdd812905e96eee3cfff455dc41e60c33e022b2bad707445ce62f62d
MD5 6dc6d72ab6f999c69bf4ca9720fcd769
BLAKE2b-256 46023b6a781083eedf7ea8386ea026139ff697d54b833844a43af7fcb116db54

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.2.1rc1-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.1rc1-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 1e1c2db3bba67ec9c1e89f15e5caec046a6b88ada5b3ff036f116c12047d776b
MD5 d71effcfbaa0b05c1f3b025941ec791c
BLAKE2b-256 48f605c95b060fd27d54668f64982005c3bdeb57e482c007e8e3979ef63f350b

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