bbc-vamp-plugins  1.0
Protected Attributes | List of all members
SpectralContrast Class Reference

Calculates the peak and valleys of the spectral contrast feature. More...

#include <SpectralContrast.h>

Inheritance diagram for SpectralContrast:

Protected Attributes

float alpha
 
int numBands
 
float * bandHighFreq
 

Detailed Description

Calculates the peak and valleys of the spectral contrast feature.

Outputs

Valleys
The valley of each frequency sub-band
Peaks
The peak of each frequency sub-band
Mean
The mean of each frequency sub-band

Parameters

Alpha
Ratio of FFT bins used to find the peak/valley in each sub-band (default = 0.02)
Sub-bands
The number of sub-bands to use. (default = 7)

Description

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.

Member Data Documentation

◆ alpha

float SpectralContrast::alpha
protected

Alpha parameter of spectral contrast algorithm

◆ bandHighFreq

float* SpectralContrast::bandHighFreq
protected

Upper frequency range of each sub-band

◆ numBands

int SpectralContrast::numBands
protected

Number of sub-bands to use


The documentation for this class was generated from the following file: