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

Calculates the spectral flux. More...

#include <SpectralFlux.h>

Inheritance diagram for SpectralFlux:

Protected Attributes

bool l2norm
 

Detailed Description

Calculates the spectral flux.

Outputs

Spectral flux
The spectral difference between successive frames.

Parameters

Use L2 norm
Whether to use L2 normalisation over L1 (default = 0)

Description

The algorithm is defined in [1], section 2.1: "Spectral flux measures the change in magnitude in each frequency bin. It is restricted to the positive changes and summed across all frequency bins."

When using L1 norm, the algorithm is as follows:

\[ SF(n) = \sum_{k=0}^{F_s/2} H\left( | X(n,k)| - |X(n-1,k)| \right) \]

When L2 norm is selected, the following is used:

\[ SF(n) = \sqrt{ \sum_{k=0}^{F_s/2} H\left( | X(n,k)| - |X(n-1,k)| \right)^2 } \]

In both cases, \( H(x) = \frac{x+|x|}{2} \)

[1] Dixon, S. (2006). Onset Detection Revisited. International Conference on Digital Audio Effects (DAFx) (pp. 133–137).

Member Data Documentation

◆ l2norm

bool SpectralFlux::l2norm
protected

Flag to indicate use of L2 normalisation


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