MP3 volume - using Replay Gain to normalise digital music volume

music volume control

Last Sunday I fell afoul of a problem shared by many digital music enthusiasts: divergent mp3 volume. I had setup a shuffled 'Sunday morning' playlist of soothing tracks, mostly non-classical. The first track, Fairport Convention's Who Knows Where The Time Goes? was very quiet so I upped the volume several notches. The next track, the decidedly more racey Black Cab by Jens Lekman, kicked in with the opposite problem, and I had to dive for the remote control to lower the volume and avoid waking the neighbours!

When music is acquired from different sources the volume levels can vary. When ripping CDs, volume can be different from CD to CD. It's particularly a problem when creating shuffled playlists because the biggest differences are from recording to recording rather than from album track to album track.

I realised I had never applied Replay Gain to my music collection. Replay Gain is a method for calculating the difference in volume from a stated 'ideal' volume and the volume in your digital music tracks or groups of tracks (the latter is important for reasons I'll reveal later). By analysing the sound data in a digital music file the loudness can be determined. Then, the difference between the ideal and the actual volume is calculated and the difference (the 'gain') stored inside the music file as a tag.

I like the fact that the difference is stored as a tag because this way the original music is not touched. This would cause problems with lossy compressed music.

When your music player plays music, if it supports Replay Gain it reads the gain value and applies this to the playback, increasing or decreasing the volume. This means your music player must support Replay Gain. Most do, with the notable exception of iTunes. Here's a list. The result is that all music with the gain value is output at the ideal volume, eliminating the inconsistencies between tracks.

quiet music

I mentioned 'groups of tracks' before. There are two types of Replay Gain: track gain and album gain. Track gain works for each distinct track across your collection as described above. The trouble with this is that intended differences in volume from track to track on a recording are not respected. Instead, all tracks are played at the same volume. This is a particular problem with classical music. As an alternative, album gain calculates the gain value on a per album or recording basis, with the same gain value for all tracks grouped in an album. This makes the album louder or quieter as a group of tracks and maintains the differences between tracks within the album.

Personally, I recommend album gain.

So how to use Replay Gain to normalise your MP3 volume? You can use some music players such as foobar2000 and Winamp. There are also specific utilities such as MP3Gain and FLAC, although these are limited by the fact that they only work for their respective file formats. Also, check out Automatic Volume Leveling in Winamp with Replay Gain and Replay Gain (another tutorial, this time using foobar2000).

These are one-off solutions and need repeating when you add music. I think regulating digital music volume is an on-going task and therefore a candidate for rule based automation. These seems no reason to me why mp3 volume normalisation cannot be automated.

Thanks to melloveschallah and ·Insomnia· for the images above.
tags: volume replay gain

The Music Library Management blog

Dan Gravell

I'm Dan, the founder and programmer of bliss. I write bliss to solve my own problems with my digital music collection.