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.5, 3.6, 3.7, and 3.8).

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 Windows x86

python_rtmidi-1.4.5-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.5-cp37-cp37m-win_amd64.whl (93.7 kB view details)

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m Windows x86

python_rtmidi-1.4.5-cp37-cp37m-macosx_10_6_intel.whl (232.9 kB view details)

Uploaded CPython 3.7m macOS 10.6+ intel

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

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m Windows x86

python_rtmidi-1.4.5-cp36-cp36m-macosx_10_6_intel.whl (232.5 kB view details)

Uploaded CPython 3.6m macOS 10.6+ intel

python_rtmidi-1.4.5-cp35-cp35m-win_amd64.whl (90.9 kB view details)

Uploaded CPython 3.5m Windows x86-64

python_rtmidi-1.4.5-cp35-cp35m-win32.whl (79.5 kB view details)

Uploaded CPython 3.5m Windows x86

File details

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

File metadata

  • Download URL: python-rtmidi-1.4.5.tar.gz
  • Upload date:
  • Size: 247.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for python-rtmidi-1.4.5.tar.gz
Algorithm Hash digest
SHA256 3dd1909d0f44f03a4191131f1829cac2ee6a94f5a4be2a9606354748e594e704
MD5 78a48a0aa2455f3fcc452352483619fe
BLAKE2b-256 9613089ef69bf786ef5f94567655a702b43019bec7ffefeeaaecb3a098430232

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.5-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/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.0

File hashes

Hashes for python_rtmidi-1.4.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 3006afc54ffecb265549df6898efa6deed36d8668994f499a64f40cf4c5917cf
MD5 0603d3f275cf983cb9699fda8d4361cb
BLAKE2b-256 74385607e7d24830ac14bfdc08db56c184551f9b42a782ead8e9ca756cb3b8d6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.5-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/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.0

File hashes

Hashes for python_rtmidi-1.4.5-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 fba08576d03782f2392091d84755c7ffef31ec7a343a7341451a5375cca1d1b6
MD5 8bf0ba8686efbf5ed35ce352915812ad
BLAKE2b-256 6e3baeb35cee6d38cb7ea212e74cfc1ef595c5a3745846d818f43883c2a6aa79

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.5-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/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.1

File hashes

Hashes for python_rtmidi-1.4.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a69da4aad75f21d44e82cf908c78f76b7aae8f3f4a297c97b867c12dc34abef4
MD5 d96f5ca73cf37ed31a6548d470405a80
BLAKE2b-256 b207dd97562503046cd01103b538bfb981ce475362d3ffe6a2c417f343277b2d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.5-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/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.5

File hashes

Hashes for python_rtmidi-1.4.5-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 b222eaa0bf0d45a406883de54f8a77fd2c3daac195ff7f9acd49dcdb915b490a
MD5 1c24e10ecc329d94592a282ca631da26
BLAKE2b-256 9faa3d69f5dd6444214960afd293e4abb71bed69d437442458df9e6ba4e42ef6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.5-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/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.5

File hashes

Hashes for python_rtmidi-1.4.5-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 4415e3ae6eea6b10d7b40b4b57f22e62a2b09679a22b27cfa2789144ef3805a2
MD5 e1a8ba2f801af28827b2775728851e2e
BLAKE2b-256 36badbaadf4865df5127544100f3e144618b8155ff3b29be44bdd2165eb44d96

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.5-cp37-cp37m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 232.9 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.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.6

File hashes

Hashes for python_rtmidi-1.4.5-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 29712778c99e33f37062533969788e80435f304cea5b4cbbcea18f8d12755373
MD5 a7f7243addf4c3e0505d6384f025f5a3
BLAKE2b-256 4bcedaf060eb8c988801abe45f817d41f05eee580477f7dceca40935a05c4cf9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.5-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/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.5-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 202c23f02968756a025938b1cd7f8bb89ecc9fe59be7c1707f781a0cfebd86e0
MD5 ed4fd227e9d126749664511423b4a88c
BLAKE2b-256 968bb2e1d55d8a28e6eb05534445f55344692c040c41cef57ef34344fbb92e86

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.5-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/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.5-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 81df6909a1ecbae8d88552b5d24ea4d711fc5afc6a57e704a949e4da0ee2dd89
MD5 8ecb39a668dee41ec30fc3268dec5c1a
BLAKE2b-256 052f596e86eaeafc64c3f3122ae0c92fe0e6cbbf9308e091f545d92307c22f2f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.5-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 232.5 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.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.8

File hashes

Hashes for python_rtmidi-1.4.5-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 99781c7ab4d36d75c08b8d03545bb649fbc9babf665032ed9d76f6ebf35a6fa1
MD5 4b4d54bff86369fd0d552535f18e6d0a
BLAKE2b-256 4837daa2e5231a6d3fa9e596e0461c829a1e970b5cc522e645f61a10c0cbf2e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.5-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 90.9 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.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.5.4

File hashes

Hashes for python_rtmidi-1.4.5-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 76d6007c9ecb9bf7e8292981ed3142ede6658c82cde8da76d8114e4d5d624a6d
MD5 e8d5a897a74d03c4402d11108c409efd
BLAKE2b-256 cf71939be97cde1f6b676c38db199aa8f16b00279e4bdfb8edcea8c93d8c0210

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_rtmidi-1.4.5-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 79.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.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.5.4

File hashes

Hashes for python_rtmidi-1.4.5-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 763a5b55787d7ed3f02145a5b419b162d87f852c31080f8b6cae098f7356d735
MD5 7f38fe5be141d5af4f5c3f0188aad231
BLAKE2b-256 470d94c466a91a7d42e507a4a23fb1e86762c97cebf9da1faa6ea56d7d87e33a

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