A custom MIDI controller created from a 4x4 matrix of surplus laptop touchpads.

Comment unsuccessful. Please correct the errors below.

RADIX16 Laptop Touchpad Matrix MIDI controller

Oct 24 2013

radix16

Overview

The RADIX16 is a custom MIDI controller I built over the last year.

The controller is fashioned from 16 surplus laptop touchpads arranged in a 4x4 matrix. Each touchpad transmits:

  • Note on / note off when tapped
  • 0-127 MIDI CC for touch pressure
  • 0-127 MIDI CC for X axis position
  • 0-127 MIDI CC for Y axis position

For a total of 16 notes and 48 control change values available at the fingertips.

This number of parameters per pad allows for nuanced and expressive control over external synthesizers / effects. A pad can (for example) trigger a drum sample with variable velocity (z-index), filter cutoff (y-index), and pan (x-index) depending on where the pad surface is tapped. Here's a quick video of one of the first post-build tests - testing out the pads on the RADIX connected to a MicroKorg synthesizer:

The Build

I built the touchpad modules first, using surplus Synaptics touchpads sourced from PCHub. The touchpads came complete with ribbon cables - I attached the ribbon cables to small PCB adapters I designed and printed at Pad2Pad (see below for the CAD files and parts list). The output side of the adapter is a standard 8 pin header suitable for jumper wire. Here is the bare adapter PCB before construction:

adapter

Next came the front face panel for the controller. I considered a few designs and ultimately went with a three-piece "sandwich" of one backing panel of delrin (plastic), one middle panel of delrin to hold the touchpads, and one top panel of aluminum to lock everything together. The three panels were designed in Inkscape and sent over to Ponoko for laser cutting. The Ponoko template SVG files are below.

Here is the touchpad "sandwich" with the pads mounted and wired up - the aluminum top panel would be added last:

pads

The last piece of the build was the wood case. The case was constructed in my dad's workshop using scrap maple. We planed, cut, sanded, drilled, and stained it over the course of a weekend. I created and mounted an insert for the rear panel (power connector and switch, USB MIDI out) using a piece of angled aluminum.

case 1

case2

The Electronics

The core of the electronics is an Arduino Mega 1280. An inexpensive USB MIDI interface is wired up to the Arduino TX pin to provide USB MIDI out. Conceptually this is what it looks like:

radix schematic

I created a custom shield that connects up all the touchpads, the MIDI interface, and external power to the Arduino.

Wiring a Synaptics touchpad to an Arduino is pretty simple. I used this Instructables article as a starting point. Each touchpad needs a dedicated clock and data pin which means 32 of the 54 available on the Mega are in use. I basically repeated that circuit 16 times.

This article describes wiring up a USB MIDI interface to an Arduino for easy MIDI out. I followed the same model.

I will get a schematic of the shield up soon.

pads 2

The Code

The software for this project was challenging.

The PS/2 protocol is well documented, but all of the sample code for doing this on an Arduino assumes only a single pad is connected. As such, the code is synchronous and will block while it waits for the touchpad clock. This means that the performance of the controller degrades proportionately with the number of pads that are connected - the more pads that are connected to the Arduino the greater the length of time between touching a pad and getting a MIDI message. With all 16 pads wired up latency was ~350 milliseconds - about 10 times too high. I had to get this down to a reasonable level.

Ultimately I ended up writing asynchronous PS/2 communication code from scratch. In addition I was able to do a few tricks and hacks (direct pin IO, unrolling loops) to get performance to an acceptable level. The final code is pretty ugly and will be harder to maintain, but latency is now around 50ms. The code is available for download below.

*** UPDATE *** Turns out I was a little pessimistic on my latency measurements. I set up some timers and and recorded an average latency of 32 ms - which is much better but not ideal. I have a few more optimizations to try and get this down further.

naked pads

finished

Files and Downloads

Arduino sketch

Ponoko delrin template SVG file

Ponoko aluminum faceplate SVG file

Adapter Pad2Pad PCB file

musicelectronics
Posted by: Scott Metoyer
Last revised: 27 Oct, 2013 02:43 PM History

Comments

nay-seven
nay-seven
27 Oct, 2013 09:04 AM @ version 33

Nice and promising ! congrats I've add this page to my scoop it (http://www.scoop.it/t/experimental-music-software-and-hardware)

RW
RW
27 Oct, 2013 11:32 AM @ version 33

This is awesome!

27 Oct, 2013 12:33 PM @ version 33

What an amazing idea! I have been looking at buying a set of Akai pads for my synthesizer, but this is so much better.

hirnlager
hirnlager
27 Oct, 2013 03:45 PM

what is when you use piezo elements?

luke
luke
28 Oct, 2013 09:47 AM

awesome work! just one question remains: why did you use a usb a female connector?

obscure wave music
obscure wave music
28 Oct, 2013 05:45 PM

Pure Genius !! Brilliant !!

28 Jan, 2014 02:17 PM

This is so cool man! You should pull apart that USB/MIDI converter and use the USB 5v to power the Arduino and hook the midi cable directly into it so it'd be effectively plug-n-play.

01 Apr, 2014 06:53 PM

That is just simply beautiful and amazing. :)

Your Comments

Comment unsuccessful. Please correct the errors below.
Used for your gravatar. Not required. Will not be public.
Posting code? Indent it by four spaces to make it look nice. Learn more about Markdown.

Preview