Audio  Analyzer

:slight_smile: Hello! I wondered if anyone could tell me how I might go about analyzing an audio signal. Basically what I want to do is simply input a pure tone signal to Arduino and then have Arduino tell me what pitch it is via an LED. Is there a simple way to do this with code? Thanks :slight_smile:

Depends on what sort of range your tone could have.
A bank of Goertzel’s algorithm filters would work if you know in advance what sort of frequency your tone is going to be (for instance, a DTMF tone). It’s a simple algorithm with pre-computed coefficients, and has the big advantage (over say the FFT) that it computes on-the-fly and you don’t need to buffer samples.

Sorry! Most of that went over my head! I would be taking the audio signal from a theremin or any musical instrument and hoping to use a series of LEDS to indicate the pitch. Are Goertzel’s algorithm filters hardware? Thanks :slight_smile:

Goertzel’s algorithm is implemented in software:

Google is a useful resource, and should turn up plenty of code examples.
Have you thought how you’re going to get the sound samples into the Arduino?

I’m just having a look at the audio input side of things and see that I may have to use DC offset to allow the audio signal to be connected to the analog pins. :slight_smile: