0

I was wondering how I can measure the frequency of the audio output of my raspberry pi. Currently I am trying to create a script to control an RGB led to the music that is being played through the arduino

1

In order to measure the frequency you will need to take an fft of the data . http://en.m.wikipedia.org/wiki/Fast_Fourier_transform

First you need to sample the data coming out of the pi. (Or maybe you are playing an MP3 which is already sampled). Take about 1024 samples of data at time and run an fft. This will give you 1024 different "frequency bins". The bin that has the largest number is the loudest frequency.

Please post more information about what is generating sounds so i can help you further

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.