Could you elaborate on this a bit more?What Tadzio was saying is: If you just measure the peaks, you're not going to get the desired result.
Technically, the definition of normalizing the file
is measuring the highest peak in the song and then bringing up the level of the whole song so that the one peak hits 100%.
But that won't get the desired result. The desired result is to have all the songs at a similar
apparent volume. But the only way to do this properly is either with a) compression, or b) getting a more average volume from the track rather than just measuring the peaks.
You're right in that you don't want to adjust the gain so much that it clips the peaks. So no matter what algorithm you choose to implement, you need to measure the peaks so that you can notify the user if they choose to exceed 100% so that they can decide if a few clipped peaks are OK.
Let me elaborate further and give a concrete example. This comes from direct recent experience:
I have an 80's-era album by Yes titled "Big Generator". It's a really good album. But I don't listen to it as much as I should because it's mastered poorly. Its apparent volume level is very quiet. Even on the really loud rocking songs (such as "Almost Like Love", which includes some full-blast Tower Of Power-style horn section work), it seems dull, quiet, and lifeless.
On the other hand, a copy of Madonna's recent "Ray of Light" is mastered in such a way that it seems many
many times louder. I'm not talking just a few notches on the volume knob. I mean that the
quietest song on Ray of Light seems at least 15db louder than the
loudest song on Big Generator. On my Empeg, I have to crank Big Generator all the way up to 0db to make it sound good. But when I listen to Ray of Light, that level would be damaging to my speakers. So for Ray of Light, I have to crank it back to at least -10 or -15 before things are OK again.
But if I take the raw .WAV data from those albums and look at them in a wave editor, I find that they both are already normalized. The peaks on Big Generator hit 100%, and the peaks on Ray of Light also hit 100%.
So what's the difference? Compression.
Compression, normalization, and equalization are among the last things done to an album before it gets pressed onto a CD. The process is known as "Disc Mastering" and there are companies that specialize in doing
just that. They know how to take the artist's master tapes and tweak them so that they sound good in the real world.
Ray of Light is mastered like a TV commercial: Highly compressed, so that everything seems loud. Big Generator is mastered more like a classical album, without any attempt to compress the audio before the final master.
Surely it's better to have music without the compression right? No, not necessarily. Even music with lots of dynamics can benefit from compression. The trick is to do it well. The production on Ray of Light is very crisp, and the album, sonically, is amazing to listen to. Big Generator's mix sounds muddy and dull in comparison.
I believe that if you were to apply a standard peak-detection algorithm to either of these albums, there would be little or no change made to the apparent volume of either one.
But if you tried to glean some kind of an average volume from them (not an easy task!), you would probably severly clip the Big Generator album's peaks in an attempt to make it sound as loud as Ray of Light.
I don't see an easy algorithmic solution to this problem. The only thing I can think of is that you can let the user decide themselves how much to adjust the global gain. For instance, in my case, I might try adding just a couple of DB to Big Generator and then listen to see if the clipped peaks are noticeable. But overall, what I'd rather do is
reduce the gain of the loud albums instead of adding gain to the quiet albums. Of course, there's probably an issue with a sonic "floor" there, too, and it might be just as bad of a problem. We'll have to experiment and see, I guess.
What a fascinating problem. This really cuts to the root of the issues of digital audio production. Why are recent CDs mastered so differently than older CDs? What is it about the mastering process that makes a disc sound good or bad? Proper compression is truly an art form.
Tony FabrisEmpeg #144