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

Uploaded Source

Built Distributions

python_rtmidi-1.4.1-cp38-cp38-win_amd64.whl (102.5 kB view details)

Uploaded CPython 3.8 Windows x86-64

python_rtmidi-1.4.1-cp38-cp38-win32.whl (87.8 kB view details)

Uploaded CPython 3.8 Windows x86

python_rtmidi-1.4.1-cp38-cp38-macosx_10_9_x86_64.whl (132.7 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

python_rtmidi-1.4.1-cp37-cp37m-win_amd64.whl (100.2 kB view details)

Uploaded CPython 3.7m Windows x86-64

python_rtmidi-1.4.1-cp37-cp37m-win32.whl (85.9 kB view details)

Uploaded CPython 3.7m Windows x86

python_rtmidi-1.4.1-cp37-cp37m-macosx_10_6_intel.whl (239.1 kB view details)

Uploaded CPython 3.7m macOS 10.6+ intel

python_rtmidi-1.4.1-cp36-cp36m-win_amd64.whl (100.0 kB view details)

Uploaded CPython 3.6m Windows x86-64

python_rtmidi-1.4.1-cp36-cp36m-win32.whl (85.9 kB view details)

Uploaded CPython 3.6m Windows x86

python_rtmidi-1.4.1-cp36-cp36m-macosx_10_6_intel.whl (239.4 kB view details)

Uploaded CPython 3.6m macOS 10.6+ intel

python_rtmidi-1.4.1-cp35-cp35m-win_amd64.whl (97.6 kB view details)

Uploaded CPython 3.5m Windows x86-64

python_rtmidi-1.4.1-cp35-cp35m-win32.whl (83.5 kB view details)

Uploaded CPython 3.5m Windows x86

File details

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

File metadata

  • Download URL: python-rtmidi-1.4.1.tar.gz
  • Upload date:
  • Size: 246.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for python-rtmidi-1.4.1.tar.gz
Algorithm Hash digest
SHA256 07bfecdbd6f1abe11f57f4448cf1da29dc199daee16ee7e5a8db092a2d1c1e2c
MD5 a2e7ef4fd51d4ffcadefbe473466d615
BLAKE2b-256 e1e8b40f0bfc49618a95a61d16d67528ab35d0303acd761412c4e39e8a3325a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 102.5 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.0

File hashes

Hashes for python_rtmidi-1.4.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 31a6e852486937d2eb474b1a624ecb3961279603472641832573b320adf98bf7
MD5 8759eec1355061033709924badb6af45
BLAKE2b-256 c0c96baefadcd3340d7ac8e02705a73f15d28a0804dfca0b8debf7e900385cd0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.1-cp38-cp38-win32.whl
  • Upload date:
  • Size: 87.8 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.0

File hashes

Hashes for python_rtmidi-1.4.1-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 a171803d47772a9dc2410a09d84eb39500c759f31c98580b0eb4a3e0e198198a
MD5 ff434e81811d29018a206ebbc1f54299
BLAKE2b-256 859b93a9cfaabad4d7995b2373bc43ddffe18abea9d3e392d99e2e3d0b9de9b3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.1-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 132.7 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.1

File hashes

Hashes for python_rtmidi-1.4.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c9df96f9761990a6c19d957438b8a06d8714c46d0232cbb96b697581b9401b57
MD5 60cdc5e4b849fbc888235e87ecc1b279
BLAKE2b-256 06f758f7fe643d1f784fb940b13b07c4a35ec6ce91f8d79723cf93dd6a51d9e4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 100.2 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5

File hashes

Hashes for python_rtmidi-1.4.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 fdd5d257ce720f47e9d06b15120b1dea8772042c216771194203b5f5278db58a
MD5 91ca762536ea77e5f8327fbe3923fc77
BLAKE2b-256 312d8b2bb60082e88ff55cac3dce392c9c2d3ff057399621e518ba630cef5ab2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.1-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 85.9 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5

File hashes

Hashes for python_rtmidi-1.4.1-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 92846ee22529407ffdc68c613bcc45310dedfb307ee325150ba9748634704e0c
MD5 38dd859a9d31eeb4e032e13bcfd7fc37
BLAKE2b-256 376170f65f9d88d4fa0b4333d411208ae1e8f1e7b409886d8e703755c7bbf7b9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.1-cp37-cp37m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 239.1 kB
  • Tags: CPython 3.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6

File hashes

Hashes for python_rtmidi-1.4.1-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 25d9ca48062fdce6a9cc23584af0330eadb348c5e3234413ff223fd23b12f110
MD5 65a7cf8cf06d32faf15077270efca9db
BLAKE2b-256 b7fdcc0697bba50f8f93e28b0f0c32f6825c348bef63e74e7efbc46240f457e9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 100.0 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 16f6396b8000011bc812ca58f15d87689027c06f30e10a7d53015d0c689e94d4
MD5 44247b25a4c82b6e73908daa082fe2b4
BLAKE2b-256 f32cd00776b5d14a5f756463e6f0f4e33273e3c3cd0482098abd659df7a24efb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.1-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 85.9 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.1-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 b8acac2c25a2b5c52f47f5abb7fe30ed169ba34e4186026fbed29768d07ef253
MD5 887d63c8a4fa162ff0c7ff91e4c5dadb
BLAKE2b-256 1795a0f1de5129a2ccc19cf918c70ccc31577cd687caf36e9ca2a86464c3c24d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.1-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 239.4 kB
  • Tags: CPython 3.6m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.1-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 ffa11547cac8b49e4c55a1222b5c49cc62304f8cda816d9638395e18541e870e
MD5 7f7ac6ac08f4c71fe34f07fff46d9540
BLAKE2b-256 1dae26cf83c908387fbccbc6b2795f67387cb4aeaf657583ea2029b63fe96ef1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.1-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 97.6 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.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.5.4

File hashes

Hashes for python_rtmidi-1.4.1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 5cd46bfbe81913c48ec353130ac355fd83653a7e6c52a288e6c37627e480d42f
MD5 a896d7bcf5a57a536a3f621833d72e47
BLAKE2b-256 e97706b30a1a15306795932185fde77bd27a6461d1420919b65b33c21ab10ebc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.1-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 83.5 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.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.5.4

File hashes

Hashes for python_rtmidi-1.4.1-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 f9b17b293ef98dad3f0e8fc8cc63796b41a21513bbe532ac4f1188bb4b9998b9
MD5 a58694b58685dea90da5f33240bc97df
BLAKE2b-256 c84fc525dea7b006b5e81fb3764b84a57845fd0dcffc671b86ea1e5ae89c09c4

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