For Christmas this year I received this little toy called the "YadaYadaYada" that lets you record a short sample of sound and then play it back while pitch bending it in real time. It is a lot of fun to play around with, and my brothers and I spent hours pretending to be robots and helicopters, using it for our sound effects. After a while I realized that I could probably build something similar but with more capabilities using some parts lying around in my piles of junk.
The goal is to make a little microcontroller-based device that can record audio and then play it back while modifying it in real time. It should be pocket sized and able to run on batteries for long periods of time. A simple keypad could allow it to play sounds musically. Possibly a display could be set up to allow a person to modify the sample in specific ways. The last requirement is that it should be fun to play with :D.
To Do
Build simple Atmega168 breadboard circuit and connect to computer.
Add resistor ladder for sound.
Connect speaker.
Write asm program to output tone on each pin as test.
Figure out wave files are constructed.
Cut small chunk of samples out of sound file.
Install JDK.
Relearn Java.
Write Java program to parse sample file and output in format for database in code.
Write Avr assembly program to loop through saved sample and output to speaker.
Write code to modify sample in real time.
Add microphone input to circuit.
Write code to store and playback microphone samples.
Add buttons to circuit.
Write UI code for buttons.
Add power regulator for battery.
Solder into protoboard.
Create nice case.
Finishing touches.
Timeline
1/22/10 (8:27 PM)-Been researching different avr 1/23/10 (9:35 AM)-Read through a couple pages about wave files. Opened up a short clip from a song in Audacity and managed to export an 8bit PCM wave file at 8000Hz sampling rate, but it is 430 KB! I played the file and it seems that Audacity added several minutes of white noise to the end for some reason. I opened the file with HxD and got rid of the excess. Copied the samples directly using HxD into a new file, sample.bin. Now I'm going to write a java program to take that binary file and output a comma delineated hex file that I can copy and paste into my assembly code.
1/23/10 (10:10 AM)-Forgot that I don't have the JDK installed on this computer. Just finished installing it. Gonna break out the old Java Programming in 24 Hours book and go about making the parser program.
1/23/10 (12:08 AM)-Finished writing the parser program in java. Used it to take the binary file I prepared containing the sound samples and turn it into a series of hex values that I can just paste write into AvrStudio to be compiled into the hex file. Next I am going to write some assembly code to read through the data and play it on the resistor ladder output I have set up.