|
Author |
Topic: SONIA FFT TEST (Read 1909 times) |
|
christian
|
Re: SONIA FFT TEST
« Reply #16 on: Nov 3rd, 2003, 4:04pm » |
|
yes!!! ))
|
|
|
|
christian
|
Re: SONIA FFT TEST
« Reply #17 on: Nov 3rd, 2003, 4:05pm » |
|
thank you for working so straight
|
|
|
|
elaine
|
Re: SONIA FFT TEST
« Reply #18 on: Jan 30th, 2004, 9:22am » |
|
hi all, i'm doing a project that wants to analyze the frequency from a speech. thus, i'm using the LiveInput.getSpectrum to get the FFTs bands. and now, just want to check if my understanding is correct: the LiveInput engine has a default sampling rate of 44100Hz and a 1024 size of FFT spectrum. that means, the engine will recognize any source with frequencies lie between 0Hz to 22050Hz (44100/2) and display it proportionally in the spectrum?? so, if i play a sound file and want to identify the frequencis, says from 2000Hz to 4000Hz, i write the following.. float fft_bands = 1024; float sr = 44100; //sampling rate float optimal_freq_min = 2000; float optimal_freq_max = 4000; int count_freq_min = int(fft_bands * optimal_freq_min/(sr/2)); int count_freq_max = int(fft_bands * optimal_freq_max/(sr/2)); int count_freq_range = count_freq_max - count_freq_min; ... for ( int i = 0; i < LiveInput.spectrum.length; i++){ if ((LiveInput.spectrum[i]>250) && (i>count_freq_min) && (i<count_freq_max)) count++; } ... the above code works, but the count value is out of my expectation even i play a sine wave of 200Hz. i expect to get a ZERO count but i got a non-zero count instead... could anyone can me some suggestions? thanks in advance, elaine
|
|
|
|
|