A DIY 16-pad MIDI controller built with an Arduino Uno R3 and a 4×4 membrane keypad. Pressing a pad sends a MIDI note to GarageBand (or any DAW) in real time via a Python serial bridge.
| Part | Qty |
|---|---|
| Arduino Uno R3 | 1 |
| 4×4 membrane keypad | 1 |
| USB cable (A to B) | 1 |
| Mac with GarageBand | 1 |
No breadboard, resistors, or additional components required for the base build.
The keypad ribbon cable connects directly to the Arduino digital pins — 8 wires, no breadboard needed.
| Keypad pin | Arduino pin |
|---|---|
| R1 | D2 |
| R2 | D3 |
| R3 | D4 |
| R4 | D5 |
| C1 | D6 |
| C2 | D7 |
| C3 | D8 |
| C4 | D9 |
Keys map chromatically starting from middle C (C4 = MIDI note 60), left to right, top to bottom.
[ C4 ][ C#4 ][ D4 ][ D#4 ]
[ E4 ][ F4 ][ F#4][ G4 ]
[ G#4][ A4 ][ A#4][ B4 ]
[ C5 ][ C#5 ][ D5 ][ D#5 ]
Library required: Keypad by Mark Stanley & Alexander Brevig (install via Arduino IDE Library Manager).
The sketch sends raw MIDI bytes over USB serial at 115200 baud — no MIDI library needed. Note On (0x90) is sent on keypress, Note Off (0x80) on release.
Upload midi_controller.ino to the Arduino via Arduino IDE.
1. Enable IAC Driver
Open Audio MIDI Setup → Window → Show MIDI Studio → double-click IAC Driver → check "Device is online" → Apply.
2. Install Python dependencies
pip3 install pyserial python-rtmidi3. Find your Arduino's serial port
ls /dev/cu.*It will look like /dev/cu.usbmodem1101. Update SERIAL_PORT in midi_bridge.py.
4. Run the bridge
python3 midi_bridge.pyThe script reads raw serial bytes from the Arduino, parses them into properly aligned MIDI messages, and forwards them to IAC Driver Bus 1. Terminal will print Note ON and Note OFF as you press keys.
5. Open GarageBand
- Create a new Empty Project → Software Instrument track
- Arm the track (click the R button so it turns red)
- Press keys on the keypad — notes play live
├── midi_controller.ino # Arduino sketch
├── midi_bridge.py # Python serial → MIDI bridge
└── README.md
- Velocity knob — wire a potentiometer to A0 and map
analogReadto MIDI velocity (0–127) - Mod wheel — second potentiometer on A1, send as MIDI CC#1
- Octave shift — two buttons on A2/A3, shift
noteMapvalues up or down by 12 - LED feedback — 74HC595 shift register + 8 LEDs to light up on keypress
- LCD display — I2C LCD on A4/A5 to show current note and octave
| Symptom | Fix |
|---|---|
| Terminal shows garbled bytes | Make sure sketch uses Serial.begin(115200) and no MIDI library |
IAC Driver not found |
Open Audio MIDI Setup and enable IAC Driver |
| Notes play in terminal but not GarageBand | Arm the track (R button must be red) |
| Keys unresponsive | Re-check keypad wiring — confirm R1→D2 through C4→D9 |
| Port not found | Run ls /dev/cu.* and update SERIAL_PORT in bridge script |