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.7+).

The documentation provides installation instructions, a history of changes per release and an API reference.

See the file LICENSE.md 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.5.1.tar.gz (331.5 kB view details)

Uploaded Source

Built Distributions

python_rtmidi-1.5.1-cp311-cp311-win_amd64.whl (253.6 kB view details)

Uploaded CPython 3.11 Windows x86-64

python_rtmidi-1.5.1-cp311-cp311-manylinux_2_28_x86_64.whl (602.1 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.1-cp311-cp311-manylinux_2_28_aarch64.whl (581.6 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.1-cp311-cp311-macosx_10_9_universal2.whl (130.5 kB view details)

Uploaded CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64)

python_rtmidi-1.5.1-cp310-cp310-win_amd64.whl (256.0 kB view details)

Uploaded CPython 3.10 Windows x86-64

python_rtmidi-1.5.1-cp310-cp310-manylinux_2_28_x86_64.whl (604.0 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.1-cp310-cp310-manylinux_2_28_aarch64.whl (583.2 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.1-cp310-cp310-macosx_10_9_universal2.whl (133.9 kB view details)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)

python_rtmidi-1.5.1-cp39-cp39-win_amd64.whl (258.5 kB view details)

Uploaded CPython 3.9 Windows x86-64

python_rtmidi-1.5.1-cp39-cp39-manylinux_2_28_x86_64.whl (606.6 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.1-cp39-cp39-manylinux_2_28_aarch64.whl (585.4 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.1-cp39-cp39-macosx_10_9_universal2.whl (136.6 kB view details)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)

python_rtmidi-1.5.1-cp38-cp38-win_amd64.whl (260.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

python_rtmidi-1.5.1-cp38-cp38-manylinux_2_28_x86_64.whl (620.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.1-cp38-cp38-manylinux_2_28_aarch64.whl (595.8 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.1-cp38-cp38-macosx_10_9_universal2.whl (140.1 kB view details)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64)

File details

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

File metadata

  • Download URL: python-rtmidi-1.5.1.tar.gz
  • Upload date:
  • Size: 331.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for python-rtmidi-1.5.1.tar.gz
Algorithm Hash digest
SHA256 3fd2ce6e0aab6a660fa0c808f2b346bcd747c4a645ebbcc8a01d33aa2e82e415
MD5 9a2701dcbf8b3a3ede97f51c1da55085
BLAKE2b-256 f88684ae05cc6289fc4e08f30df80cae983fe6268fc7e6f0bdffbb834c6431b6

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c9bad6e9a3e025abc5611bd02bbe145f15508d93e88c5a4df352f471f6ee2d95
MD5 320ec74efd18582aeca6be287769deba
BLAKE2b-256 ce3d0cb749b2b26a5f0136f91d1e6b3eecdd789a4a4a63bc436a80f8c5dff5e0

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 58691cd0ea70865eea5acb70f02983ba756cff00093f4e2a58c7f9e949cb6820
MD5 b4854553d29ceceacf387855a19cc0ab
BLAKE2b-256 ca59a5bc6b5f1b99a243a3e89fe1132ea22e8afd1d8a913a4fac044f3aae4142

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.1-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c211d2150a16e66d6cfe737da9fac58620d5428623ba5fa8722618c690e19512
MD5 76bd8ad10ff1e85ab8f15f71b09c437f
BLAKE2b-256 9fe437271c3efebb8b8cda5de1b2ca912389ef93c1d8da0791dbfb1b46b6eb44

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.1-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 78d8a20e37bb0b5ab0e6e2c5b46bbdd86a85bdbd807780db9d98b150496f6d21
MD5 ddb91ac4aba2edaae5b00dbf8606d6b3
BLAKE2b-256 d63ec98d6a6cff5fa720c0210137922526f9811bcde263f4361bd593477a2416

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a75f42986b0f40a7fd0a7a15444ab9c2ce5f634b0278291736dd49ade651e74f
MD5 a410c61ad4fe03b94a76ac327fc30e74
BLAKE2b-256 d81bf9419ab57e3a80fd2c075274bf11df3f53737950d16e396829df382fcc14

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.1-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 81fb2bc98984e20bbd349244eb4c9050d33a536c16121ab31ba1ec86ff85818d
MD5 5935ba646b699af51974cc787e5d8103
BLAKE2b-256 1bcb0c401b0534103557485a9f29e3753b02d5ae163deba6a6808ad5d94c56b4

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.1-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f1ed49129573790e407cc3b31f495e355bd3fb7d144834dac5c314019860cba9
MD5 3dcb1823857b3dcf6c7f6885f9316cbf
BLAKE2b-256 d817cd70c7040224cad50d1aac1fa940bf23b26796e31b490f648bd57390a62c

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.1-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 18fad149b4db4c41a9c572094de91b8e58febf2eb9303362549dd1dea3554f0d
MD5 09ad36805da08309a9280669d2a07e09
BLAKE2b-256 31bed64668aa2a5de62a0a8f7e20fd7b3fc0c2060c5f0e1ff0a5d3b6ef892f12

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1bedf463ba466f055d07b5cc29267855a164ffa4fb2a26373e73455840856def
MD5 1b2d42d6d79508524553497451df3315
BLAKE2b-256 c4334c10fd4db4dae8e4a3ab3c54c816293cbc0236cefbaad59ca478d9dd40bb

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.1-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.1-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 675e0065db3494e324a2bd4b7d08c7757ed49a93dc13ca1a01c3c79623386255
MD5 68f8d662520abc2775a61522db88ec1b
BLAKE2b-256 eca4ddebed757adb71b44ffd8e02ec0bc17953c89f136dca19782762d13facfe

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.1-cp39-cp39-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.1-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 13045d10569e224133b9ab578a1a19d0be853ed712cdc9400c72041f528efdc3
MD5 2baaaa02156acca29dc275dc9c9590f4
BLAKE2b-256 c6a900b8b207a8f31f010314ebfafa3e4d02e712520d280317de6d47f960163c

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.1-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 67a6969e67cb717ae9877ac8de3850cff1ff2096a31220edf345450e6d34213d
MD5 292c390d0fddaf132e16042ef99db83d
BLAKE2b-256 8db6fb8ff5fa86beffd239153d7ac93150168c93fc61a851d34caa0d52f7a49c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 2c430c40dec87d5334dbb3f632766a4725a1e178aec8d32fc1752875f115d15b
MD5 b17fe8977aed30547d541688d5a3d7b1
BLAKE2b-256 aad1b76d93ad1cbd4c0fa405c8fa6d49f28fa6c17c17b06b4508b749390ca03f

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.1-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.1-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2747153d3e832e412d7f639166f83f68e23c6f1f723cb5707a6effc3462f359c
MD5 e4e256e8941173ca20ee71547daa42d7
BLAKE2b-256 bdb505cac5220b198f7457172145303ad4c3e2c950a052147d783f632b7453aa

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.1-cp38-cp38-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.1-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4d38538cfa9594dc0ebbbf37ae5b89e4b4b8754a114ca31f31e62151e11960a6
MD5 dd0becf525bb884688f94263b4f3cdf2
BLAKE2b-256 63393ca40ec3b9a54845124d779369fc6a91b7473ec37e4516485259cbdc5d64

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.1-cp38-cp38-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.1-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a1a974ab1c5295e15d8ff15e2e35693d83d2875c0119e29c819aba356b3c3924
MD5 537a73c4c52d16d876f390cc1f914d92
BLAKE2b-256 47fe72051aaf54483ca420cc4b54785a9ca552410fdbdf4873660b8aaaef8380

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