Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jack_midi_keyboard-1.0.4.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jack_midi_keyboard-1.0.4-py2.py3-none-any.whl (16.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file jack_midi_keyboard-1.0.4.tar.gz.

File metadata

  • Download URL: jack_midi_keyboard-1.0.4.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for jack_midi_keyboard-1.0.4.tar.gz
Algorithm Hash digest
SHA256 fe5a621aabe6204c4fe1fbdd4dab0d383c8390855f8f9c6dc999c8d49f64396a
MD5 b1298f90858a6135e89edc807bf5454a
BLAKE2b-256 167e557a0549c6dbc4af3a84f6d10a7ab73719852d5bb6b49eecd03c23d7cab9

See more details on using hashes here.

File details

Details for the file jack_midi_keyboard-1.0.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for jack_midi_keyboard-1.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9f3d509ffda6319ea588635166bd5e71052c3cc5de441a6e136edea0bc09ccab
MD5 70e76f4c7ae791b3b7ca7082eb612889
BLAKE2b-256 e25688be8b3dcb3a2e8ae55ec2be8bbddcf8110203b9ccb7e629e863dbf26cf7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page