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

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

Uploaded Source

Built Distributions

python_rtmidi-1.3.1-cp37-cp37m-win_amd64.whl (99.1 kB view details)

Uploaded CPython 3.7m Windows x86-64

python_rtmidi-1.3.1-cp37-cp37m-win32.whl (84.7 kB view details)

Uploaded CPython 3.7m Windows x86

python_rtmidi-1.3.1-cp37-cp37m-macosx_10_6_intel.whl (234.9 kB view details)

Uploaded CPython 3.7m macOS 10.6+ intel

python_rtmidi-1.3.1-cp36-cp36m-win_amd64.whl (98.8 kB view details)

Uploaded CPython 3.6m Windows x86-64

python_rtmidi-1.3.1-cp36-cp36m-win32.whl (84.7 kB view details)

Uploaded CPython 3.6m Windows x86

python_rtmidi-1.3.1-cp36-cp36m-macosx_10_6_intel.whl (234.5 kB view details)

Uploaded CPython 3.6m macOS 10.6+ intel

python_rtmidi-1.3.1-cp35-cp35m-win_amd64.whl (96.4 kB view details)

Uploaded CPython 3.5m Windows x86-64

python_rtmidi-1.3.1-cp35-cp35m-win32.whl (82.4 kB view details)

Uploaded CPython 3.5m Windows x86

python_rtmidi-1.3.1-cp27-cp27m-win_amd64.whl (92.7 kB view details)

Uploaded CPython 2.7m Windows x86-64

python_rtmidi-1.3.1-cp27-cp27m-win32.whl (79.3 kB view details)

Uploaded CPython 2.7m Windows x86

python_rtmidi-1.3.1-cp27-cp27m-macosx_10_6_intel.whl (213.1 kB view details)

Uploaded CPython 2.7m macOS 10.6+ intel

File details

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

File metadata

  • Download URL: python-rtmidi-1.3.1.tar.gz
  • Upload date:
  • Size: 237.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4

File hashes

Hashes for python-rtmidi-1.3.1.tar.gz
Algorithm Hash digest
SHA256 f9d2a1b5374b2e6856006537b6d4d5ceed4db4c4ee60caec4af83707a78297e4
MD5 56b3a1fd3683fdcd9d821512e36e9de3
BLAKE2b-256 1e6147cc917a9e2210e6536732709bff46f967878748ae4f13e3501147f8fae8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 99.1 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for python_rtmidi-1.3.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 bee33b8c06431b0f5cfdf500c68e0562e1ec2bd46b8d883b216707f16d51e9a3
MD5 4aed3dd62a19827aefab6948783cfe48
BLAKE2b-256 10e8e56d9c45bf07fa7c2e878a860151ec641b90b6e2ea639c84e92b634d779b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.1-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 84.7 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for python_rtmidi-1.3.1-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 977d93ad6b45b48efddb92aed7fd69e1a33ff5d7130399971101133ad673be3e
MD5 6a04da0551be8286bd01ffacf72b4cfd
BLAKE2b-256 6f7f49ea894b78b01c647d7e594359b4056adef936bc680a705b67cbd58bb7c2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.1-cp37-cp37m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 234.9 kB
  • Tags: CPython 3.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.2

File hashes

Hashes for python_rtmidi-1.3.1-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 6a47a5e26675fba87fc90917c63139c8b3aa793bcb429f22fc52fffd87853f00
MD5 7bbb0d7ec19db8ee2b60debb9628039e
BLAKE2b-256 a453606e6e3ffbcf5a32693b624dfa99cbcabee315c3191eedc58baa8d548831

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 98.8 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.3.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 30d9fbb0070df100f58f6e93b8149aac2d435ae3b7d368e1fce9fd691184255c
MD5 ca3e9ba5a9aea805b5b7f793e7d04931
BLAKE2b-256 faf5328cea5a679012719e900586670b168d8a0f7df6dd15582cdc6865431a0b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.1-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 84.7 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.3.1-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 ad2a5f0c14faf9810cc92d919096be7167eff8d4fd63abc5e2d7c20e5da9326c
MD5 6cd36acd2a6c66cfbbc1eef0e1ee1ed0
BLAKE2b-256 3bcedf862f93245f4f5e6d0993d894b5cc113c5b17d598b4c08a7b6b44d91058

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.1-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 234.5 kB
  • Tags: CPython 3.6m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.3.1-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 7724252c7a2d407c510f089da321755dedbc05a864c1e97c034c807882c3234c
MD5 aad0382de9509d16f6f6b8d86e581008
BLAKE2b-256 ab5e1a9b716465041a7fffdb72c9a8a5cccd946dc2dfcf8a8a79f6bc6d99f405

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.1-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 96.4 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.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.4

File hashes

Hashes for python_rtmidi-1.3.1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 67405b66ba90f8ef423974904ad12bf92d80fc14e4180d13a69e05d787a72849
MD5 769b2d3ac988daf4b4767db31c0fc956
BLAKE2b-256 bc4ef69a595300a0e0b7de386a0fced88008f5ff04321b87c5e651ab66b75b49

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.1-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 82.4 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.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.4

File hashes

Hashes for python_rtmidi-1.3.1-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 e516a7f876381667eba82417254bb8d138c17dc7666fd70212d839813b60ea19
MD5 f503ec77a7709594fdaea198e040d8d3
BLAKE2b-256 9ac1735720c3bf3214f24e13b138f5b505faf079616f8b8cd81f643249d0f669

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.1-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 92.7 kB
  • Tags: CPython 2.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.16

File hashes

Hashes for python_rtmidi-1.3.1-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 521f2ca02876fae4f3efe7b52dfd2ec7cdba809af07905bd3b25b5aee36eaa50
MD5 f72a1e34d4f1552f4189786a4dad6b5d
BLAKE2b-256 4f13b1a72cad5022da4dc9517d8696127e6bd84f478e49c43ec193a91228241c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.3.1-cp27-cp27m-win32.whl
  • Upload date:
  • Size: 79.3 kB
  • Tags: CPython 2.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.16

File hashes

Hashes for python_rtmidi-1.3.1-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 d657e4f4ce4ad5b1c7ee738540889c031344c59159483bdbb65dab6c8459c746
MD5 f20bee0d092c2d559c6f6a0b86ab9dac
BLAKE2b-256 629552ada9819608e9484252a38422feb4eb4965a3e4b514270aeef279f3e115

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.3.1-cp27-cp27m-macosx_10_6_intel.whl.

File metadata

  • Download URL: python_rtmidi-1.3.1-cp27-cp27m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 213.1 kB
  • Tags: CPython 2.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.15

File hashes

Hashes for python_rtmidi-1.3.1-cp27-cp27m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 ffaed4e6654f5b7458e622146f5cd9253b1ca2986a118b9a86546111b1a55731
MD5 2f28db8ba5bc11cddf77c04e11999180
BLAKE2b-256 9a0975d985d8c349d33fa92b081f69af0440cf9c1f3e7300552ee2a5db73b036

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