Skip to content

jonaleonard/Arduino-Launchpad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Arduino MIDI Controller

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.


Hardware

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.


Wiring

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

Note Layout

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 ]

Software

Arduino

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.

Mac Setup

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-rtmidi

3. 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.py

The 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

File Structure

├── midi_controller.ino   # Arduino sketch
├── midi_bridge.py        # Python serial → MIDI bridge
└── README.md

Extending the Project

  • Velocity knob — wire a potentiometer to A0 and map analogRead to MIDI velocity (0–127)
  • Mod wheel — second potentiometer on A1, send as MIDI CC#1
  • Octave shift — two buttons on A2/A3, shift noteMap values 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

Troubleshooting

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

About

Arduino Uno + 4×4 keypad MIDI controller that sends notes to GarageBand in real time over USB via a Python serial bridge.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages