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.0.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.0-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.0.tar.gz.

File metadata

  • Download URL: jack_midi_keyboard-1.0.0.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

Hashes for jack_midi_keyboard-1.0.0.tar.gz
Algorithm Hash digest
SHA256 072feed9891404b787a94579407c12e3985c993fa7358cdc37f5fc2d1a209514
MD5 10380c5e417ab8ccd7b64cf4366f5e70
BLAKE2b-256 4e2e5d025642f8d75632fad0f7b3d135b2393293a68cae4e9dc766f4a53dd139

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jack_midi_keyboard-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a42b833f07d180773f6974a907d26b347de41ad717b735c484820cc9e27884ae
MD5 f56e292394ec599731d3066e677ca1ce
BLAKE2b-256 dba35ae8a58a8591eaebf7efe7989aa70d936fb7303ccb4b631f2e7c7e178704

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