Page 1 of 1

Zagg Bluetooth Numeric Keypad to MIDI notes hack

Posted: Tue May 16, 2017 12:15 pm
by stublito
Thought this would be quite useful. I have a Zagg Bluetooth numeric keypad, small rechargeable. I thought it would be useful to turn stuff on and off in DP.

The little app MIDI Keys changes keystrokes to MIDI notes, but only the QWERTY series. BUT, I found that if you CTL click on the App and show package contents, in the Resources folder is the KeyMaps.plist(!).

Just change the first group of keycodes. You can find the numpad keycodes on the net.

When you re-open MIDI Keys, the characters on the piano keyboard will have changed to the numpad characters. Excellent!

Just add MIDI Keys to your startup items and auto hide. Enjoy.

Stublito

Re: Zagg Bluetooth Numeric Keypad to MIDI notes hack

Posted: Tue May 16, 2017 12:58 pm
by stubbsonic
That's super clever! Way to get in there and make it work.

Re: Zagg Bluetooth Numeric Keypad to MIDI notes hack

Posted: Fri May 19, 2017 10:15 am
by stublito
A couple of things:

MIDIKeys has an option called Global Keys that allows it to relieve keystrokes even when its not the top window (or even if its hidden). There is some interaction between this mode and the Mac keyboard (the delete key does not work, there may be others).

The key to understanding MIDIPipe is that each "pipe" only works on one item at a time, but you can have as many pipes as you want in the list. Make the first pipe, then Duplicate Pipe and change the values for each one.

Here's a snippet of Applescript code to change a note on Ch 1 (144), note (41), of any velocity (>0) in from MIDIKeys to a Ch 1 control change (176), Ctrl 51, Velocity 127:

on runme(message)

if (item 1 of message = 144) and (item 2 of message = 41) and (item 3 of message > 0) then set channel to ((item 1 of message) mod 16)
set (item 1 of message) to (channel + 176)
set (item 2 of message) to (51)
set (item 3 of message) to (127)
return message

end runme

Finally, I took an old Zoom pedal with 9 foot switches on it, and wired in an old Dell USB keyboard. It took some experimentation to figure out the keyboard matrix, but now also have a USB wired foot switch that will put out CCs for live performance.