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 Wheel available 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.

For more information, visit https://chrisarndt.de/projects/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.6.tar.gz (247.7 kB view details)

Uploaded Source

Built Distributions

python_rtmidi-1.4.6-cp39-cp39-macosx_10_9_x86_64.whl (126.5 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

python_rtmidi-1.4.6-cp38-cp38-win_amd64.whl (95.9 kB view details)

Uploaded CPython 3.8 Windows x86-64

python_rtmidi-1.4.6-cp38-cp38-win32.whl (84.2 kB view details)

Uploaded CPython 3.8 Windows x86

python_rtmidi-1.4.6-cp38-cp38-macosx_10_9_x86_64.whl (125.9 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

python_rtmidi-1.4.6-cp37-cp37m-win_amd64.whl (93.7 kB view details)

Uploaded CPython 3.7m Windows x86-64

python_rtmidi-1.4.6-cp37-cp37m-win32.whl (81.8 kB view details)

Uploaded CPython 3.7m Windows x86

python_rtmidi-1.4.6-cp37-cp37m-macosx_10_9_x86_64.whl (126.2 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

python_rtmidi-1.4.6-cp36-cp36m-win_amd64.whl (93.5 kB view details)

Uploaded CPython 3.6m Windows x86-64

python_rtmidi-1.4.6-cp36-cp36m-win32.whl (81.8 kB view details)

Uploaded CPython 3.6m Windows x86

python_rtmidi-1.4.6-cp36-cp36m-macosx_10_6_intel.whl (232.6 kB view details)

Uploaded CPython 3.6m macOS 10.6+ intel

python_rtmidi-1.4.6-cp27-cp27m-win32.whl (75.8 kB view details)

Uploaded CPython 2.7m Windows x86

File details

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

File metadata

  • Download URL: python-rtmidi-1.4.6.tar.gz
  • Upload date:
  • Size: 247.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for python-rtmidi-1.4.6.tar.gz
Algorithm Hash digest
SHA256 1f7a8c6f19a56e56c4314cd562b5595ad4be645617655887e319c0c113d510ab
MD5 828f69ea172d46f373897b6cda073345
BLAKE2b-256 0ae6d289ee98d4590146ae3db73b3212ddd89d5765ddad04bd791b2131d4d93c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.6-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 126.5 kB
  • Tags: CPython 3.9, 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/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0

File hashes

Hashes for python_rtmidi-1.4.6-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 565da90d8e2fc00a7e6c608ea86427c4a2ce69db44adda4be71df95fffe3d262
MD5 56bae398631c5af08060502376fcce04
BLAKE2b-256 be632888c2274de9efaba534e1d32483276a1b82bf74b59697e2fd24fc4acecd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.6-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 95.9 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/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.0

File hashes

Hashes for python_rtmidi-1.4.6-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 615eb4426a5df90275616aab8d6382185a7c6be2a09ce44c7f058c4493bdb635
MD5 e08d9ab435099ff8c5b98d08c11929cc
BLAKE2b-256 54ce5d48008da7f6c8b46676e1208e86a1ba200213fe45bd8415d3dc63339540

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.6-cp38-cp38-win32.whl
  • Upload date:
  • Size: 84.2 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/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.0

File hashes

Hashes for python_rtmidi-1.4.6-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 f992685ec4739a51a080069f35355b1769e47b7ed2351008014a6085a08f95f5
MD5 82bd8d70728cc25e884399fb40949191
BLAKE2b-256 507dc368f0a7b47035af513db487addab62a226d26df8455f0abd6542a4c2e38

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.6-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 125.9 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/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for python_rtmidi-1.4.6-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9141a328e82ebf59519133f24a630283768ffaf69b5e2ade298d1e6b01f4ab69
MD5 1135ac7f26230e36db9526b6a101ee3e
BLAKE2b-256 f778ce134d3098c42c048085e94f4cab4a8e562ca39c4f71345583c393be9194

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.6-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 93.7 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/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.5

File hashes

Hashes for python_rtmidi-1.4.6-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 5821f8726c62b3da00f70c82443eb00ee09f4d905c09954c65869e372d700373
MD5 a33b8c0488661c1d6f3f580c5c8ba256
BLAKE2b-256 4ce464f13c0e0ceab980024d4794114f9ce73eb645ddb40c851133cbf4366b2c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.6-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 81.8 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/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.5

File hashes

Hashes for python_rtmidi-1.4.6-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 107aa9d57c3b7190e65710e436a1ac2db34f22b2e82f459397ebb14dc6d3f63b
MD5 076312c7277543d64058b719ae271daa
BLAKE2b-256 467e0e4f0802b36e2f3c6da98c897b85725a6b6610c8da797b90afa9fd76d808

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.6-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 126.2 kB
  • Tags: CPython 3.7m, 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/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.9

File hashes

Hashes for python_rtmidi-1.4.6-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2151a856964b5a99f823d336102b202b0100cab381aee6582eb7b166cd9672da
MD5 312c9d1b757efbe7433638204e781ada
BLAKE2b-256 5aa5b268fc1791a8723fdc0ecd5978d2866b4d525612f1155930c1d9a95412fd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.6-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 93.5 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/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.6-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 87cfac386769a4ad415432d94277ca5526f082050d8bc364bd3038e811ea3511
MD5 86d06845d993e87542cc42cc474a0f22
BLAKE2b-256 1031e07b71fd2b17eac6864976ba3e47d137b2feffa72e838c015d1cc09a7885

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.6-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 81.8 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/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.6-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 c2e8c3a077928ab5996dc6a0ad7d3723235b76458177c2d7297cb9706bedc779
MD5 d259a991e7bf50023e5935e3c493e466
BLAKE2b-256 c7181ea02c7ee65a4f288e4bc23701b0c4c19a8e4074a447d91d89bbcbfef2be

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.6-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 232.6 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/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.6-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 919f62b4e4f762064b8e6070f13b76c5490a44405f13f75dd24901658ac370a8
MD5 3af1081dabbe684733e2171238656ded
BLAKE2b-256 1854fa1d3aafb642232bfc118dce2ad79351da604673da2530353df6b0374548

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.6-cp27-cp27m-win32.whl
  • Upload date:
  • Size: 75.8 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.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/2.7.17

File hashes

Hashes for python_rtmidi-1.4.6-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 5e2eb72986b882605f476cddb4202e95e0aaa7ea33c49b99bc2c8243db864e7f
MD5 4bf85ce3803ea44fa87f2953e21af3f5
BLAKE2b-256 2cb16df0b6bde0f0cfb3146157a14a63dbeb5166a1c46c7a7c736b48d7c32f17

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