python-rtmidi 1.5.8


pip install python-rtmidi

  Latest version

Released: Nov 20, 2023


Meta
Author: Christopher Arndt
Requires Python: >=3.8

Classifiers

Development Status
  • 5 - Production/Stable

Environment
  • MacOS X
  • Win32 (MS Windows)
  • Console

Intended Audience
  • Developers

License
  • OSI Approved :: MIT License

Operating System
  • Microsoft :: Windows
  • POSIX
  • MacOS :: MacOS X

Programming Language
  • Python
  • Python :: 3
  • Python :: 3.8
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12

Topic
  • Multimedia :: Sound/Audio :: MIDI
  • Software Development :: Libraries :: Python Modules

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

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.

Wheel compatibility matrix

Platform CPython 3.8 CPython 3.9 CPython 3.10 CPython 3.11 CPython 3.12
macosx_10_9_x86_64
macosx_11_0_arm64
manylinux_2_28_aarch64
manylinux_2_28_x86_64
win_amd64

Files in release

python_rtmidi-1.5.8-cp310-cp310-macosx_10_9_x86_64.whl (145.3KiB)
python_rtmidi-1.5.8-cp310-cp310-macosx_11_0_arm64.whl (142.0KiB)
python_rtmidi-1.5.8-cp310-cp310-manylinux_2_28_aarch64.whl (286.4KiB)
python_rtmidi-1.5.8-cp310-cp310-manylinux_2_28_x86_64.whl (296.9KiB)
python_rtmidi-1.5.8-cp310-cp310-win_amd64.whl (129.1KiB)
python_rtmidi-1.5.8-cp311-cp311-macosx_10_9_x86_64.whl (146.7KiB)
python_rtmidi-1.5.8-cp311-cp311-macosx_11_0_arm64.whl (143.3KiB)
python_rtmidi-1.5.8-cp311-cp311-manylinux_2_28_aarch64.whl (287.9KiB)
python_rtmidi-1.5.8-cp311-cp311-manylinux_2_28_x86_64.whl (298.3KiB)
python_rtmidi-1.5.8-cp311-cp311-win_amd64.whl (129.8KiB)
python_rtmidi-1.5.8-cp312-cp312-macosx_10_9_x86_64.whl (155.1KiB)
python_rtmidi-1.5.8-cp312-cp312-macosx_11_0_arm64.whl (149.8KiB)
python_rtmidi-1.5.8-cp312-cp312-manylinux_2_28_aarch64.whl (298.5KiB)
python_rtmidi-1.5.8-cp312-cp312-manylinux_2_28_x86_64.whl (308.2KiB)
python_rtmidi-1.5.8-cp312-cp312-win_amd64.whl (126.7KiB)
python_rtmidi-1.5.8-cp38-cp38-macosx_10_9_x86_64.whl (151.7KiB)
python_rtmidi-1.5.8-cp38-cp38-macosx_11_0_arm64.whl (146.6KiB)
python_rtmidi-1.5.8-cp38-cp38-manylinux_2_28_aarch64.whl (300.4KiB)
python_rtmidi-1.5.8-cp38-cp38-manylinux_2_28_x86_64.whl (313.8KiB)
python_rtmidi-1.5.8-cp38-cp38-win_amd64.whl (133.2KiB)
python_rtmidi-1.5.8-cp39-cp39-macosx_10_9_x86_64.whl (145.4KiB)
python_rtmidi-1.5.8-cp39-cp39-macosx_11_0_arm64.whl (141.9KiB)
python_rtmidi-1.5.8-cp39-cp39-manylinux_2_28_aarch64.whl (286.4KiB)
python_rtmidi-1.5.8-cp39-cp39-manylinux_2_28_x86_64.whl (296.9KiB)
python_rtmidi-1.5.8-cp39-cp39-win_amd64.whl (129.4KiB)
python_rtmidi-1.5.8.tar.gz (359.5KiB)
No dependencies