Calculate the frequency of a sound .wav

In summary, the conversation discusses the calculation of frequency for a .wav sound file. The formula for frequency is mentioned as velocity divided by wavelength. The speaker asks for clarification on the terms velocity and wavelength. Another member suggests calculating the frequency directly by counting the number of samples between 0 crossings and dividing by 44.1. The importance of knowing the audio sample rate is also mentioned.
  • #1
inisca
2
0
Hello all,
First of all I am new here and I don`t know if this thread is posted corectly.
I need to calculate the frequency of a sound .wav
I found a formula freq= (velocity / wavelength).
My question is: What is velocity and wavelength.Can someone please help?
Thanks
 
Physics news on Phys.org
  • #2


Hi inisca, welcome to PF

If you have a .wav file you can calculate the frequency directly. If the file is a single pure tone simply count n the number of samples between successive 0 crossings and divide 44.1/n to get the frequency in kHz. If the file is a mix of tones then you will need to do a Fourier transform.
 
  • #3


1. Why 44.1/n , what is 44.1?
2. does it help me if I know the audio sample rate ?
 
  • #4


44.1 kHz is the audio sample rate on a CD. If the .wav file was ripped directly from a CD, then its sample rate is 44.1 kHz. If it comes from some other source, it may have a different sample rate.
 
  • #5


Oh, yeah, thanks for mentioning that. I was assuming a .wav file ripped from CD. That may not have been a good assumption.
 

What is the first step in calculating the frequency of a sound .wav file?

The first step is to open the .wav file in a sound editing software or program.

How do I determine the length of the sound file?

Most sound editing programs have a feature that displays the length of the sound file. Alternatively, you can manually calculate the length by dividing the total number of audio samples by the sample rate.

What is the formula for calculating frequency from a sound .wav file?

The formula is frequency = sample rate / number of audio samples.

Can I calculate the frequency of any type of sound using this method?

Yes, this method can be used to calculate the frequency of any type of sound as long as it is in a .wav file format.

Is there a limit to the accuracy of the calculated frequency?

The accuracy of the calculated frequency depends on the sample rate and the length of the sound file. The higher the sample rate and the longer the sound file, the more accurate the frequency calculation will be.

Similar threads

Replies
2
Views
992
  • Classical Physics
Replies
5
Views
363
Replies
11
Views
3K
Replies
6
Views
1K
Replies
31
Views
721
Replies
9
Views
1K
Replies
1
Views
1K
  • Electromagnetism
Replies
1
Views
10K
  • Electromagnetism
Replies
1
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
204
Back
Top