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

File metadata

  • Download URL: jack_midi_keyboard-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 325cf374a0311b26c51d45f1719aeaba8e752984ffb772821ed674e449fb53be
MD5 1185deec36db33d07426f6eef41beb65
BLAKE2b-256 28eebcadd5a8f95097139231b621f02f6d72aa40755c0764fe30f8a05504f3d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jack_midi_keyboard-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a15b939261b3d7eaaa1938e4692f1303da3c9ac1c850bdd0dfc21d9889079f45
MD5 f993388797e8b2a2a2ca964d2a4114bd
BLAKE2b-256 9e71c1ea55f2d3a2849307018c741e80cfadf42eb9a0ffc5f96798eaf11967b2

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