...The piano, the violin and drums all have different timbers and these can depend on:
(a) the number of harmonics (b) the phase of each harmonic relative to a specific harmonic (c) the intensity of each of the harmonics.
It is thus obvious that timber must be measured along at least the three dimensions I gave above.
Still, your approach should be fine for "composite tones" that are periodic.
Dick