As I explained in an earlier post about the concept behind the footcontroller, Hans Christoph Steiner wrote an external for Pure Data which can read data from a lot of USB devices, and more specifically from USB gamepads and joysticks.This external is [hid] (for “human interface device”).
I bought a USB gamepad soon after learning about the existence of a [hid] external (I bought it in Nehru Place in New Delhi, just to add some color and a blade-runnerish feel to this post🙂 ). This gamepad was equiped with a number of buttons (“digital”, meaning that they can send only two values to the computer : 0 or 1), and with two joysticks (“analog”, sending values between 0 and 255 on both axis).
The availability of digital and analog controls on the gamepad was great for building a pedal, because I could use the buttons to trigger the effects (just like any regular switch on a digital or analog stompbox), and I could also use the joysticks to build an expression pedal (which requires the use of a potentiometer).
After a few tests in Pd it turned out that it could read data from the gamepad (though not exacty the way it should, but it was a very cheap gamepad…). But it was still nothing but a gamepad, more suitable to play videogames than to be controlled by a foot. Though possibly not entirely impossible, I decided that I’d better invest time in turning it into a real pedal than in practicing my toes dexterity.
In order to turn a gamepad into a pedal, I needed to hack it. It required opening the plastic around it to get the bare PCB, on which switches and potentiometers can be soldered. There are several how-to’s on the web about USB gamepad hacking (see this page for instance). While this isn’t too difficult to do, it does require some basic experience in soldering and electronics in general.
Below is a picture of my first footcontroller. I’ve used it on a regular basis for over a year to trigger effects in Pure Data for my guitar. It is based on a regular playstation-like gamepad. The case is that of an old cheap mixer from the 70’s or 80’s (I wasn’t equiped to build a case at the time).
And the inside…
And a close-up to see how wires are soldered directly onto the PCB.
To sum up : the pros of using a gamepad to build a pedal :
- It is cheaper that using an Arduino board (though not by much),
- No need to program the gamepad (yet you can very easily upload Firmata on your Arduino),
- [hid] is possibly a little easier to use than [pduino] (very questionable…)
And the cons :
- It requires more experience in soldering than an Arduino board,
- There is no felxibility as to the inputs (while an Arduino board allows the use of an analog input as a digital one),
- It may not work perfectly (depending on the brand, some buttons/joysticks may not work properly),
- The “resolution” of a gamepad is less than that of an Arduino (the range of an analog input is 0-255, vs. 0-1024 with Arduino), and it reads values at a slower rate (baudrate). This makes wide-amplitude changes in analog values quite audible in Pure Data (you can hear the signal jump between two values when it should be continuous).
After weighting the pros and cons, and considering that an Arduino Uno board costs around 25 Euros, I’d recommend going for the Arduino.