Skip to main content

A Python wrapper for the RtMidi C++ library written with 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), Macintosh OS X (CoreMIDI & JACK), and Windows (MultiMedia Library) operating systems.

python-rtmidi is a Python binding for RtMidi implemented with 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.3, 3.4, 3.5).

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 directory of the source distribution.

The documentation provides installation instructions and an API reference.

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.1.0.zip (219.6 kB view details)

Uploaded Source

Built Distributions

python_rtmidi-1.1.0-cp36-cp36m-win_amd64.whl (69.0 kB view details)

Uploaded CPython 3.6m Windows x86-64

python_rtmidi-1.1.0-cp36-cp36m-win32.whl (61.4 kB view details)

Uploaded CPython 3.6m Windows x86

python_rtmidi-1.1.0-cp36-cp36m-macosx_10_12_x86_64.whl (82.7 kB view details)

Uploaded CPython 3.6m macOS 10.12+ x86-64

python_rtmidi-1.1.0-cp35-cp35m-win_amd64.whl (69.0 kB view details)

Uploaded CPython 3.5m Windows x86-64

python_rtmidi-1.1.0-cp35-cp35m-win32.whl (61.4 kB view details)

Uploaded CPython 3.5m Windows x86

python_rtmidi-1.1.0-cp34-cp34m-win_amd64.whl (68.7 kB view details)

Uploaded CPython 3.4m Windows x86-64

python_rtmidi-1.1.0-cp34-cp34m-win32.whl (63.4 kB view details)

Uploaded CPython 3.4m Windows x86

python_rtmidi-1.1.0-cp27-cp27m-win_amd64.whl (67.9 kB view details)

Uploaded CPython 2.7m Windows x86-64

python_rtmidi-1.1.0-cp27-cp27m-win32.whl (57.5 kB view details)

Uploaded CPython 2.7m Windows x86

python_rtmidi-1.1.0-cp27-cp27m-macosx_10_12_x86_64.whl (82.5 kB view details)

Uploaded CPython 2.7m macOS 10.12+ x86-64

File details

Details for the file python-rtmidi-1.1.0.zip.

File metadata

  • Download URL: python-rtmidi-1.1.0.zip
  • Upload date:
  • Size: 219.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for python-rtmidi-1.1.0.zip
Algorithm Hash digest
SHA256 d82eb82e0b270f75375e3d5f9f45cb75950485700e6a3862192d0c121c802b0e
MD5 dac7edb268a8dcd454fbeeb19ac6fb07
BLAKE2b-256 49251a8b1290b51fb0d4a499c3285b635c005e30b8ff423fb116db61f3d80ca5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.1.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 8685ffc012e007f10ddb9ed04a3cf1648d26a8ef95bd261bfeca0b90d11c971f
MD5 73d2c9dcce399a69a5011023cb96bf3b
BLAKE2b-256 02801ebb0f984c4f5bce93807a535826cfd617e40609465e4a2a4cc57f8b2b02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.1.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 80c6d31508ec8435b4dc1d4a979aa6046edb83413a837b790f33f65f176ad018
MD5 38ad9749a8c3a86e89ed7dca177b8b1d
BLAKE2b-256 22a4f7889a3831be66ec17ce5b180e218d25bfaef794dce942ab7d18012c04eb

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.1.0-cp36-cp36m-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.1.0-cp36-cp36m-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1187b2a3703d4ede2b02c0fccd395648a3a468d3cd57d7932f445ef1bfa9fc5d
MD5 d8393bb0b0726b9b0f5c75c21b86ecfc
BLAKE2b-256 8765b4d714676120a2a0df93fa05771747d3408431878ff6701dd0c63ef0a767

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.1.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 7c82bed1b0cb5e11495bc3a779500c3d5cde6d84f68416f276622b0952174d25
MD5 28fc472df0c6de5a7bb80220e4f0faf0
BLAKE2b-256 20636b2cfdf22281a0059ec0cf086cfb2f2842521615b1d6852cba9b8d40bfa9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.1.0-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 c0f54d1e6dd1c04958130611d0fe6a821194175847d9f696824d011dffce2092
MD5 c599c6403336940f739a2d8da55b76c1
BLAKE2b-256 da8626574650e5d2dc46e2ad02f8a1287b6003af23245d592fd5a37c0c413045

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.1.0-cp34-cp34m-win_amd64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.1.0-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 659fb40e69cbc57cc7d970cd7bcd85e97ee2eb18992e147ed7bb690a83a7bd3f
MD5 f33be13f42f0cfdf6815c53879495cd7
BLAKE2b-256 32e0530e0836226da568893a4eb2af1140c02a8e26a10f87a280a30441d17d8b

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.1.0-cp34-cp34m-win32.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.1.0-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 5e1bb542ceebfd44290ecafa6367ade1a712cc9a73b61e843b2fa802105a2759
MD5 e4c74b44f6d52df52934402ea5096729
BLAKE2b-256 7c0b6fb1c8d1a00ae8347800b8a1fdfa06595fa952420b9ee6013fb878e950e5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.1.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 9d0fddaf38c4408e6f8466d6579ce3cf7b1da9a878f26454bc62fdf66228ea65
MD5 182713a391b73954cc28ad9ba40b7fcc
BLAKE2b-256 4f9425bcde66813b9c03634327fde6f8999e12a37a5bce3a5f4d35bab675ece3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.1.0-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 dfba865b1e7c7793c7d222b1922ac5f901f5545af71bf70e06d88a77482aa20c
MD5 7ed737f0315f25377c6fe0903d34b6e8
BLAKE2b-256 b96cc93fba2765368f9679d71bef67a4dd71de3af52d23e511b0863338823fee

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.1.0-cp27-cp27m-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.1.0-cp27-cp27m-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 887fd11551f77b27d566235916723b065c30d1e3959c9d665131a7919c012df2
MD5 ea9bb4da9754c825bc51426d3c5597f7
BLAKE2b-256 fded632433b26ef4d56b787d055f75dcc871f200893d00af7c0062eb6e22a246

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