Scaling digital music

I haven't solved the problem of balancing MP3s, but I have thought about it.

I want to apply a single scalar amplification to balance every track so that I no longer need to adjust the volume knob on my digital player. I do not want a running automatic gain control (AGC) that compresses the dynamic range. I want the typical amplitude to be relatively constant, but without any danger of really loud bursts. You'd think that scaling by peak amplitudes might be better. I've tried that, and it doesn't work.

I use "lame" to convert WAV's to MP3s. It includes the value of the peak amplitude as a "Replay Gain" in the MP3 header.

http://en.wikipedia.org/wiki/Replay_Gain

Nevertheless, tracks still have variable volume on my players. This might be because every player I've tried, including software, ignores "Replay Gain," but I think the real problem is clipping.

As years go by, CD's have been increasingly clipped, with waveforms squared off, to make the typical volume higher. Clipping is a stupid filter that destroys signal and dynamic range, without changing the power of your amplifier. But you can't escape clipping anymore.

http://www.mindspring.com/~mrichter/dynamics/dynamics.htm

How do you undo this kind of damage? Clearly you can't scale by the peak amplitude anymore. I'd prefer an root-mean-square (RMS) amplitude, but again, that allows for ear-destroying bursts in tracks with a real dynamic range. I don't want to add clipping to good tracks, or to apply an AGC. I just want to scale down clipped tracks so they aren't playing at the max all the time. I think I want to multiply the RMS amplitude by some factor, and use that value as "Replay Gain" if larger than the maximum of the entire track. So what's the right factor?

"Lame" can also apply a scalar gain to encoded amplitudes, but not automatically. I would only dare scale down amplitudes since scaling up might cause more clipping.

Bill Harlan, April 2007


Return to parent directory.