ReplayGain ~ Advanced Volume Normalization

ReplayGain is … a technique invented to achieve the same perceived playback loudness of audio files. ~ Hydrogenaudio Knowledgebase

ReplayGain … allows players to normalize loudness for individual tracks or albums. This avoids the common problem of having to manually adjust volume levels between tracks when playing audio files from albums that have been mastered at different loudness levels. ~

If you’re using track gain, every song is played at 89 dB; no song is any louder than any other. If you’re using album gain, tracks will be played at 89 dB plus or minus a few dB, depending on how much louder or quieter each track is relative to the other tracks on the album. By definition, album gain is not going to make all tracks as loud as possible; the quieter tracks are going to remain that much quieter than the louder tracks, and they’ll average out to 89. ~ Hydrogen Audio

Using ReplayGain in Foobar

(1) First set the ReplayGain target values:

Preferences / Playback / ReplayGain
Source mode: by playback order
Processing: apply gain and prevent clipping according to peak

Foobar2000 Preferences - Playback

Foobar2000 Preferences – Playback – ReplayGain

Recommended Values:

Set Preferences / Preamp / Without RG values: to around -8.0 db

If you are also playing tracks which aren’t RG-tagged, they’ll be playing quite loud in comparison to the RG-tagged ones. To mitigate that, you can set the “Without RG info” Preamp level to, say, -11.9. This will make the player pretend they have -11.9 dB album gain. Thus if you played a non-RG-tagged copy of that loudest track, it would be played at 89 dB instead of its natural 100.91 dB, and would thus match the level that all the RG-tagged tracks are played at. However, then the quieter non-RG-tagged tracks would still be that much quieter. So you may find -8 or so to be a better “without RG info” preamp level, on average.~ HA Forum

I usually set my non-RG preamp to somewhere in the range of -7.0 dB to -9.0 dB. ~ HA Forum

I recommend setting the slider labelled “Without RG info” to -8.0 (that’s minus eight) or less. ~

If you listen to modern music -7dB/-10dB value should be correct. If you listen to older music, keep the value a bit lower because the average level of recently released tracks are higher. ~

(2) Next scan files:

  • Select Files / Right mouse / ReplayGain / Scan selection as single album (adds album and track ReplayGain tags)

Context - ReplayGain

ReplayGain - Scanning - small

Once the files are scanned, they can be played.

Foobar ReplayGain Override Component

Provides a way to specify which ReplayGain modes to use for each playback order. Track gain is probably desirable for random playback while with regular playback album gain is more suitable.

Preferences - ReplayGain override.PNG
Download ~

Alternative ReplayGain

Alternative ReplayGain engine. Should be faster as it does not use FFT.

ReplayGain in Linux

ReplayGain in Winamp

WinAmp’s use of these RG tags is enabled / disabled via the General Preferences – Playback – Replay Gain options ~

ReplayGain DLL

Win32 dll to normalize wav pcm files using replaygain

Foobar2000 DSP Plugin:

foo_dsp_replaygain ~ Temporary Replaygain

Additional References:

Track Gain (relative to the ReplayGain target volume)

ReplayGain’s Track Volume
$if(%replaygain_track_gain%,$puts(X,$sub(8900,$replace(%replaygain_track_gain%,.,)))$ifgreater($get(X),9999,$substr($get(X),1,3).$substr($get(X),4,5),$substr($get(X),1,2).$substr($get(X),3,4)) dB))

Track Volume (-18dB is equivalent to the ReplayGain target volume of 89dB)
$if(%replaygain_track_gain%,$puts(X,$sub(-1800,$replace(%replaygain_track_gain%,.,)))$ifequal($get(X),0,0,$ifgreater($get(X),0,$replace(+$substr($num($get(X),4),1,2),+0,+),$replace($substr($num($get(X),5),1,3),-0,-))).$substr($num($get(X),5),4,5) dB)

Album Gain (relative to the ReplayGain target volume)

ReplayGain’s Album Volume
$if(%replaygain_album_gain%,$puts(X,$sub(8900,$replace(%replaygain_album_gain%,.,)))$ifgreater($get(X),9999,$substr($get(X),1,3).$substr($get(X),4,5),$substr($get(X),1,2).$substr($get(X),3,4)) dB))

Album Volume (-18dB is equivalent to the ReplayGain target volume of 89dB)
$if(%replaygain_album_gain%,$puts(X,$sub(-1800,$replace(%replaygain_album_gain%,.,)))$ifequal($get(X),0,0,$ifgreater($get(X),0,$replace(+$substr($num($get(X),4),1,2),+0,+),$replace($substr($num($get(X),5),1,3),-0,-))).$substr($num($get(X),5),4,5) dB)

Track Peak

6 responses to “ReplayGain ~ Advanced Volume Normalization

  1. Pingback: Bluemindo ~ Simple GPL Audio Player | The Audio File

  2. Pingback: loudgain ~ Linux Loudness Normalizer | The Audio File

  3. Pingback: Recommended Audio Software | The Audio File

  4. Pingback: MusicBee ~ Windows Freeware Player | The Audio File

  5. Pingback: beets ~ The Music Geek’s Media Organizer | The Audio File

  6. Pingback: Mixxx ~ DJ Your Way. For Free. | The Audio File

Leave A Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s