Reading Frequencies from Wave File

I am looking for a way to read a wave file into memory and then determine the frequency ( or frequencies ) of the sound in the file. The wave file would only contain one voice. I would like to convert the frequencies into pitch, but honestly that "should" be the easy part.

Does anyone have a code sample for reading this kind of data from a wave file or at least some tips to push me in the right direction?
Last edited on
I believe the easiest way is to search for Open Source libraries to help you. The library should help you to load .wav file into memory and determine frequencies of sound.
Thank you, I appreciate that. I am trying to find a way to do it manually so that I can define it in my own class and implement it in different languages, such as C# or Java.
C# has P/Invoke and Java has JNI, where is theproblem if the library is written in C/C++ ? Just write your own wrapper in C#/java around that.
It's not that there is a problem with the library being written in C++, I guess I just want to know how it works and be able to implement it myself. If I write a program using someone else's library, then it doesn't seem like I really did anything at all. I am sure that I am going about it the hard way, but I guess that is kind of the point.

Thank you for your patience and understanding!
Anybody out there know how this is implemented?
This guy [1] wrote a library, You don't have to use it if you don't want to but you should look at notes and the description of .wav files on this page. This might be useful.

[1] http://www.codeproject.com/KB/audio-video/CWave.aspx
Topic archived. No new replies allowed.