HOME

TheInfoList



OR:

The spectral centroid 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 are a ...
to characterise a spectrum. It indicates where the
center of mass In physics, the center of mass of a distribution of mass in space (sometimes referred to as the barycenter or balance point) is the unique point at any given time where the weight function, weighted relative position (vector), position of the d ...
of the spectrum is located. Perceptually, it has a robust connection with the impression of brightness of a sound. It is sometimes called center of spectral mass.


Calculation

It is calculated as the weighted mean of the frequencies present in the signal, determined using a Fourier transform, with their magnitudes as the weights: : \text = \frac , where ''x''(''n'') represents the weighted frequency value, or magnitude, of bin number ''n'', and ''f''(''n'') represents the center frequency of that bin.


Alternative usage

Some people use "spectral centroid" to refer to the median of the spectrum. This is a ''different'' statistic, the difference being essentially the same as the difference between the unweighted median and mean statistics. Since both are measures of central tendency, in some situations they will exhibit some similarity of behaviour. But since typical audio spectra are not normally distributed, the two measures will often give strongly different values. Grey and Gordon in 1978 found the mean a better fit than the median.


Applications

Because the spectral centroid is a good predictor of the "brightness" of a sound, it is widely used in digital audio and music processing as an automatic measure of musical timbre.


References

Digital signal processing {{Signal-processing-stub