Project Overview
The "Unopad Performance Controller" is a bespoke hardware interface that bridges the gap between tactile finger-drumming and professional digital audio workstations (DAWs) like Ableton Live. While most MIDI projects stop at the "Serial Print" stage, this project provides a complete end-to-end workflow for transforming an Arduino UNO into a fully recognized MIDI device. By implementing a custom Object-Oriented button handler and utilizing virtual MIDI routing, the Unopad offers zero-latency performance for triggering samples, launching clips, or playing virtual instruments.
Most tutorials for MIDI controllers focus only on the Arduino code, but not on using it in the DAW. I created this tutorial to put all necessary steps in one place, helping beginners understand the full process from circuit to creation.
Technical Deep-Dive
- The MIDI Message Protocol: The Unopad communicates using the industry-standard MIDI 1.0 protocol. Data is sent as 3-byte packets:
- Status Byte (0x90): Indicates a "Note On" event on MIDI Channel 1.
- Data Byte 1 (Note Number): The specific musical pitch (e.g., 36 for C1, the standard Kick Drum MIDI note).
- Data Byte 2 (Velocity): The intensity of the hit. Since standard switches are binary (On/Off), the system sends a fixed velocity of 127 (Maximum) for impact.
- Bypassing USB-HID Limitations: The Arduino UNO uses an ATMega16U2 for USB communication, which typically identifies as a Serial COM port rather than a MIDI Class Device. To solve this, the project uses Hairless MIDI-Serial Bridge. It listens to the high-speed Serial stream (38,400 or 115,200 Baud) and re-packages the bytes into valid MIDI packets for the OS.
- Virtual MIDI Routing (loopMIDI): Since DAW software cannot "connect" directly to a serial-to-midi bridge, loopMIDI creates a virtual hardware port. This acts as a "software cable" that takes the output from Hairless and presents it to Ableton Live as a physical MIDI input, effectively "fooling" the DAW into seeing a professional controller.
- Firmware Architecture (Class-Based):
- State Management: The code uses a
Buttonclass to track the_lastStateof each pin. This is vital because if the Arduino sent a "Note On" message every millisecond the button was held, it would crash the DAW with a "MIDI Feedback Loop." - Logic Gate: A message is ONLY sent when
state != _lastState. This ensures a single 3-byte "NoteOn" packet when pressed, and a single "NoteOff" packet when released.
- State Management: The code uses a
- Internal Pull-Up Logic: By using
INPUT_PULLUP, the project eliminates the need for 9 external 10k resistors. The Arduino's internal silicon ties the pins to 5V. When a button is pressed, it shorts to Ground (LOW state). This hardware simplification makes the internal wiring of the Unopad much cleaner and more reliable.
Engineering & Construction
- Sustainable Enclosure Design: The Unopad utilizes an old speaker box as a chassis. Its wooden construction provides excellent acoustic damping (important for heavy finger-drumming) and enough internal volume to house the Arduino and wire looms securely.
- Mapping for Performance: In Ableton, the controller is mapped to the Drum Rack. Because the 9 buttons are correlated to MIDI notes 36-45, they align perfectly with the first 9 pads of a standard Ableton kit, providing an immediate "Plug and Play" experience for beatmakers.
- Scalability & UI: The project features a dual-plate plastic top. This hides the complex "rats nest" of wires underneath while providing a professional, flat surface for the switch actuators. Future expansions plan to include Control Change (CC) pots and long-press logic to switch between instrument octaves.
- MIDI Sync Debugging: Using the Hairless MIDI debug log, developers can verify signal integrity before opening the DAW, making it easy to identify mechanical switch bounces or wiring shorts.