On Sun, 20 May 2001, Brian wrote:

> Is there any way I can normalize (aka set all to the same volume
> level) mp3s that I burn to CD? I'm using a script that reafds in an mp3
> with mpg123 and pipes to to cdrecord.  Very handy script, btw, it's in the
> cdrecord HOWTO.
> 
> It bugs me that I take a pile of MP3s and they're all recorded at various
> levels.  Is there anything I can do about this?

I'll give you a little algorithm that will make you happier, but you have
to read my little spiel first.

Honestly, I'm not being a wiseguy, but the answer is one form or other of
"adjust the volume knob during playback."  You can do that manually
at 'run-time', or you can do it at 'compile-time.'  The latter is all
'normalizing' is.

The trouble is that perceived volume is *not* a function of peak level,
but more of average, which is why the old VU meters are a lot better
indication of how loud something is.  Trouble is, digital audio only has
so many numbers to use for storing the quantized amplitude of the
waveform, so in that case you do need peak info.

All normalizing does is find the absolute loudest peak, calculate the
distance between that and the maximum allowable peak, and turn everything
up by the same amount.  So it's really possible to normalize two tracks
and have the one that got turned up the most sound the softest.

This is not just a problem with MP3s.  I spent 15 years in the audio
industry, and worked as a mastering engineer for the last part of it and
it really became a problem with albums in general.  Surprisingly few
people, especially those that never had to record to analog, know how to
get the balance and loudness to work *for* them.

So, here's the algorithm.  There is no way available that I know, except
some broken code I'm writing<G>, to do it except by ear and kinda
manually.

Play your mp3's and do not touch the volume setting anywhere.  Go through
them until you find the one that sounds the softest.  Now turn everything
else *down* until they match that.  Now normalize the softest one, and add
exactly the same amount of gain to all the others.  

You'll end up with a bunch of things that now sound like they are at the
same level.  You can burn 'em to disc.  Your disc may be louder or softer
than other discs, for the same reasons that you were having trouble with
the mp3's in the first place, but at least you'll be consistent within
that disc itself.

(I won't bother with the explanation of why you're going to be losing
fidelity by processing a decoded mp3.  You'll just want to give up on
using them if you care about it to that degree, anyway!)

Hope that helps,

Phil Mendelsohn
Chief Engineer
Hotdish Mastering

-- 
"To misattribute a quote is unforgivable." --Anonymous