Distribute the values from fft() logarithmically - not plotting
Mostrar comentarios más antiguos
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!
Respuestas (3)
Conrad
el 13 de Oct. de 2012
Honglei Chen
el 13 de Oct. de 2012
0 votos
If your frequency bins falls on frequency bins of an FFT, you can try Goertzel algorithm
1 comentario
Conrad
el 13 de Oct. de 2012
Walter Roberson
el 13 de Oct. de 2012
0 votos
Possibly histc() passing binEdges as the second argument
1 comentario
Conrad
el 13 de Oct. de 2012
Categorías
Más información sobre Spectral Measurements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!