Go Down

Topic: How to buffer audio? (Read 582 times) previous topic - next topic

xpleria

May 19, 2013, 01:23 pm Last Edit: May 19, 2013, 01:27 pm by xpleria Reason: 1
I would like to do some audio processing. But for now, I'd like to just make the arduino read an audio input and give it as output.

I saw the code from here http://interface.khm.de/index.php/lab/experiments/arduino-realtime-audio-processing/
I'm a beginner so I just understood that he's collecting samples at a constant rate. Moreover, the zip file contains so may files, are all of them needed?

But as I said, if I just want to read from analog input and give it as output for now. Could anyone please tell me how I could do that using the principle in the above link?

It would be really helpful if you give a code example here or in pastie.org.


Grumpy_Mike

Quote
But as I said, if I just want to read from analog input and give it as output for now

Read with analogue read.
However outputting is not so simple as the arduino has no analogue outputs. The options are to use the PWM output
http://www.thebox.myzen.co.uk/Tutorial/PWM.html
Or to fit some sort of external D/A converter.
The arduino has a very limited amount of memory to store sounds there is only 2K of this memory in total for everything. That is only enough for a fraction of a second.
That link is the best there is at the moment. Try and understand what it is telling you.

g_u_e_s_t

if you just want to pass audio through the arduino, this is the best sounding way to do it:

http://wiki.openmusiclabs.com/wiki/MiniArDSP

it gives 10b audio at 32ksps.  there isnt a lot of time left processing, but simple effects can be done.  as far as buffering is concerned, the 2k of memory will only give you 64ms of buffer time at this sample rate.

Go Up