Taperssection.com

Gear / Technical Help => Post-Processing, Computer / Streaming / Internet Devices & Related Activity => Topic started by: Brian Skalinder on March 10, 2007, 01:46:58 AM

Title: file too fast/slow | speed problem | mismatched WAV header and data sample rates
Post by: Brian Skalinder on March 10, 2007, 01:46:58 AM
Edit to add:  if you have trouble with a file playing too fast/slow and need help, best bet:  start a new thread, you'll get more responses!  :)

Keywords:  speed correction, sample rate, pitch, time, wav header, too fast, too slow, chipmunk, chipmunks

Mismatched WAV header sample rate and actual data sample rate seems a fairly common problem.  The result:  the recorded file sounds too fast or too slow.  The following table outlines mismatched WAVE header and actual data sample rates and a description of the resulting improper sound:

Header     |  Data       |  Result           
=============================================
 44.1 kHz  |   32.0 kHz  |  Too fast
 44.1 kHz  |   44.1 kHz  |  Just right!
 44.1 kHz  |   48.0 kHz  |  Too slow
 44.1 kHz  |   88.2 kHz  |  Way too slow
 44.1 kHz  |   96.0 kHz  |  Way too slow
 44.1 kHz  |  192.0 kHz  |  Ridiculously slow
---------------------------------------------
 48.0 kHz  |   32.0 kHz  |  Much too fast
 48.0 kHz  |   44.1 kHz  |  Too fast
 48.0 kHz  |   48.0 kHz  |  Just right!
 48.0 kHz  |   88.2 kHz  |  Way too slow
 48.0 kHz  |   96.0 kHz  |  Way too slow
 48.0 kHz  |  192.0 kHz  |  Ridiculously slow
---------------------------------------------
 88.2 kHz  |   32.0 kHz  |  Ridiculously fast
 88.2 kHz  |   44.1 kHz  |  Way too fast
 88.2 kHz  |   48.0 kHz  |  Way too fast
 88.2 kHz  |   88.2 kHz  |  Just right!
 88.2 kHz  |   96.0 kHz  |  Too slow
 88.2 kHz  |  192.0 kHz  |  Way too slow
---------------------------------------------
 96.0 kHz  |   32.0 kHz  |  Ridiculously fast
 96.0 kHz  |   44.1 kHz  |  Way too fast
 96.0 kHz  |   48.0 kHz  |  Way too fast
 96.0 kHz  |   88.2 kHz  |  Too fast
 96.0 kHz  |   96.0 kHz  |  Just right!
 96.0 kHz  |  192.0 kHz  |  Way too slow
---------------------------------------------
192.0 kHz  |   32.0 kHz  |  Ludicrously fast
192.0 kHz  |   44.1 kHz  |  Ludicrously fast
192.0 kHz  |   48.0 kHz  |  Ludicrously fast
192.0 kHz  |   88.2 kHz  |  Way too fast
192.0 kHz  |   96.0 kHz  |  Way too fast
192.0 kHz  |  192.0 kHz  |  Just right!

When encountering mismatched WAV header sample rate and data sample rate, simply change the WAV header sample rate so it matches the data sample rate.  For example, if the WAV header's sample rate is 48 kHz and the data's sample rate is 44.1 kHz (symptom: the recorded file sounds fast), change the WAV header sample rate to 44.1 kHz.  Note:  this is NOT sample rate conversion (i.e. resampling, typically a somewhat lengthy, and destructive, process), but rather a quick and easy change to the WAV header only - none of the actual data is changed.  Different commonly used audio editors provide slightly different ways of accomplishing this goal.  Here are some of the more common audio editor workflows for fixing this problem:

Changing the WAV File Header's Sample Rate (not Sample Rate Conversion)

