<commit_before>kbd2jackmix
===========

Listen on a keyboard fd and respond to key combinations with jack midi volume messages for use with a midi-aware jack mixer, like jackmix or jack_mixer.

Build the kbd2jackmix executable by typing 'make'.  

Basically, everything is hardcoded: the path to the keyboard event device (e.g., /dev/input/event17), the key-bindings, the midi channels... this software needs an interface of some sort, any sort. In its initial, hardcoded configuration, the path to the keyboard device is "/dev/input/event17".  Pressing ctl-shift-up_arrow increases a stored volume value (initialized to zero) and sends the volume via channel 11 over the jack midi port, and ctl-shift-down_arrow decreases the stored volume and sends it.  

One bit of setup is necessary, the user account used to run kbd2jackmix must have read access to the keyboard device which is by default owned by root with permissions 700.  I give the file permissions 770 and change its group to something my user account belongs to, namely the 'audio' group, for me, since I must be in that group for jack permissions.  Conveniently, I run these two commands once per re-boot:

 % sudo chmod 770 /dev/input/event17
 
 % sudo chgrp audio /dev/input/event17
 <commit_msg>update the readme about the new commandline argument<commit_after>kbd2jackmix
===========

Listen on a keyboard event device and respond to key combinations with jack midi volume messages for use with a midi-aware jack mixer, like jackmix or jack_mixer.

Build the kbd2jackmix executable by typing 'make'.  'sudo make install' will put it by default the executable, 'kbd2jackmix', in /usr/local/bin.

Usage is 

% kbd2jackmix </dev/input eventfile>

Basically, everything is hardcoded except the path to the keyboard event device (e.g., /dev/input/event17), which you must give as a command line argument.  Other stuff that is hardcoded: the key-bindings and the midi channels.  It needs a configuration interface for these things. In its initial, hardcoded configuration, pressing ctl-shift-up_arrow increases a stored volume value (initialized to zero) and sends the volume via channel 11 over the jack midi port, and ctl-shift-down_arrow decreases the stored volume and sends it.  

One bit of setup is necessary, the user account used to run kbd2jackmix must have read access to the keyboard device which is by default owned by root with permissions 700.  I give the file permissions 770 and change its group to something my user account belongs to, namely the 'audio' group, for me, since I must be in that group for jack permissions.  Conveniently, I run these two commands once per re-boot:

 % sudo chmod 770 /dev/input/event17
 
 % sudo chgrp audio /dev/input/event17
 
{'fraction_non_alphanumeric': 0.05547445255474453, 'fraction_numerical': 0.016058394160583942, 'mean_word_length': 4.332684824902723, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '276579', 'n_tokens_mistral': 753, 'n_tokens_neox': 704, 'n_words': 406}