Skip to main content

A Python binding for the RtMidi C++ library implemented using Cython.

Project description

Welcome to python-rtmidi!

A Python binding for the RtMidi C++ library implemented using Cython.

Latest version Project status MIT License Python versions Distribution format Travis CI status

Overview

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.6, 3.7, 3.8, and 3.9).

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.

The source code repository and issue tracker are hosted on GitHub:

https://github.com/SpotlightKid/python-rtmidi.

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.

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

Uploaded Source

Built Distributions

python_rtmidi-1.4.9-cp39-cp39-win_amd64.whl (98.5 kB view details)

Uploaded CPython 3.9 Windows x86-64

python_rtmidi-1.4.9-cp39-cp39-win32.whl (86.5 kB view details)

Uploaded CPython 3.9 Windows x86

python_rtmidi-1.4.9-cp39-cp39-macosx_10_9_x86_64.whl (127.1 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

python_rtmidi-1.4.9-cp38-cp38-win_amd64.whl (96.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

python_rtmidi-1.4.9-cp38-cp38-win32.whl (84.4 kB view details)

Uploaded CPython 3.8 Windows x86

python_rtmidi-1.4.9-cp38-cp38-macosx_10_9_x86_64.whl (126.5 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

python_rtmidi-1.4.9-cp37-cp37m-win_amd64.whl (94.0 kB view details)

Uploaded CPython 3.7m Windows x86-64

python_rtmidi-1.4.9-cp37-cp37m-win32.whl (82.0 kB view details)

Uploaded CPython 3.7m Windows x86

python_rtmidi-1.4.9-cp37-cp37m-macosx_10_9_x86_64.whl (126.7 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

python_rtmidi-1.4.9-cp36-cp36m-win_amd64.whl (93.8 kB view details)

Uploaded CPython 3.6m Windows x86-64

python_rtmidi-1.4.9-cp36-cp36m-win32.whl (82.1 kB view details)

Uploaded CPython 3.6m Windows x86

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

Uploaded CPython 3.6m macOS 10.6+ intel

File details

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

File metadata

  • Download URL: python-rtmidi-1.4.9.tar.gz
  • Upload date:
  • Size: 251.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.3

File hashes

Hashes for python-rtmidi-1.4.9.tar.gz
Algorithm Hash digest
SHA256 bfeb4ed99d0cccf6fa2837566907652ded7adc1c03b69f2160c9de4082301302
MD5 181d539001919f39714f7d6f4975ca8b
BLAKE2b-256 92bf749468bc43f85ec77f37154327360ba82e7d0ae622341eab44a6d75751c3

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.4.9-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: python_rtmidi-1.4.9-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 98.5 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1

File hashes

Hashes for python_rtmidi-1.4.9-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 54d40cb794a6b079105bfb923ab0b4d5f041e9eef5dc5cce25480e4c3e3fc2f6
MD5 99f9584c9155dc917d5181bb3f4edeb6
BLAKE2b-256 2eb5e118bf9d210ffdf82b58b9f2bd30219621e19256296d01a60fac84441063

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.4.9-cp39-cp39-win32.whl.

File metadata

  • Download URL: python_rtmidi-1.4.9-cp39-cp39-win32.whl
  • Upload date:
  • Size: 86.5 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1

File hashes

Hashes for python_rtmidi-1.4.9-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 2286ab096a5603430ab1e1a664fe4d96acc40f9443f44c27e911dfad85ea3ac8
MD5 fac7b845104b63303ab6a084b734f740
BLAKE2b-256 71066c650c2e21bfa642d13a96f0ee210e705f0b2fdb75a675864f9e450f07fb

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.4.9-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: python_rtmidi-1.4.9-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 127.1 kB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.0

File hashes

Hashes for python_rtmidi-1.4.9-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 04bd95dd86fef3fe8d72838f719d31875f107a842127024bfe276617961eed5d
MD5 9c7d64295107e19ad98763f88604cd89
BLAKE2b-256 40466d805e8b145c08294e1bdb19b91133e5e279f86d2048218f178555d455ae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.9-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 96.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.0

File hashes

Hashes for python_rtmidi-1.4.9-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 69907663e0f167fcf3fc1632a792419d0d9d00550f94dca39370ebda3bc999db
MD5 c3473b437f22803d1e4f6083d9788c35
BLAKE2b-256 65e582275aa174bb07123e9154da4feeae901f238dea03e685eaf26ef8f41024

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.9-cp38-cp38-win32.whl
  • Upload date:
  • Size: 84.4 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.0

File hashes

Hashes for python_rtmidi-1.4.9-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 7d27d0a70e85d991f1451f286416cf5ef4514292b027155bf91dcae0b8c0d5d2
MD5 63aa98e1ea20600e0d640ca6a9b16144
BLAKE2b-256 f66936256c523b25baf5e02e30d9df2f1ad87403299721c785cd195a43fe7996

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.9-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 126.5 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.6

File hashes

Hashes for python_rtmidi-1.4.9-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5dad7a28035eea9e24aaab4fcb756cd2b78c5b14835aa64750cb4062f77ec169
MD5 dac8f451f36b451611477dfde5d50af3
BLAKE2b-256 6f9c00bea0b76417b85afb99eaf8bad54bff0ead587d0f40e7f7c0f0f592f105

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.9-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 94.0 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.5

File hashes

Hashes for python_rtmidi-1.4.9-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 3d4b7fdb477d8036d51cce281b303686114ae676f1c83693db963ab01db11cf5
MD5 5bbc388cfc9f7fc1ce45f5d4d1b5e4e4
BLAKE2b-256 de671a428f8441142eee88ea03bb9192c5e223e31c543e6ca78d8a2019c40c55

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.9-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 82.0 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.5

File hashes

Hashes for python_rtmidi-1.4.9-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 0f5409e1b2e92cfe377710a0ea5c450c58fda8b52ec4bf4baf517aa731d9f6a6
MD5 796faf1b545298d1b9a2a9d1ad545fef
BLAKE2b-256 90bd0e3446978f4a3cd0635a321c01c3d3c84d7266976b4c7c0ff050103ae188

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.4.9-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: python_rtmidi-1.4.9-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 126.7 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for python_rtmidi-1.4.9-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d201516bb1c64511e7e4de50533f6b828072113e3c26f3f5b657f11b90252073
MD5 033af13947057dccf642339e1b854ac0
BLAKE2b-256 9924fc843187a27c82f833afac3c1379e9b8dd596df01666e9cacfcab796d8f8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.9-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 93.8 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.9-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 4d75788163327f6ac1f898c29e3b4527da83dbc5bab5a7e614b6a4385fde3231
MD5 2239421e9aac88f4d90e87c7b2390533
BLAKE2b-256 f199d2ca37edc52f0e0755b69cbc44e147e9a1236d87f7d01b00f5bcd27dfe1b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.9-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 82.1 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.9-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 6f495672ec76700400d4dff6f8848dbd52ca60301ed6011a6a1b3a9e95a7a07e
MD5 679e92bc412e2d8862b8e00fd71b1470
BLAKE2b-256 e004a4ca278a58e9823aaedead4567fa84ed54d4f55d26e0848afe9a0903f93b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.9-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.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.9-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 8f7e154681c5d6ed7228ce8639708592da758ef4c0f575f7020854e07ca6478b
MD5 f58b1dcc0f8c67676d8993cf91d6340d
BLAKE2b-256 c59aa35b9cd4e12e0d08ba36faa2aad97bac2a193e41bdea8e20372684272ded

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