Back
midicode

midicode

turn your midi keyboard into a macos system controller

active
open-sourcedeveloper-toolscreative

midicode turns your akai mpk mini (or any midi controller) into a full macos system controller. map drum pads, knobs, joystick, and piano keys to keyboard shortcuts, app switching, volume control, media playback, and more.

how it works

plug in your midi keyboard, run the script, and every physical input becomes a system action:

  • drum pads → tab switching, app switcher, play/pause, open apps, delete, enter
  • knobs → system volume, track switching
  • joystick → arrow keys (fires at extremes, repeats while held)
  • piano keys → jump to tabs 1-9

everything is configurable via config.json.

built with

this project was built entirely through voice and ai - no manual typing.

  • claude code - ai pair programmer that wrote and configured the entire project
  • wispr flow - voice-to-text dictation for all instructions
  • akai mpk mini - the midi keyboard it was designed for

technical details

  • midi input via mido + python-rtmidi
  • key simulation via pyobjc-framework-quartz (cgevents)
  • uses kCGEventSourceStatePrivate to prevent modifier leaking
  • wispr flow integration with push-to-talk and hands-free modes
  • menu bar app for easy start/stop

configure with claude

the repo includes a CLAUDE.md file so anyone can use claude code to reconfigure their mappings. just tell claude what you want each button to do.