Spectral flux
Encyclopedia
- This article is about the Digital signal processingDigital signal processingDigital signal processing is concerned with the representation of discrete time signals by a sequence of numbers or symbols and the processing of these signals. Digital signal processing and analog signal processing are subfields of signal processing...
term. For the term used in astronomyAstronomyAstronomy is a natural science that deals with the study of celestial objects and phenomena that originate outside the atmosphere of Earth...
, which refers to a different measure, see Spectral flux densitySpectral flux densityIn spectroscopy, spectral flux density is the quantity that describes the rate at which energy is transferred by electromagnetic radiation through a real or virtual surface, per unit surface area and per unit wavelength. It is a radiometric measure, as distinct from measures that characterize light...
.
Spectral flux is a measure of how quickly the power spectrum of a signal
Signal (electrical engineering)
In the fields of communications, signal processing, and in electrical engineering more generally, a signal is any time-varying or spatial-varying quantity....
is changing, calculated by comparing the power spectrum for one frame against the power spectrum from the previous frame. More precisely, it is usually calculated as the 2-norm (also known as the Euclidean distance
Euclidean distance
In mathematics, the Euclidean distance or Euclidean metric is the "ordinary" distance between two points that one would measure with a ruler, and is given by the Pythagorean formula. By using this formula as distance, Euclidean space becomes a metric space...
) between the two normalised
Audio normalization
Audio normalization is the application of a constant amount of gain to an audio recording in order to bring the average or peak amplitude to a target level ....
spectra.
Calculated this way, the spectral flux is not dependent upon overall power (since the spectra are normalised), nor on phase considerations (since only the magnitudes are compared).
The spectral flux can be used to determine the timbre of an audio signal, or in onset
Onset (audio)
Onset refers to the beginning of a musical note or other sound, in which the amplitude rises from zero to an initial peak. It is related to the concept of a transient: all musical notes have an onset, but do not necessarily include an initial transient.In phonetics the term is used differently -...
detection, among other things.
Variations
Some implementations use the 1-norm rather than the 2-norm (i.e. the sum rather than the Euclidean distance).Some implementations do not normalise the spectra.
For onset detection, increases in energy are important (not decreases), so some algorithms only include values calculated from bins in which the energy is increasing.