bbc-vamp-plugins
1.0
|
Calculates the spectral flux. More...
#include <SpectralFlux.h>
Protected Attributes | |
bool | l2norm |
Calculates the spectral flux.
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).
bool SpectralFlux::l2norm [protected] |
Flag to indicate use of L2 normalisation