Identifying Fundamental Frequencies

Click For Summary
SUMMARY

The discussion focuses on identifying fundamental frequencies and harmonics from a .wav file using Matlab. The identified fundamental frequencies for the three vibrating strings are approximately 440 Hz, 523 Hz, and 698 Hz, with a notable second harmonic peak at 881 Hz. Participants emphasize the importance of integer multiples for overtones and acknowledge the limitations of graphical data interpretation due to factors like sampling frequency and window functions. The conversation concludes with insights on the inharmonicity of piano notes, highlighting that harmonics may not always align perfectly with theoretical expectations.

PREREQUISITES
  • Understanding of fundamental frequency and harmonics in acoustics
  • Familiarity with Matlab for plotting and analyzing power spectra
  • Knowledge of Fourier transforms and their application in frequency analysis
  • Concept of inharmonicity in musical instruments
NEXT STEPS
  • Learn how to use Matlab's FFT function for frequency analysis
  • Research the effects of sampling frequency on frequency resolution
  • Explore methods for identifying harmonics in audio signals
  • Study the concept of inharmonicity and its implications in musical acoustics
USEFUL FOR

Musicians, audio engineers, acoustics researchers, and anyone interested in analyzing sound frequencies and harmonics in musical recordings.

roam
Messages
1,265
Reaction score
12

Homework Statement



I have made a plot of a given .wav file in Matlab. The problem asks: find the fundamental frequencies of the 3 vibrating strings, and identify some of their harmonics.

Homework Equations


3. The Attempt at a Solution [/B]

So I made a Matlab plot of the power spectrum over the range 0 to 2000 Hz (the range we are required to plot):

Z0falcG.jpg


So how can I identify the fundamental frequencies using this plot (or by any other method)? And what would be their "harmonics"?

Any explanation would be greatly appreciated.
 
Physics news on Phys.org
How would you approach the problem if there was one vibrating string? What is charachteristic for the fundamental frequency of a string?
 
Orodruin said:
How would you approach the problem if there was one vibrating string? What is charachteristic for the fundamental frequency of a string?

That is exactly my question. How would you approach this problem? I was told that the vibrating strings should have fundamental frequencies of around 440, 523 and 698 Hz. But how can we see that from the graph?

P. S. the .wav file I am plotting is a digitized recording of a three note chord being played on a piano.
 
Did you actually look at the graph and try to identify the resonant frequencies?
 
  • Like
Likes   Reactions: roam
Thank you, yes the first resonance peak is at 440 Hz, the second one is at 523 Hz, and the third one is at 698 Hz.

There is also a fourth peak in the graph at ##881 \ Hz##. Is it valid to say that this is the second harmonic of the fundamental frequency ##439.8 \ Hz,## since ##881/2 \approx 440##?

I also identified a few other overtones of the 3 fundamental frequencies, but they are only approximately related to the fundamental frequency by a factor of N (= integer).
 
roam said:
Thank you, yes the first resonance peak is at 440 Hz, the second one is at 523 Hz, and the third one is at 698 Hz.

There is also a fourth peak in the graph at ##881 \ Hz##. Is it valid to say that this is the second harmonic of the fundamental frequency ##439.8 \ Hz,## since ##881/2 \approx 440##?

Yes, this is where you expect the first overtone to be. In general, the overtones for an oscillating string are expected to be located at integer multiples of the fundamental frequency.

roam said:
I also identified a few other overtones of the 3 fundamental frequencies, but they are only approximately related to the fundamental frequency by a factor of N (= integer).
Just looking at the diagram, I would say that the correspondence to integer multiples of the fundamental frequencies is pretty good. There are many factors which could result in not getting the exact corresponding values, including rounding errors, non-ideal strings, etc.

I would say every single peak in the diagram can be directly related to one of the fundamental frequencies.
 
  • Like
Likes   Reactions: roam
Thank you so much for the explanation, it makes perfect sense now.
 
Now that you've got your answers, I thought I might add some obiter dictum.
I don't know how you got the figures for the frequencies you have detected, but IMO you can't believe everything you see on a graph like this. Putting aside the resolution of the graphic and your ability to interpolate the axis scales, the mathematical calculations on which it is based are not exact. Depending on your sampling frequency and the number of terms in your transform, 440 Hz may not be one of the possible frequencies and the peak at 440 has to be shared between say 439.5 and 441.4.
Then the duration of your sample and the window function you use causes more smearing over other frequencies.

So I had thought to suggest, the one reliable feature of the data would be the ratio of the harmonics. As far as I understand it, harmonics are mathematically defined to be exactly 2x, 3x, 4x etc of the fundamental frequency.
But I thought I'd better check! This is sampled from a piano and sure enough harmonics of piano notes are not necessarily true harmonics! (Inharmonicity in musical instruments.)

So there's nothing you can bet your life on! I expect these days you can use many more sample points, calculate more accurately and get things more nearly ideal than I could with much slower computers, but there are inherent limitations which can't be removed entirely.
 
  • Like
Likes   Reactions: roam

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
894
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
7K
Replies
18
Views
3K