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 3 (3.5, 3.6, 3.7, and 3.8).

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")

with midiout:
    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)
    time.sleep(0.1)

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

Uploaded Source

Built Distributions

python_rtmidi-1.4.2-cp38-cp38-win_amd64.whl (97.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

python_rtmidi-1.4.2-cp38-cp38-win32.whl (85.5 kB view details)

Uploaded CPython 3.8 Windows x86

python_rtmidi-1.4.2-cp38-cp38-macosx_10_9_x86_64.whl (127.2 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

python_rtmidi-1.4.2-cp37-cp37m-win_amd64.whl (95.0 kB view details)

Uploaded CPython 3.7m Windows x86-64

python_rtmidi-1.4.2-cp37-cp37m-win32.whl (83.1 kB view details)

Uploaded CPython 3.7m Windows x86

python_rtmidi-1.4.2-cp37-cp37m-macosx_10_6_intel.whl (234.2 kB view details)

Uploaded CPython 3.7m macOS 10.6+ intel

python_rtmidi-1.4.2-cp36-cp36m-win_amd64.whl (94.8 kB view details)

Uploaded CPython 3.6m Windows x86-64

python_rtmidi-1.4.2-cp36-cp36m-win32.whl (83.2 kB view details)

Uploaded CPython 3.6m Windows x86

python_rtmidi-1.4.2-cp36-cp36m-macosx_10_6_intel.whl (233.9 kB view details)

Uploaded CPython 3.6m macOS 10.6+ intel

python_rtmidi-1.4.2-cp35-cp35m-win_amd64.whl (92.2 kB view details)

Uploaded CPython 3.5m Windows x86-64

python_rtmidi-1.4.2-cp35-cp35m-win32.whl (80.8 kB view details)

Uploaded CPython 3.5m Windows x86

File details

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

File metadata

  • Download URL: python-rtmidi-1.4.2.tar.gz
  • Upload date:
  • Size: 247.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for python-rtmidi-1.4.2.tar.gz
Algorithm Hash digest
SHA256 3721ed3643f407cd96ad377cff0c2e28f2e8df0abbbe15a8a9668daae0b2b743
MD5 11fbbae2b3e7d511d607befea8a96aea
BLAKE2b-256 f03ed91c7d250c9285a31f3d2693ef1eb000e64a8ac6bac9eed0069df7d737cf

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.4.2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: python_rtmidi-1.4.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 97.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.0

File hashes

Hashes for python_rtmidi-1.4.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 c6f96ce85032f4ea78ba91c641e6d910b5847c9a429b7ef4242478e2960079ff
MD5 f568c2a798220eea9d1d11770e5ae0d4
BLAKE2b-256 add6c91ee40a1c774005214d7e677387e37ba684d95459ee34ef98e888f1e14f

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.4.2-cp38-cp38-win32.whl.

File metadata

  • Download URL: python_rtmidi-1.4.2-cp38-cp38-win32.whl
  • Upload date:
  • Size: 85.5 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.0

File hashes

Hashes for python_rtmidi-1.4.2-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 e9bf63fd93a2fca54781a6f1a5dc5a5e7fc965d0cf7b4c794abea28b600fbc55
MD5 07948176097b34138725aacdfc43fde0
BLAKE2b-256 bacca28a0036bdc730c2c35efb359a2892246775edb5aaf8302cc4549aeebdb4

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.4.2-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: python_rtmidi-1.4.2-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 127.2 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.1

File hashes

Hashes for python_rtmidi-1.4.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 75e59b7be66afaa94976d0395efb22a2977be9ff0fae6bdb1ed9ce0f42b69595
MD5 895aeaaa32d1c922f34a6f60a91a81ac
BLAKE2b-256 5ae932efedbf7dc404e7271aeacd7c13ad0ff1de3137ffbf1cfc819fba012b29

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 95.0 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.5

File hashes

Hashes for python_rtmidi-1.4.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 2a3cc68f9d4ed4b258b229700567d4a1a337024b617a6ae52079fdd9c16af8a4
MD5 3ae4b24115ebb1e9af75c0a995fbb39f
BLAKE2b-256 ead81eeeaeb847abc408909d0b4af1df7cf26fddea79adb0e350772342e976f3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.2-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 83.1 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.5

File hashes

Hashes for python_rtmidi-1.4.2-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 fda10b2847dffdcc440225ac8e6e5c9ce0e4834a1c5e63a760e5cac08598df3b
MD5 52bdfded54c8e6d5c6d532e67ec51038
BLAKE2b-256 9f8dcdc77a49a89ed325eb76833f68e8e7cf04bddd03246758a26ae13a2cb5c4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.2-cp37-cp37m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 234.2 kB
  • Tags: CPython 3.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.6

File hashes

Hashes for python_rtmidi-1.4.2-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 32fedd6dfc78023b5765221d1aa1f9fecc4c69e7c27fa06b091f4c4174219119
MD5 74dc8fce3978f05d48dd5377a65cccb3
BLAKE2b-256 1e451b9482dd8d7a2a36964f84a6f677b27849e4f9dd0d7d12e7ddf9c733efcd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.2-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 94.8 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 180fea4d35323e6dc2de397e15e213262aba1eb92f35d765ff9dda0978b764ec
MD5 9c8bfb570155c12740bd1dbacf92645f
BLAKE2b-256 d09730fa5e686f5c2cb10b40988f589d6b1b5b3212c79db3174d58b47246922c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.2-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 83.2 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.2-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 c4bad65e004fcbd7059a8557cb918f74bb8268e9704beae01b2881114e801552
MD5 fc08dbec5131cb8d7a0160fb77480f9a
BLAKE2b-256 bdd2a1df69ea6a28fa78e397c1dca688511d62c2f4c86b2d65c2772a8ff54543

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.2-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 233.9 kB
  • Tags: CPython 3.6m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.2-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 7bfa18894d154b038f7f1f873c05fa0cfc75614c6ba6171ae1d3a784e197fb16
MD5 6ef72bcedaac31bdfeb6018ddc26a9b8
BLAKE2b-256 189a9ea8a89cb8f6bd80d44119b79e3740c3693213a00b6d1f71a4cb8636b330

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.2-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 92.2 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.5.4

File hashes

Hashes for python_rtmidi-1.4.2-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 eb2b0ff69dcecaf73710073bded9e7cc39ab5f95105d59004f1e881ce3b6ae90
MD5 dfdbb78db42f70632d8c0cc979957066
BLAKE2b-256 c2bd86b69f528bd26427213451de133df1ef60d8e45ce7a3d7a6d665cb54e85d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.2-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 80.8 kB
  • Tags: CPython 3.5m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.5.4

File hashes

Hashes for python_rtmidi-1.4.2-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 e0a3a73ef42170ae074d0689c52af44a556d24feee7f264c93e589bc37737da7
MD5 50a0ee95e275e45fcb8d2b8b143c4262
BLAKE2b-256 9ec3c028e389de54aa94aa4f86b2634f90cfc2542d29039bce0b51117408b226

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