[sdiy] (OT)help processing realtime audio on Arduino?

Olivier Gillet ol.gillet at gmail.com
Tue Feb 1 21:19:38 CET 2011


> I had a read-through of that LAB3 article, and it's not *too* bad. Although I didn't understand why the set a timer up at 62.5KHz and then only used every other interrupt to read an audio sample. Perhaps the ADC is slow.

The timer pre-scaler is coarse, it is set by increments of 8 IIRC.
Though you can use phase accurate PWM instead of fast PWM in which
case the interrupt rate is divided by two and you'll get 31.25kHz. See
the ATMega328p datasheet.

> Maybe i need a book not on arduino but on the AVR!

The arduino library (digitalWrite, analogRead) has a huge overhead
(these are functions - run-time abstractions - not macro or templates
- compile-time abstractions) and favors blocking I/O. It is not
appropriate for audio coding, so you have to dig into the "low level"
stuff.



More information about the Synth-diy mailing list