MidiMacroPad
This project started as a way to extend a MIDI grid controller beyond music production and to learn how to build a desktop application with C# and WPF. I wanted to turn a Launchpad-style device into a customizable macro control surface for everyday computer use.
The result is MidiMacroPad, a desktop application built with C#, WPF, and NAudio. Each pad can trigger configurable macros while the application synchronizes its interface with the controller's LED feedback.
Pad actions
- Keyboard shortcuts, including combinations such as Ctrl+Shift+Key
- Text input automation
- Launching processes and opening URLs or directories
- Delays for chained macro execution
- System power controls, including shutdown, restart, and sleep
- Volume and media controls
- Page switching with dynamic page creation
- Screenshot capture with timestamped filenames
Macro modes and configuration
Pads can run in momentary, toggle, or continuous loop mode. The loop system uses asynchronous tasks and cancellation tokens to keep the interface responsive while managing LED feedback.
- Multi-page pad configurations stored in JSON
- Per-pad RGB LED customization
- Hardware 6-bit color scaling for MIDI SysEx communication
- Real-time audio mute-state monitoring through the MMDevice API
- Copy and paste for rapid macro duplication
Implementation
Custom SysEx MIDI messages control each pad's RGB values. Interface colors are scaled from 7-bit MIDI values to full 8-bit RGB values. The macro execution engine is separate from the user interface, making it easier to add macro types without restructuring the application.
This project combines Windows API interop, asynchronous programming, MIDI hardware communication, interface-state synchronization, and structured JSON configuration. I plan to publish the project on GitHub once it is fully documented and ready for public release.