Distribute the values from fft() logarithmically - not plotting
Mostra commenti meno recenti
Hi all,
When I use fft(signal) on a music signal, I get linearly spaced power spectrum of length(signal) representing frequencies up to 44100hz. I want to distribute them on a log scale. If I semilogx(fft(abs(signal))) I can see what I want, but I want to be able to work with the values!
I think the best way to explain exactly what I want to do is explain what I want to achieve on a slightly higher level:
I want to sum the differences on the power spectrum of a music signal from one window to another. However for later purposes I want the (say) 20 frequency bins to be spaced logarithmically up to only 20000Hz.
I hope that explains my problem, please let me know if I should provide more detail. I have looked on google and had a search of this forum. Closest was this question with no answer http://www.mathworks.com.au/matlabcentral/answers/27211-audio-processing
I have:
binEdges = logspace(log10(20), log10(20000), numBins+1);
which defines the bins, but then I don't know how to test for the frequencies in the returned fft array.
Thanks very much for any help!
Risposte (3)
Conrad
il 13 Ott 2012
Honglei Chen
il 13 Ott 2012
0 voti
If your frequency bins falls on frequency bins of an FFT, you can try Goertzel algorithm
1 Commento
Conrad
il 13 Ott 2012
Walter Roberson
il 13 Ott 2012
0 voti
Possibly histc() passing binEdges as the second argument
1 Commento
Conrad
il 13 Ott 2012
Categorie
Scopri di più su Spectral Measurements in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!