Spectral slope for audio signals and auditory spectrograms

The spectral slope is calculated as described in [1]:

$$\text{slope}=\frac{{\displaystyle \sum _{k={b}_{1}}^{{b}_{2}}\left({f}_{k}-{\mu}_{f}\right)\left({s}_{k}-{\mu}_{S}\right)}}{{\displaystyle \sum _{k={b}_{1}}^{{b}_{2}}{\left({f}_{k}-{\mu}_{f}\right)}^{2}}}$$

where

*f*is the frequency in Hz corresponding to bin_{k}*k*.*μ*is the mean frequency._{f}*s*is the spectral value at bin_{k}*k*.*μ*is the mean spectral value._{s}*b*_{1}and*b*_{2}are the band edges, in bins, over which to calculate the spectral slope.

[1] Lerch, Alexander. *An
Introduction to Audio Content Analysis Applications in Signal Processing and Music
Informatics*. Piscataway, NJ: IEEE Press, 2012.