<s>
The	O
spectral	B-Algorithm
centroid	I-Algorithm
is	O
a	O
measure	O
used	O
in	O
digital	B-General_Concept
signal	I-General_Concept
processing	I-General_Concept
to	O
characterise	O
a	O
spectrum	O
.	O
</s>
<s>
It	O
is	O
calculated	O
as	O
the	O
weighted	O
mean	O
of	O
the	O
frequencies	O
present	O
in	O
the	O
signal	O
,	O
determined	O
using	O
a	O
Fourier	B-Algorithm
transform	I-Algorithm
,	O
with	O
their	O
magnitudes	O
as	O
the	O
weights	O
:	O
</s>
<s>
where	O
x(n )	O
represents	O
the	O
weighted	O
frequency	O
value	O
,	O
or	O
magnitude	O
,	O
of	O
bin	B-Algorithm
number	O
n	O
,	O
and	O
f(n )	O
represents	O
the	O
center	O
frequency	O
of	O
that	O
bin	B-Algorithm
.	O
</s>
<s>
Some	O
people	O
use	O
"	O
spectral	B-Algorithm
centroid	I-Algorithm
"	O
to	O
refer	O
to	O
the	O
median	O
of	O
the	O
spectrum	O
.	O
</s>
<s>
Because	O
the	O
spectral	B-Algorithm
centroid	I-Algorithm
is	O
a	O
good	O
predictor	O
of	O
the	O
"	O
brightness	O
"	O
of	O
a	O
sound	O
,	O
it	O
is	O
widely	O
used	O
in	O
digital	O
audio	O
and	O
music	O
processing	O
as	O
an	O
automatic	O
measure	O
of	O
musical	O
timbre	O
.	O
</s>
