In the mid-to-late 1800s, Herman Helmholtz was building spectrographs of musical sounds by listening to them through a bunch of resonators of varying sizes that acted as band-pass filters, and recording how loud each harmonic sounded.
His writings are still relevant today.
https://www.amazon.com/Sensations-Tone-Dover-Books-Music/dp/...
I've heard that the Sethares book (which is much more recent) is really good too, but I don't have a copy of that one.
https://www.amazon.com/Tuning-Timbre-Spectrum-William-Sethar...