I'm using python 2.7 to compare tonal differences in guitar stings. I asked this same question in dsp.stackexchange.com but didn't have much luck so I figured I'd ask here, too.
I've found that in matplotlib, there are some great built-in features such as matplotlib.mlab.magnitude_spectrum and matplotlib.mlab.psd
The magnitude_spectrum function seems to be the no brainer, as it is the FFT of the signal, showing each specific harmonic. However, when comparing various guitar strings, it's tricky to pinpoint each peak to compare. The PSD function gives very nice smooth graphs, which is perfect for obvious visual comparisons.
My understanding is that PSD's are useful for random signals but not necessarily known signals. Is this true? And is there any reason I shouldn't be using the PSD for guitar string comparisons?
Here's what 1 second of a guitar pluck looks like using PSD and magnitude_spectrum:
Note that these are plucks of the same string and not different strings. I'm trying to make sure that my plucks are consistent prior to comparing various strings.