
A command to query the selected Spectrum object.
If the complex spectrum is given by S(f), where f is the frequency, the centre of gravity is given by
∫_{0}^{∞} f S(f)^{p} df 
divided by the "energy"
∫_{0}^{∞} S(f)^{p} df 
Thus, the centre of gravity is the average of f over the entire frequency domain, weighted by S(f)^{p}. For p = 2, the weighting is done by the power spectrum, and for p = 1, the weighting is done by the absolute spectrum. A value of p = 2/3 has been seen as well.
The spectral centre of gravity is a measure for how high the frequencies in a spectrum are on average. For a sine wave with a frequency of 377 Hz, the centre of gravity is 377 Hz. You can easily check this in Praat by creating such a sine wave (Create Sound from formula...), then converting it to a Spectrum (Sound: To Spectrum...), then querying the mean frequency. For a white noise sampled at 22050 Hz, the centre of gravity is 5512.5 Hz, i.e. one half of the Nyquist frequency.
The centre of gravity is used in the computation of spectral moments:
© ppgb 20070225