Provides a comfy interface to MIDI keyboards via JACK.
Project description
jack_midi_keyboard
Provides a comfy interface to python from a MIDI keyboard via JACK.
Running from the command line will simply demonstrate its usage, printing out the notes played on the first physical MIDI input found:
python -m jack_midi_keyboard
An example of using this package:
from jack_midi_keyboard import JackMidiKeyboard
def note_on(channel, pitch, velocity, *_):
print(f' {channel:02d} {pitch:02d} {velocity:02d}')
def note_off(channel, pitch, *_):
print(f' {channel:02d} {pitch:02d}')
with JackMidiKeyboard(auto_connect = True) as kbd:
kbd.on_note_on(note_on)
kbd.on_note_off(note_off)
input() # Causes execution to wait for user input
You can also extend the JackMidiKeyboard class with your own class.
Versatility
Although this package is named "jack_midi_keyboard", this class can be used to receive MIDI events from any kind of Jack MIDI output port, software or hardware.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jack_midi_keyboard-1.0.3.tar.gz.
File metadata
- Download URL: jack_midi_keyboard-1.0.3.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3f7330c460ea3a46541409eb983b1aa3798a78a8a4343f48908f0f77233b2bb
|
|
| MD5 |
f97dc73cd6663e93075202c9a1c51ae9
|
|
| BLAKE2b-256 |
9e87fd98167110541b34d0d8bfb199b3549d8c12b68eb72b05894619a49a1db5
|
File details
Details for the file jack_midi_keyboard-1.0.3-py2.py3-none-any.whl.
File metadata
- Download URL: jack_midi_keyboard-1.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
918a48eecfde7c3e9201107377c5a72fa0f26e9b74dbdbcbf7ed3e6462cdc04a
|
|
| MD5 |
576bbfd41960d24424b45943d69aeedb
|
|
| BLAKE2b-256 |
e9d72c284be9fe8c9e5a6c3809de6acb8f79e12cc7cacd53d7c7e45a9cd1d1fa
|