bbc-vamp-plugins
1.0
|
Calculates the peak and valleys of the spectral contrast feature. More...
#include <SpectralContrast.h>
Protected Attributes | |
float | alpha |
int | numBands |
float * | bandHighFreq |
Calculates the peak and valleys of the spectral contrast feature.
This simple algorithm, taken from [1], divides a signal into N sub-bands and sorts the FFT bins in each sub-band by magnitude. The peak and valley are found by taking a proportion (defined as alpha) of FFT bins from the top/bottom of the sorted bins and finding the mean of those. The mean of all the FFT bins in each sub-band are also calculated. The 'spectral contrast' can be found by subtracting the valley from the peak in each sub-band, although this isn't calculated in the plugin.
[1] Jiang, D.-N., Lu, L., & Zhang, H.-J. (2002). Music type classification by spectral contrast feature. IEEE International Conference on Multimedia and Expo (pp. 113–116).
Thanks to Erik Schmidt at Drexel for providing a reference MATLAB implementation.
float SpectralContrast::alpha [protected] |
Alpha parameter of spectral contrast algorithm
float* SpectralContrast::bandHighFreq [protected] |
Upper frequency range of each sub-band
int SpectralContrast::numBands [protected] |
Number of sub-bands to use