Pages: [1]   Go Down
Author Topic: How to buffer audio?  (Read 500 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

« Last Edit: May 19, 2013, 06:27:26 am by xpleria » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 603
Posts: 33408
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Jr. Member
**
Karma: 2
Posts: 97
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: