When a note is played on the guitar, is the fundamental frequency always the strongest one or could a harmonic be the strongest one (in terms of amplitude). When could that happen? Also, when playing a note of, for example, 440Hz, is 220Hz also a harmonic or only larger multiples?
When I produce a spectrogram of a B3 guitar note I get this:
As you can see, the frequency of B3 (246Hz) does not seem to be the strongest frequency. Its approximate half (near 130) seems to be the strongest one.
This is the audio file (the B3 note is clear).
To generate the spectrogram, I use a STFT taken from the Librosa library:
import plot as plt def transcribe(filename): y, sr = librosa.load(filename, sr=40000) D = librosa.stft(y) plt.plot_spectrogram(D)
The plot.py module:
import matplotlib.pylab as plt def plot_spectrogram(stft_output, xlabel='Time', ylabel='Hz'): plt.figure() librosa.display.specshow(librosa.amplitude_to_db(stft_output, ref=np.max), y_axis='log', x_axis='time') plt.title('Power Spectrogram') plt.colorbar(format='%+2.0f dB') plt.tight_layout() plt.savefig('static/plots/' + 'spectrogram.png')