best practice for hi-q ATM168 audio ADC

I'm curious to know if there's something I've missed altogether or perhaps if there's a smarter way to go when trying to do ADC on board. Many people write that it's definitely possible, when balancing the processing Here's my setup:

I have an Arduino Duemilanove (ATM168) so far with the standardfirmata on board. On my breadboard I have the line in from my stereo, with a DC offset to raise the level to the wanted 0~1023 values.

For the actual ADC I'm well aware that eventually an actual ADC circuit is the best way to go, but I'm for now trying do it with the arduino microcontroller. David Mellis (Arduino team) has created a Sensor Library in order to achieve a higher sampling rate (44100) when using the Arduino microcontroller as ADC, but I'm not quite sure yet how to implement it. I find the code confusing whentrying to understand how to 'sync' the data from the arduino with my program.

Ultimately using openFrameworks to use the data, I'm trying to figure out how to best achieve a sufficiently resolutioned (FFT) spectogram representation of my analog audio signal. I am not specifically using the audio for reproduction, but rather to make some hash values ("fingerprints") to use the characteristics of the audio for realtime comparison with a another source.

I'd like to know what your inputs are in order to best get the arduino to pass the digital audio data over serial to the computer. Do you have any best pratices for hashing audio - perhaps on the arduino?

I'm a bit confused by serial speed from the standard firmata - perhaps the mirocontroller can handle the ADC/ data, but can the serial port keep up to speed? Why does my data seem so low resolution?

As you can see there are a few issues I'm juggling here and I'm at standstill being somewhat a beginner .. Any code that best uses the potential of the microcontroller to do ADC and sends over serial is MUCH APPRECIATED.

Feel free to ask if there's anything I need to specify.

Best Andreas

I've seen examples of people doing FFT on the Arduino. For the signatures you may run into space problems. Say you sample at 44.1 KHz then each sample will take 22.6 uS (1/44100). You won't have time to do much except store it, and you only have 2048 bytes of RAM. Assuming you need a few of those for other things, you can therefore store 2000 * 22.6 uS of samples,, which is about 45 mS of audio. That is, under 1/20 of a second of it. I doubt you will get a useful signature out of what effectively is a tiny fraction of your incoming audio

Thank you, Nick.

I was aware of that issue, as the ram is quite limited. Say 44.1khz is overkill and just 11.025 would be sufficient. Would that allow me to do the processing on board? I'm at a halt here and looking for a way to figure out how to best treat the incoming audio. Should I just get a ADC circuit to take of business?

I think we were playing with an ADC chip on another thread recently. Can't find it right now.

On that we were reading from the ADC chip at around the SPI read rate (about once every 4 uS) which is a lot faster than the internal ADC converter. But you still have limitations on the amount of RAM you have.