When I first built the box above I was trying to overcome the things I disliked about one of my better effect systems. It is a zoom bass pedal with several programmable subsystems (reverb/delay/distortion/a couple of lfos and filters) which you put together using an amazingly arcane system to get a huge variety of sounds. Of course once you unplug it it looses your programming and you are left with the factory presets. Which once you get over your loss isn’t so bad in itself since about a fifth of the “stock” sounds are all you would ever need. The thing that stinks is hunting and pecking for them.
I wanted to put together using pure data a similar “set” of sounds that I could select, combine and adjust easily. I started with a 4 button/slider prototype and laid out a 16 button/slider board which I managed to mess up in the gimp as to make it unusable.
So I put the prototype into production. I recycled the box that I originally tried to put all of the imic / gk-3 interface into (a disaster at best probably never to be explained before blowing up a mini itx motherboard in an attempt build out an audiopint, so it goes) and mounted everything as below.
All of the pots and lighted switches are actual musical instrument components. For the stomp switches I used the same interface (rca jacks) that the switches originally used to select effects on an old tube amp. For the expression I used an unmodified volume/pan peddle.
Then I went about getting it interfaced to pure data.
The easiest path to this was using Paul Stoffregon’s fresh port of firmata and a teensy++. I chose this because there are ample examples and it is established. Because the arduino is by default stupidly serial only I knew that I would be moving up the chain to something more usable like usb native midi but I didn’t have time to write the underlying firmware and then figure out how to use it to control pd.
Firmata delivered what it was supposed to with a few exceptions.
- No debounce on the switches.
- No pullups on the inputs.
- Its noisy and puts a lot of data out.
The first two were easy enough to fix. There is a de-bounce abstraction in pd extended that more or less works and I added the pullups to the input setup in the firmata. I would run this back up the source but first of all this is not the best solution and the last issue was pretty much a showstopper. There is a lot of meticulous work in the firmata library designed specifically to get data out quickly and when you combine that with a usb/serial implimentation that is not limited by actual serial speeds the result is a *lot* of data (95 percent of which you dont need). On a 2.1 Ghz macbook with 4 gig of memory, a noisy potentiometer would actually put out enough data to where there were audible glitches in the sound.
So I started looking at alternatives including Collin Oldham’s recent blog post (http://www.dorkbotpdx.org/blog/coldham/pd_and_arduino_or_whatever_you_call_it) until I found the link below.
http://kiilo.org/tiki/tiki-index.php?page=Arduino-PureData-MessageSystem
It wasnt perfect but it was close enough that I was able to make it fit my needs in a little over a day of hacking at it (with a little help from my friends of course).
The teensyduino code and the
pd patch are attached below.