Introduction: Kaosduino: Create Your Own Kaosillitaor
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
- Trackpad from Adafruit.
- Prototyping shield.
- Pin headers
- PS2 breakout from Adafruit (This is not necessary just simplifies the process).
- Arduino uno board.
- LCD screen from Adafruit. (Honestly I would leave this step out, since the update rate on the screen is rather slow and it is only a nice to have).
- Homemade synth shield based on the following synth instructable.
- Wooden box (I got mine from the container store in SF).
- Acrylic plate.
- Two buttons.
- A prototyping shield.
- pin headers (the stackable ones).
- 2.2k Resistor
- 100n Capacitor
- 100u Capacitor
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
The 3 things that usually cause trouble:
- On windows you have to install the proper drivers (sometimes also on mac).
- Remember to select the right serial port in the gui.
- Remember to select the right board in the gui.
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.
- Laser cut the acrylic plate based illustrator template found here
- Drill a hole in the enclosure for the jack connector.
- Drill a square hole for the Arduino usb board.
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.
- I disassembled the trackpad and glued i onto the acrylic plate with a glue gun.
- I hot glued the lcd screen onto the acrylic plate.
- I shortened the wire from the trackpad to the arduino board to make it fit into the case. I used heatshrink sleeving to insolate the wires.
- The buttons I connected to analog 0 and analog 1.
- Wire the sound output to the jack connector on the box. The left and right channel should be connected to the same wire.
We have a be nice policy.
Please be positive and constructive.