Spectral centroid
Measure used in digital signal processing
title: "Spectral centroid" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["digital-signal-processing"] description: "Measure used in digital signal processing" topic_path: "engineering" source: "https://en.wikipedia.org/wiki/Spectral_centroid" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0
::summary Measure used in digital signal processing ::
The spectral centroid is a measure used in digital signal processing to characterise a spectrum. It indicates where the center of mass 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{centroid} = \frac{ \sum_{n=0}^{N-1} f(n) x(n) } { \sum_{n=0}^{N-1} x(n) }, 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. |last1 = Schubert |first1 = Emery |last2 = Wolfe |first2 = Joe |last3 = Tarnopolsky |first3 = Alex |others = Lipscomb, S.D.; Ashley, R.; Gjerdingen, R. O.; Webster, P. (Eds.) |year = 2004 |url = http://icmpc8.umn.edu/proceedings/ICMPC8/PDF/AUTHOR/MP040215.PDF |title = Spectral centroid and timbre in complex, multiple instrumental textures |conference = International Conference on Music Perception & Cognition |conference-url = http://www.icmpc8.umn.edu/index_all.htm |book-title = Proceedings of the 8th International Conference on Music Perception & Cognition, North Western University, Illinois |publisher = School of Music and Music Education; School of Physics, University of New South Wales |location = Sydney, Australia |url-status = dead |archive-url = https://web.archive.org/web/20110810004531/http://icmpc8.umn.edu/proceedings/ICMPC8/PDF/AUTHOR/MP040215.PDF |archive-date = 2011-08-10
References
References
- (1978). "Perceptual effects of spectral modifications on musical timbres". Acoustical Society of America (ASA).
- (2022-02-17). "From Protein Design to the Energy Landscape of a Cold Unfolding Protein". The Journal of Physical Chemistry B.
- [http://recherche.ircam.fr/equipes/analyse-synthese/peeters/ARTICLES/Peeters_2003_cuidadoaudiofeatures.pdf A Large Set of Audio Features for Sound Description]. Technical report published by [[IRCAM]] in 2003. Section 6.1.1 describes the spectral centroid.
::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::