Change Sample Rate (http://www.audiosignal.co.uk/Resources/changerate.zip)

Edit to add:  Thanks to Teddy for a master link in another forum that lead me to this tool:  Change Sample Rate (http://www.audiosignal.co.uk/Resources/changerate.zip), a utility that changes the WAV header to the user's desired sample rate.  It does not perform sample rate conversion.

Audacity


WaveLab


Adobe Audition (Syntrillium Cool Edit Pro before re-branding)

For both 16- and 24-bit files:


MAGIX Samplitude SE v8


Sony Sound Forge

Thanks to Genghis Cougar Mellen Kahn for these instructions...

Title: Re: file too fast/slow | speed problem | mismatched WAV header and data sample r
Post by: cleantone on March 10, 2007, 02:22:23 PM
Nice post. Wanted to add the freeware (for mac) called soundhack (http://www.soundhack.com/freeware.php) that I use for this purpose.
Title: Re: file too fast/slow | speed problem | mismatched WAV header and data sample r
Post by: Brian Skalinder on March 10, 2007, 02:36:07 PM
Nice post. Wanted to add the freeware (for mac) called soundhack (http://www.soundhack.com/freeware.php) that I use for this purpose.

Any chance you're willing/able to post the workflow?
Title: Re: file too fast/slow | speed problem | mismatched WAV header and data sample r
Post by: cleantone on March 11, 2007, 02:57:49 PM
Well...

Launch Soundhack

open file (apple O) or File, Open

select Header Change under the "Hack" column (apple H)

change the sample rate to the desired rate

click Apply and then Save Info.

The file will now have a new header written in it.
Title: Re: file too fast/slow | speed problem | mismatched WAV header and data sample r
Post by: Brian Skalinder on March 11, 2007, 02:59:13 PM
Well...

Easy!  Thanks, cleantone.   :coolguy:
Title: Re: file too fast/slow | speed problem | mismatched WAV header and data sample r
Post by: philR on April 21, 2007, 06:31:08 PM
well i used Audacity and the file still says that it's 48 sampling rate, but it plays fine and isn't chipmunked anymore.  did i do anythign wrong?   ???
Title: Re: file too fast/slow | speed problem | mismatched WAV header and data sample r
Post by: cleantone on April 21, 2007, 06:55:36 PM
That just means that the file now "knows" what sampling rate it is and plays properly. So it sounds like it is a 48khz file then right? You would need to convert the sample rate to get to 44.1khz if that is your goal.
Title: Re: file too fast/slow | speed problem | mismatched WAV header and data sample r
Post by: philR on April 21, 2007, 07:03:59 PM
That just means that the file now "knows" what sampling rate it is and plays properly. So it sounds like it is a 48khz file then right? You would need to convert the sample rate to get to 44.1khz if that is your goal.

that's the thing, it sounds like it's a 44.1 file and i burned it to CD and it plays fine.  just still says it's a 48 file.  weird.
Title: Re: file too fast/slow | speed problem | mismatched WAV header and data sample rates
Post by: Jhurlbs81 on May 30, 2007, 02:55:06 PM
Thanks a bunch Brian! :)
Title: Re: file too fast/slow | speed problem | mismatched WAV header and data sample rates
Post by: Carrera2 on June 24, 2007, 01:52:34 PM

For Audacity, I believe you also need to change the project rate in the lower left hand corner to the desired sample rate.  Before I did so, Audacity acted as though it was going to dither the file even though I had changed that option to none, and was teed up to take quite a long time to convert.  After changing the project rate to 44.1 kHz, the conversion took a very short time.

Title: Re: file too fast/slow | speed problem | mismatched WAV header and data sample r
Post by: SmokinJoe on July 29, 2007, 10:11:39 AM
*nix heads who like commandline tools..... strip the wave file header, and replace it with a good one

Example: I recorded a 16/44.1 file (AD20 > H120)... for some reason header was set to 24000.

1) Strip header: shntool cat -nh broken_input_file.wav > temp.raw
2) Replace header: sox -t raw -w -c 2 -s -r 44100 temp.raw fixed_output_file.wav

Notes: cat -nh means "no header"
          sox -t raw means type raw
                -w means 16bit words
                -c 2 means 2 channels
                -s means signed data
                -r 44100 means
Title: Re: file too fast/slow | speed problem | mismatched WAV header and data sample rates
Post by: Carrera2 on July 29, 2007, 02:00:23 PM

Great, I love finding new stuff:

http://sox.sourceforge.net/Main/HomePage

+T