Raspberry Pi MIDI Footswitch Controller

Raspberry Pi MIDI Controller photo 1 Raspberry Pi MIDI Controller photo 2

I wanted to add an extra four footswitches (for cheap!) to my Atomic Amplifire 6 and discovered that a Raspberry Pi can be used as a MIDI controller.

Parts:

  • Raspberry Pi Zero
  • 4 × Footswitches + wires + resistors
  • 4 × LEDs
  • USB to MIDI cable
  • OTG cable for Pi Zero to accept USB A
  • Casing

How it works:

  • 4 footswitches wired to the Pi’s GPIO, each with its own LED indicator.
  • Pressing a switch sends a predefined MIDI Control Change (CC) message (which can be set in the code) to the connected device.
  • The controller can distinguish between short and long presses, so each switch can trigger 2 actions.
  • LEDs provide visual feedback whenever a press is registered.
  • On startup, all LEDs flash in sequence to show the controller is ready.
  • The Pi automatically searches for and connects to available MIDI devices.
  • Once running, it continuously listens for footswitch presses and sends out the matching MIDI messages.

Code and details:
Full source code and setup notes here