Coder's Guild Mailing List

Re: Sound Files

Posted by Bernie Siegrist on 2001-04-17

Try GoldWave (http://www.goldwave.com) or any other wave editor; open the 
file, "Resample" it to 44100Hz, click "Save As..." and choose the new 
format (44100Hz 16bit stereo). That's all there is to it. :-)

As for quality, the new file should sound exactly the same. In case you'd 
like to know, here is why:

First thing to keep in mind is that a sound is stored as a (long) sequence 
of numbers giving the current "volume" (pro memoria, a sound is produced by 
constantly changing pressure, so these values are sort of "pressure" 
values). This might look like this (at 22050Hz)...
2 4 6 8 10 8 5 2...

Now, when doubling the resolution (which is what we're doing by when 
converting it to 44100Hz), each of the above numbers is now represented by 
*two* numbers. Basically this would be...
2 2 4 4 6 6 8 8 10 10 8 8 5 5 2 2...

See? The information is preserved. :-)  Play this at doubled speed and you 
won't hear a difference.

On a side note, GoldWave (and others) offer a function called 
"Interpolate"; this "smoothens" the waveform and gives you something like...
2 3 4 5 6 7 8 9 10 9 8 6 5 3 2 2...

(Explanation: Every inserted value is the average of the surrounding 
values, e.g. "2 4" --> "2 *3* 4". Theoretically this should sound 
"smoother", altho I for myself can't hear a great difference.)


Secondly, conversion from 8bit to 16bit (just so this essay is complete =): 
To simplify things, assume an 8bit sound is stored as an integer and a 
16bit sound is stored as a floating point number; this would convert
2 4 6 8 10 8 5 2...
to
2.0 4.0 6.0 8.0 10.0 8.0 5.0 2.0 ...

So basically a 16bit sound is more "exact", but again, there's no loss of 
quality. You just don't use the increased precision.

Last step, convert from mono to stereo - no big deal: you just take one 
copy of the mono track for each channel. :-)

Having done all this, your original sequence
"2 4 6 8 10 8 5 2..."
looks something like
"Left: 2.0 2.0 4.0 4.0 6.0 6.0 8.0 8.0 10.0 10.0 8.0 8.0 5.0 5.0 2.0...
  Right: 2.0 2.0 4.0 4.0 6.0 6.0 8.0 8.0 10.0 10.0 8.0 8.0 5.0 5.0 2.0..."

Again, it's all there, it's just 8 times larger and 87.5% of the bytes are 
superfluous. :-)  Other than that, it's ready for Nero. (Ofcourse it's not 
CD *quality*, but after all it's the CD *format* which is all Nero demands.)

Hope this helps!