[music-dsp] spectral analysis

Olli Niemitalo oniemita at mail.student.oulu.fi
Sat Sep 16 09:23:33 EDT 2000


On Sat, 16 Sep 2000, menno wrote:

> Can anyone explain to me how I can get information about spectral density
> from a FFT spectrum? I need to know if the signal has a dense signal makeup
> or if it has a more widely spaced frequency componenets.

Try "tonality":

    sqrt(sum |bin[i]|^2)
0 > ------------------- <= 1
       sum |bin[i]|

which is close to 1 for a peaky spectrum and close to 0 for a flat
spectrum.

Note that this will not measure how far the occupied bins are from each
other. If you need it, try smoothing (lowpass filtering) the frequency
domain bin magnitude data before you calculate tonality.

-olli


dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
http://shoko.calarts.edu/musicdsp/




More information about the music-dsp mailing list