- f : spectrum frequency
- a : spectrum amplitude
- F0 : fundamental frequency
- F : harmonics frequencies
- A : harmonics amplitudes
- n : number of harmonics
- m : buffer size
where k0 and kn are the indices of the first and the last harmonics having an amplitude greater than a threshold.
The brightness is calculated as the spectral centroid normalized by F0 :
The Tristimulus coefficients are calculated as energy ratios of the first harmonics :
The tonality coefficient is calculated as the Wiener entropy :
The inharmonicity is calculated as the sum of harmonics frequencies deviations :
Refer to the bibliography for references.