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

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

Uploaded Source

Built Distributions

python_rtmidi-1.5.7-cp312-cp312-win_amd64.whl (400.3 kB view details)

Uploaded CPython 3.12 Windows x86-64

python_rtmidi-1.5.7-cp312-cp312-manylinux_2_28_x86_64.whl (777.2 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.7-cp312-cp312-manylinux_2_28_aarch64.whl (751.8 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.7-cp312-cp312-macosx_11_0_arm64.whl (154.5 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

python_rtmidi-1.5.7-cp312-cp312-macosx_10_9_x86_64.whl (160.1 kB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

python_rtmidi-1.5.7-cp311-cp311-win_amd64.whl (406.4 kB view details)

Uploaded CPython 3.11 Windows x86-64

python_rtmidi-1.5.7-cp311-cp311-manylinux_2_28_x86_64.whl (766.9 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.7-cp311-cp311-manylinux_2_28_aarch64.whl (740.9 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.7-cp311-cp311-macosx_11_0_arm64.whl (147.5 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

python_rtmidi-1.5.7-cp311-cp311-macosx_10_9_x86_64.whl (151.2 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

python_rtmidi-1.5.7-cp310-cp310-win_amd64.whl (405.9 kB view details)

Uploaded CPython 3.10 Windows x86-64

python_rtmidi-1.5.7-cp310-cp310-manylinux_2_28_x86_64.whl (765.3 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.7-cp310-cp310-manylinux_2_28_aarch64.whl (739.2 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.7-cp310-cp310-macosx_11_0_arm64.whl (146.2 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

python_rtmidi-1.5.7-cp310-cp310-macosx_10_9_x86_64.whl (149.9 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

python_rtmidi-1.5.7-cp39-cp39-win_amd64.whl (407.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

python_rtmidi-1.5.7-cp39-cp39-manylinux_2_28_x86_64.whl (765.3 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.7-cp39-cp39-manylinux_2_28_aarch64.whl (739.2 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.7-cp39-cp39-macosx_11_0_arm64.whl (146.2 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

python_rtmidi-1.5.7-cp39-cp39-macosx_10_9_x86_64.whl (149.9 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

python_rtmidi-1.5.7-cp38-cp38-win_amd64.whl (421.3 kB view details)

Uploaded CPython 3.8 Windows x86-64

python_rtmidi-1.5.7-cp38-cp38-manylinux_2_28_x86_64.whl (782.7 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

python_rtmidi-1.5.7-cp38-cp38-manylinux_2_28_aarch64.whl (753.5 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ ARM64

python_rtmidi-1.5.7-cp38-cp38-macosx_11_0_arm64.whl (150.9 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

python_rtmidi-1.5.7-cp38-cp38-macosx_10_9_x86_64.whl (156.3 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file python_rtmidi-1.5.7.tar.gz.

File metadata

  • Download URL: python_rtmidi-1.5.7.tar.gz
  • Upload date:
  • Size: 368.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.6

File hashes

Hashes for python_rtmidi-1.5.7.tar.gz
Algorithm Hash digest
SHA256 defb1a4b2ae86ff398c232c53eeda554e24a49f67de842e79ceba8b3ca77374d
MD5 004550a224805e1e8a7f65a82d08c1cb
BLAKE2b-256 a4004b2ad2421c98cda11d82fe3be0a03e5163e68af6169e7831704f5feb4c06

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.7-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 cb737770b685d4a42accbb4faac6947d762c9c36c3dabd2339138bab7536ec0b
MD5 e77974e4763ff070043b6796a5839961
BLAKE2b-256 d584b40f23197485bcf59277eed7a9263fb380db37f4d368cffdb576becc2c1b

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.7-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6017703f9cc70624dc273f8e0dc57aa71eeaf84d748e333c312ac3c2d954759c
MD5 882dc7f76cb3fe3e6c1323c3f0239981
BLAKE2b-256 e9a7b0ae99784781ec7b0c76362e428ec16f9f7cff788bcb2c3e42f1e7f5456a

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.7-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 aeb57104ae94410fab9508b658fc7492785e13ac14714134be956a87238f0a95
MD5 2684213994d0b7fa43cb9daf590009d6
BLAKE2b-256 04baaebda5d26186b3a1373f682bebed084c2102fe17f9079253b3eae3bdae6a

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.7-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ace3004f5ccecaf7f787bd16d3109feaa594411bd6e043356a2e504d67b07d6a
MD5 188a5a17d71720df2f5b23828642c460
BLAKE2b-256 570061664c6b0295850643b15e94b5600634cbd60d6c04f373814d4be14904ee

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.7-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 76ab0de81852be46e497c47e4895734e6e7b5d0cae6866873be87cf8ad195d82
MD5 44ba12ad22ff5d27ab6a9a83d4d9f52e
BLAKE2b-256 41014d950e2ea24608353090292ab2d05f75b5e2b02fb8d54d43e4e4857a8f84

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 bcc8fff03d53db09e852acaf02f144daf5547b4158a17054b7b9c4a7bfab29ab
MD5 7184d6a3de37a296db9a1fa70f88c05f
BLAKE2b-256 184c0f4f69d0c905fe2aa10b257872c94e3c9dec97e8bdfca0809515b01aa434

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fc2a0c60f18b0c3a277afda6192d060a29bd8732c35b83a04338cb28461249cb
MD5 f56be5d716ab17826a8f393571c5c4b3
BLAKE2b-256 5513126608c32d67981aba8d524d777031409c1ad4c6f0feab97513553e7019d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5ad89b43594b2c28717bfc94bbee5795c5629ec1602337aea53d8ba0b936c202
MD5 e8e06b0b7fb8433629e48a6cba6c07c1
BLAKE2b-256 21db0f7c0fd514ab49eaaee1c979e574a8ed109809411f0339d92bfeaeb70d22

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.7-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7d1d7f072728ab90d8d5df3dce1e5fa52c39b20c341b6149829ae467298e06d8
MD5 a94a572e176a8116812270d3d9086a56
BLAKE2b-256 ee455cdf2c4d51184270d3f480cac35d3710981abf4d8bc408c3eb487291a88f

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.7-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ea6b05371aca372987d46f9937b364b78fb73dd6690b5d18db9cf4390614bc60
MD5 4552945a77634dfd5a029d2fb789aa9d
BLAKE2b-256 09402598d769b2bc1e5aa6caf9b9b24971789327bedb0943117f9124619fa6cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2d699ac161fa96bd90a2a58ea10fd45400b3548b32e4194db18eeebeeb3b78f9
MD5 3cd47524cbaca481677edef6f3ed86aa
BLAKE2b-256 050c897daf4679608c4f473bd534aff57da69f2469b285d596635edecb651aee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ac13797a409a7f8abbf9785c0a0c1a2e1a76ea2b44079ec96b8ea1c00f95cccb
MD5 7bfe4f2fe82f615b42e4d51d78c5a553
BLAKE2b-256 26a0af83b72085164052808971607ea90b8d5aa78110c5d6d8feec3df25e0cd0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 215e614e6dd90026c9a570082eac910a4d46ebe16bd404592c3622bcdb184276
MD5 391baf4bff2e77497a260262dd68b530
BLAKE2b-256 8493b3d7dd9ba3598bd7774af55403fd1fa8b92f8a85237b9668731a07a21b3e

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.7-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 95a4ae0ba3f3f8c805e62b434c3ac705b1b1e0aa356465b9dc057e66d6f08eb9
MD5 987cfe4be44ac17caaaa3396dbbe089f
BLAKE2b-256 a536475644b7aef9f319e700ac1a72019073e128626ba784a1b3facc8a410360

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.7-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1e3c6c16220aa4eedb5d8040082eb86baf80650e062661adc74995f625fa6f98
MD5 df6f2e4a0f3d1a0786e448247822095b
BLAKE2b-256 47a6110e44354ddcf86cdfdf27a9c27176fc3460824e35ff85cf08fef456a19d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f7b088be80a64ec75e19f15cfdcd7de723d0bf19be26cfbdd539ba9d482a3098
MD5 5b35bf171a519aefc174c93edadbd57c
BLAKE2b-256 55370766bf383295e599bf23119234b5dc12e7dff2244b340ada8a1a405d051a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 09b63a0c0e8c90e678ef3483463da1bd0da291cb075c2ebd1aafa1e4550b76d2
MD5 1c697dfd6c971e33be5e432f5de5b240
BLAKE2b-256 fe7c6b5dbcb10af8a39a50d2360c135b1dbabe8aca583a5b1d256474bfa785c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 24f5f63c2061bca2f3982c7baeda8e2abbc0b9914bf7da1c0042479b20ffba98
MD5 e1d647936adcfbb1b66df9b9d29bf556
BLAKE2b-256 98204ae26b8d9ad86b23623415917ac8c1bec1e417a86c91e41f2237400a4f09

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.7-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ff8bb43917f6dd76e65eee866c4b415119885da5f79e03de9b8d685286d291c7
MD5 1a5ea84a31d98098b5aae9aca20b2367
BLAKE2b-256 6ef14045ab377e4b6c3b05b13363da33841c20045e8796088237de20f57decf6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 27fa5e02744a67e2e89c2bc35d20c1588ef22d58a3b9cadd5815356b0ded7bb2
MD5 2eeb6d9ad3fb51492845ca0a5d2625c9
BLAKE2b-256 a386cddda1aaca7fafce7ccdee61225b0bf3462a61d1411fac4fe0fd5df7182d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 2df51d4db447aa631c102f86dae77bb07fa69218b23709d9087c381f542c191b
MD5 dc1fb2a093d1d7e333c65ff2b8223a64
BLAKE2b-256 a982a20164deaa994ae9ea58651e137c59b62032e72d3ea8025ffd498bcb68c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c6b4d4966d53a73b4db8e0a470092f794b963b018a5d87ad8019589ba5c89bfc
MD5 07ebfe639a54367a33d605ce929b3278
BLAKE2b-256 b846ab7f43f964656850babb68036c81819698346f3b0e35b5a253835da0bf9f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bd2b2105b5a0dca9e1bd5544ce5d3b45c2e9fb978192e83fdcb613a237ca8fa9
MD5 9b5c97f68255e649d88d12aebcb69199
BLAKE2b-256 31f4484c591faf19d0f3b1f2a2dbf58b49ab9d02ac11824f191bfe57ecb1c41e

See more details on using hashes here.

File details

Details for the file python_rtmidi-1.5.7-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 37314ec2a79fdcac170ac17fef36b78aa5fa744a84284367a09e7221432c82df
MD5 7c38844c9408839eca4d00233c1e0af2
BLAKE2b-256 517a303dc16a3fd1dbc60dc56386849e3d31a0ecdddaa90dfaf9be835f0bcc8c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_rtmidi-1.5.7-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3007b2e06d8cabcb3a83e55c6e2937cd72d83320ad15aaedaf6e0a7b7f78dd7c
MD5 f8d71e9b868c5f8bd1cb3dfc9afcead6
BLAKE2b-256 e39722163eac659e0d8bb0b4cbbfca535a808e08965b3f113b7dfde79ac1cee0

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