Distribute the values from fft() logarithmically - not plotting
Ältere Kommentare anzeigen
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!
Antworten (3)
Conrad
am 13 Okt. 2012
Honglei Chen
am 13 Okt. 2012
0 Stimmen
If your frequency bins falls on frequency bins of an FFT, you can try Goertzel algorithm
1 Kommentar
Conrad
am 13 Okt. 2012
Walter Roberson
am 13 Okt. 2012
0 Stimmen
Possibly histc() passing binEdges as the second argument
1 Kommentar
Conrad
am 13 Okt. 2012
Kategorien
Mehr zu Spectral Measurements finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!