Calculate the frequency of a sound .wav

  • Context: High School 
  • Thread starter Thread starter inisca
  • Start date Start date
  • Tags Tags
    Frequency Sound
Click For Summary

Discussion Overview

The discussion revolves around calculating the frequency of a sound from a .wav file, exploring the necessary parameters such as velocity and wavelength, and addressing the implications of audio sample rates. The scope includes technical explanations and practical applications related to audio processing.

Discussion Character

  • Technical explanation, Exploratory, Homework-related

Main Points Raised

  • One participant seeks clarification on the terms velocity and wavelength in the context of the frequency formula.
  • Another participant suggests a method to calculate frequency directly from a .wav file by counting samples between zero crossings and dividing by the sample rate.
  • A question is raised about the significance of the number 44.1 in the calculation and whether knowing the audio sample rate is beneficial.
  • It is clarified that 44.1 kHz refers to the standard audio sample rate for CDs, but the sample rate may vary depending on the source of the .wav file.
  • A participant acknowledges the assumption that the .wav file is from a CD may not be valid.

Areas of Agreement / Disagreement

Participants generally agree on the method for calculating frequency from a .wav file, but there is uncertainty regarding the assumptions about the sample rate and its implications for the calculation.

Contextual Notes

There is a lack of clarity regarding the definitions of velocity and wavelength as they relate to sound frequency, and the discussion does not resolve the implications of different sample rates on frequency calculations.

inisca
Messages
2
Reaction score
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


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.
 


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


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.
 


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

Similar threads

  • · Replies 30 ·
2
Replies
30
Views
16K
  • · Replies 21 ·
Replies
21
Views
2K
  • · Replies 1 ·
Replies
1
Views
11K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
6K
  • · Replies 20 ·
Replies
20
Views
5K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 31 ·
2
Replies
31
Views
5K
  • · Replies 11 ·
Replies
11
Views
6K