0

Alright, I wanna program onto a micro-controller a way to basically handle song waves. So I need to be able to detect certain frequency ranges; When the bass is hitting (say 80-120Hz range reaches a certain amplitude), and then blink a light.

Optimally, it would sample live music via a microphone, then processor handles whatever I need to do with the frequency. I have seen DAW's show frequency with each having their amplitude on things like Multi-band compressor or equalizer.

But how can I obtain the Amplitude of each frequency picked up from a microphone? Note that we are talking about an actual song so multiple harmonies are playing.

We're dealing with a ATMega1284 micro-controller here by the way.

John
  • 377
  • 3
  • 14
  • 1
    You will need to learn some digital signal processing, specifically the (Fast) Fourier Transform. – clcto May 20 '14 at 03:15
  • Is that at all complicated? Is there some code already available that can check signal amplitude given a frequency? – John May 20 '14 at 03:26
  • It's for an Arduino, but should work fine on a bare ATMega as well: http://wiki.openmusiclabs.com/wiki/ArduinoFFT. Note that the 10bit ADC on ATMega's isn't going to give you very much at all in the way of dynamic range, so hopefully you're not intending to do anything beyond visualization with the signal. – aruisdante May 20 '14 at 03:34
  • Thanks for the start guys, I have no idea what bins, FFT length, or other words mean however, I think this is more suited for EE overflow. But if you know, how to simply choose a frequency and find its amplitude and store it in a variable. I think it will be enough for a start and to just sample 8 low-end Freqs. – John May 20 '14 at 07:10

0 Answers0