I'm adding this answer to show how using harmonics amplitude to characterize a sound can lead to problems.
The spectrum of a periodic signal can be computed using a Fourier transform, which purpose is to transform a sum of sinusoidal components into a sum of complex exponents of e.
The coefficients of the spectrum are therefore complex numbers. The real part of a coefficient is the frequency relative amplitude and the imaginary part is its phase offset which determines the amplitude of the component at time 0 (more). Most of the time spectrums are shown with only the amplitude information visible and offsets are not mentioned.
If all harmonics started at time 0 at their maximum like a cosine function, offsets would be equal and everything would be simple. That's usually not the case, causing alterations in the waveform. For example, let's create a wave at 440 Hz with overtones this way:
The harmonics parameters are:
- Frequencies: 440, 880, 1320, 1760, 2200 (Hz)
- Amplitudes: 1.0, 0.8, 0.22, 0.4, 0.55
- Phase offsets: 0.0, 0.4, 0.8, 0.7, 0.3 (unit = pi radians)
As visible these waves don't start at their maximum, except the fundamental (the sum doesn't start at its maximum either).
On the right hand side this is the spectrum as usually represented. I actually obtained this spectrum with a Fourier transform (DFT) of the blue wave. The graph shows only the amplitudes of the components, not the phase offsets.
Now, this spectrum corresponds to an infinity of different waves. It's easy to demonstrate this by reconstructing a wave from the amplitudes only and another from both the amplitudes and the phase offsets. To do this I performed an actual inverse DFT of the spectrum, once using only the real part of the coefficients, once using the whole coefficients:
Reconstructing waves from real and complex coefficients of the DFT
The first graph shows both reconstructions, and the resulting waves are indeed different (the blue wave is identical to the original wave)
The other rows show respectively the complex and real spectrums. They are actual spectrums obtained by performing DFTs on each reconstructed wave. They are identical, except the phase offsets.
Note the wave reconstructed without the phase offsets assumes all harmonics have a 0 offset, and therefore the sum has also a 0 offset, and starts at its maximum.
An infinity of different waves can be constructed from the spectrum amplitudes, just by varying the values of the (usually unknown) phase offsets.
Conclusion: If you want to characterize sounds from their spectrums, you need to know the harmonics amplitudes, as you asked for, but also the phase offsets. Getting the offsets might be a bit more difficult than the amplitudes.