Thread: Please Help me Analyze Wave ..

  1. #1
    Registered User
    Join Date
    Jan 2004

    Unhappy Please Help me Analyze Wave ..

    I got a problem with wave. I'm using Borland C++. First of all I already wrote function load wave file and can read header file.
    but I just want to know how to read amplitude value and pitch value from wave file... anyone know please help... T_T really got trouble with that..

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Have you visited say wotsit to get the specifications for the file format you're interested in.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jan 2004
    Okay I'm going to check that now.. But about specification for file format I'm doing with window wave file with out er'' compression i mean. so just window wave file (.wav) I hope this will answer ur last thread.

  4. #4
    Hardware Engineer
    Join Date
    Sep 2001
    AMPLITUDE - This is relatively easy... once you get your program to the point where you can read the "samples" from the wave file. Each sample actually represents the amplitude at a point in time. So, you just have to find the sample with the largest absolute value.

    PITCH - Rather difficult, unless the file is a simple waveform. If you're trying to analyze a sine wave, you can measure the time between zero-crossings to calculate the frequency/pitch. This might work with more complex waveforms like voice & music if you add a little "fuzzy logic" (i.e. to throw-out the obviously-wrong results.) The reason that this might work is that human-perceived pitch is related to the lowest frequency component of a complex waveform. And, the low frequency components generally have greater amplitude than the higher-frequency components. That is, low frequencies tend to dominate complex sounds.

    The better way is to use FFT (Fast Fourier Transforms) to determine the frequency components of the waveform. These frequencies should convert to pitch reasonably well. But, because pitch is a complex human perception, it may not work perfectly.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compression/Decompression Wave File and MP3
    By cindy_16051988 in forum Projects and Job Recruitment
    Replies: 51
    Last Post: 04-29-2006, 06:25 AM
  2. writing a wave file from my wave samples
    By Queatrix in forum Windows Programming
    Replies: 2
    Last Post: 12-31-2005, 11:54 PM
  3. Processing a sine wave file
    By subdene in forum C++ Programming
    Replies: 2
    Last Post: 07-12-2004, 03:04 PM
  4. Help open wave file in Borland C++ plz
    By toa2k in forum C++ Programming
    Replies: 1
    Last Post: 01-22-2004, 07:55 AM
  5. MP3 to WAVE and WAVE to MP3 conversion
    By Blizzarddog in forum C++ Programming
    Replies: 8
    Last Post: 01-01-2004, 08:32 PM