
Spectral flatness or tonality coefficient,
[
][
] also known as Wiener entropy, is a measure used in
digital signal processing
Digital signal processing (DSP) is the use of digital processing, such as by computers or more specialized digital signal processors, to perform a wide variety of signal processing operations. The digital signals processed in this manner ar ...
to characterize an audio
spectrum
A spectrum (plural ''spectra'' or ''spectrums'') is a condition that is not limited to a specific set of values but can vary, without gaps, across a continuum. The word was first used scientifically in optics to describe the rainbow of color ...
. Spectral flatness is typically measured in
decibels
The decibel (symbol: dB) is a relative unit of measurement equal to one tenth of a bel (B). It expresses the ratio of two values of a power or root-power quantity on a logarithmic scale. Two signals whose levels differ by one decibel have a pow ...
, and provides a way to quantify how much a sound resembles a
pure tone
Pure may refer to:
Computing
* A pure function
* A pure virtual function
* PureSystems, a family of computer systems introduced by IBM in 2012
* Pure Software, a company founded in 1991 by Reed Hastings to support the Purify tool
* Pure-FTPd ...
, as opposed to being
noise
Noise is unwanted sound considered unpleasant, loud or disruptive to hearing. From a physics standpoint, there is no distinction between noise and desired sound, as both are vibrations through a medium, such as air or water. The difference aris ...
-like.
The meaning of ''tonal'' in this context is in the sense of the amount of peaks or resonant structure in a
power spectrum
The power spectrum S_(f) of a time series x(t) describes the distribution of power into frequency components composing that signal. According to Fourier analysis, any physical signal can be decomposed into a number of discrete frequencies, ...
, as opposed to flat spectrum of a
white noise
In signal processing, white noise is a random signal having equal intensity at different frequencies, giving it a constant power spectral density. The term is used, with this or similar meanings, in many scientific and technical disciplines, ...
. A high spectral flatness (approaching 1.0 for white noise) indicates that the spectrum has a similar amount of power in all spectral bands — this would sound similar to white noise, and the graph of the spectrum would appear relatively flat and smooth. A low spectral flatness (approaching 0.0 for a pure tone) indicates that the spectral power is concentrated in a relatively small number of bands — this would typically sound like a mixture of
sine wave
A sine wave, sinusoidal wave, or just sinusoid is a mathematical curve defined in terms of the '' sine'' trigonometric function, of which it is the graph. It is a type of continuous wave and also a smooth periodic function. It occurs often in ...
s, and the spectrum would appear "spiky".
The spectral flatness is calculated by dividing the
geometric mean
In mathematics, the geometric mean is a mean or average which indicates a central tendency of a set of numbers by using the product of their values (as opposed to the arithmetic mean which uses their sum). The geometric mean is defined as the ...
of the power spectrum by the
arithmetic mean
In mathematics and statistics, the arithmetic mean ( ) or arithmetic average, or just the ''mean'' or the '' average'' (when the context is clear), is the sum of a collection of numbers divided by the count of numbers in the collection. The coll ...
of the power spectrum, i.e.:
:
where ''x(n)'' represents the magnitude of
bin number ''n''. Note that a single (or more) empty bin yields a flatness of 0, so this measure is most useful when bins are generally not empty.
The ratio produced by this calculation is often converted to a
decibel scale for reporting, with a maximum of 0 dB and a minimum of −∞ dB.
The spectral flatness can also be measured within a specified subband, rather than across the whole band. Dubnov
has shown that spectral flatness is equivalent to information theoretic concept of
mutual information
In probability theory and information theory, the mutual information (MI) of two random variables is a measure of the mutual dependence between the two variables. More specifically, it quantifies the " amount of information" (in units such as ...
that is known as dual total correlation.
Applications
This measurement is one of the many audio descriptors used in the
MPEG-7 MPEG-7 is a multimedia content description standard. It was standardized in ISO/ IEC 15938 (Multimedia content description interface). This description will be associated with the content itself, to allow fast and efficient searching for material ...
standard, in which it is labelled
"AudioSpectralFlatness".
In
birdsong
Bird vocalization includes both bird calls and bird songs. In non-technical use, bird songs are the bird sounds that are melodious to the human ear. In ornithology and birding, songs (relatively complex vocalizations) are distinguished by func ...
research, it has been used as one of the features measured on birdsong audio, when testing similarity between two excerpts. Spectral flatness has also been used in the analysis of
electroencephalography (EEG) diagnostics and research, and
psychoacoustics
Psychoacoustics is the branch of psychophysics involving the scientific study of sound perception and audiology—how humans perceive various sounds. More specifically, it is the branch of science studying the psychological responses associated ...
in humans.
References
{{Reflist
Digital signal processing