This project is a part of experiments done while doing an artist in residence at Instructables. You can see the other projects here.
Inspired by Korgs Kaossilator I took it upon myself to build an opensource version of it. This way people can design new ways of interacting with the touchpad. The basic principle is creating sound via a trackpad. This enables you to create an instrument with quite wobbly possibilities. The challenge is to program something that would enable you to create interesting sounds. This is also a challenge with the Kaossilator which get mixed reviews for the same reason. This is an initial prototype. It uses the an arduino as basic 8 bit sound engine and uses a capacitative trackpad from adafruit industries as the input device.
As seen in the video I have only programmed the first proof of concept so far. The arduino is able to generate 4 times as many concurrent voices and the envelope modulation has much more potential. I am looking forward to see if anybody adds new dimensions to it. I will update the code as I go along as well.
The design works with a few limitations. The synth used is a really simple 8 bit synth with the 8 bit noisy aesthetic qualities. Further the synth used requires quite a lot of CPU which has proven to be a challenge when reading the touch gestures from the trackpad. I had to rewrite the trackpad library from Adafruit to enable much faster readings. This enabled the synth and the trackpad to play sort-of-nice together, but sometimes it get wrong readings from the trackpad. This is solved by doing a little prediction of the data coming in and skipping it if the data seems implausible. I am sure this could be solved much more elegantly by using looking at the parity bit, but I have not gotten around to do this yet.
Step 1: Components and tools needed
The following componets are needed:
The electronics can be done with basic soldering tools. The enclosure was made with a laser cutting some acrylics and a drillpress to make holes in the wooden box.
Step 2: Connect the lcd
As mentioned, you can build the box without the LCD. The LCD was an extra component to play with for me, but it turned out to be a really slow communication protocol resulting in the a slow frame rate This is amplified by the many resources the synth takes form the Arduino cpu. If you want to use it you will have to do the following:
I used the following pins on the Arduino to connect the LCD (After connecting it I read a note about using hardware spi instead, that might be an option to get more speed out of it):
#define sclk 3
#define mosi 4
#define cs 5
#define dc 7
#define rst 8
Have a look at the diagram from step one to se the wiring.
I followed the tutorial from Adafruit.
Step 3: Connect the trackpad
For the trackpad to connect to the Arduino I used a ps2 breakout connector. This is not necessary, but it made the coloring consistent with the notes found in Adafruits example code.
Connect the brown wire to pin 11 on the Arduino and connect yellow wire to pin 12 on the Arduino. Connect the black wire to ground and connect Green wire to 5v on the Arduino (Yes the green wire is plus on the ps2 breakout). The two last wires red and white are not used in this case.
// PS2 uses two digital pins
#define PS2_DATA 11
#define PS2_CLK 12
Step 4: Create the synth shield
Wiring it up is pretty much according to the diagram. found in step one. If you would like to experiment with wiring the sound circuit up on a breadboard you can find pretty detailed pictures and instructions in this instructable.
Step 5: Upload the program
There are lots of tutorials which already explain how to program an Arduino and they do a much better job than I could. So I will just give you a couple of links:
The 3 things that usually cause trouble:
Below are the simplified steps to uploading the code to your Arduino board:
Step 6: Visualize and debug with Guino
We are using Guino to visualize the code. Guino is a new program to visualize data coming from the Arduino board and it enables you to calibrate it on the fly.
You can find the the instructable here on how to use it. It is simple to get up and running and it enables you to control some of the internal values. Download the program from here and run the program (you have already installed the libraries in the previous steps).
Step 7: Create the enclosure.
To make the enclosure of did the following steps:
Drilling a square hole:
Drilling a square hole in a wooden box has proven to be a tricky task. I have yet to find the perfect solution for it. My solution in this case was to use a drill press, a tiny drill bit and a larger drill bit.
Start out by marking with a pen the approximate area where the hole should be. Then drill many, many tiny holes inside this area. Since it can be tricky to get the precise placement of the square hole I usually compare it to the arduino board to see what areas I am missing. When you have drilled enough holes for the wood to be porous then use the larger drill bit to remove all the loose bits.
I would love to hear if anybody have a better way to do this?
Step 8: Mount the lcd, the trackpad and the buttons.
This is the steps I took to assemble the enclosure: