Main Content

Spectral flux for audio signals and auditory spectrograms

specifies the previous spectral state. This syntax is supported only for frequency-domain
inputs.`flux`

= spectralFlux(`x`

,`f`

,`initialCondition`

)

specifies options using one or more `flux`

= spectralFlux(___,`Name,Value`

)`Name,Value`

pair arguments.

For example, `flux = spectralFlux(x,f,'NormType',1)`

calculates
spectral flux using norm type 1.

`[`

also returns the final spectral state.`flux`

,`finalCondition`

] = spectralFlux(___)

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

$$\text{flux(}t\text{)}={\left({\displaystyle \sum _{k={b}_{1}}^{{b}_{2}}{\left|{s}_{k}(t)-{s}_{k}(t-1)\right|}^{P}}\right)}^{\raisebox{1ex}{$1$}\!\left/ \!\raisebox{-1ex}{$P$}\right.}$$

where

*s*is the spectral value at bin_{k}*k*.*b*_{1}and*b*_{2}are the band edges, in bins, over which to calculate the spectral flux.*P*is the norm type. You can specify the norm type using`NormType`

.

[1] Scheirer, E., and M. Slaney.
"Construction and Evaluation of a Robust Multifeature Speech/Music Discriminator." *IEEE International Conference on Acoustics, Speech, and Signal
Processing*. Volume 2, 1997, pp. 1221–1224.