Pages: [1]   Go Down
Author Topic: Using FFT for audio synthesizer  (Read 572 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Guys,

Currently im working with the example code provided by the FFT library, and for the life of me, i cannot work out how to change the frequency range the the FFT calculation. im sorry if this is very confusing as to what im asking, i have a vague understanding of how it works. Pretty much, im using the fft library to divide the frequencies into 64 bins, then im using the values from these bins (only 3 bins for the moment) to fade in a rgb led string. the original author has said "Analog signal is captured at 9.6 KHz, 64 spectrum bands each 150Hz which can be change from adcInit()" - i have gone there and cant work out what to change, could anyone please help me out, cheers, Abraham smiley. I have atatched the original example code, note, this contains all the files required, even the fft lib which you will have to add, as well as the processing code, which displays the data as a graph, and the complete original arduino code.

* (127.42 KB - downloaded 8 times.)

North Queensland, Australia
Online Online
Edison Member
Karma: 74
Posts: 2225
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm pretty sure its the Nyquist theorem that dictates the usable sinusoids within a signal, its basically n/2 where n is the sampling rate.

CD's are for example sampled at 44.1 kHz, this gives a usable range of the full audible spectrum of just over 20 kHz.

The granularity of the bins returned by the transform is dependant on the window size ( more samples, more bins ). There are trade off's to consider regarding speed, size, and resolution as most fast FFT's use 2^n values meaning an almost exponential increase in processing time too, but smaller sets may not give the frequency distribution you are after.

Standard deviation will help find the fundamental harmonic in a frequency domain distribution. You can also repeat windows to create dithered bins. I don't recommend this however, window repetition of data to create a single large window for FFT will not add any more information into the transform.
« Last Edit: December 14, 2012, 05:52:43 am by pYro_65 » Logged

Global Moderator
Offline Offline
Brattain Member
Karma: 309
Posts: 26512
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This same question was also posted in the Audio section, and has now been deleted.

DO NOT CROSS-POST - it wastes time.

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Pages: [1]   Go Up
Jump to: