• Welcome to ASR. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Normalize or Replay-Gain ?

Richx200

Active Member
Joined
May 20, 2024
Messages
201
Likes
70
Hello,

I consolidated numerous tracks from different sources into various configurations. As a result, I find myself holding the remote control to change the volume for each track.

I have a number of options to level the tracks, I just don't know which leveling would work the best.

First, there is normalizing the tracks, so the loudest peak is equal to a percentage of the track's maximum signal.
With this effect, I can use Peak Normalization, Average Loudness, Peak Loudness, Perceived Loudness (DBA) or Integrated Loudness (EBU in The R-128 standard)

The other method would be Replay Gain (my streaming device does support Replay Gain) The program PerfectTunes; "By Fault Track and Album gain is written into the track's Tab calculated with EBR128 and a LUFS of -18 target volume"

Normalization will change +/- the music's, volume while Replay Gain will put a +/- db and peak db in the tracks tab to be read by the playback device.

I can not imagine the disaster it would be to use the wrong application on a few thousand tracks, I need some advice.

Thank you for your time.
 
Use ReplayGain if your player supports it, as it does not alter the music files, only the tags. Also ReplayGain has both track and album modes. Normalization for when the player does not support ReplayGain. Some forms of volume normalization are one way and cannot be undone; it's therefore good to normalize only a copy of your files.
 
Last edited:
Regular "normalization" is peak normalization (it's a mathematical or statistical concept) and the peaks don't correlate well with perceived loudness. Most commercial music is already peak normalized.

There are a couple of advantages with ReplayGain... (Also MP3Gain & WaveGain).

1. It checks for clipping. If boosting a quiet-sounding song with high peaks (which is not unusual) it won't boost into clipping (unless you change the default settings). Some songs will still remain below the target but they won't be clipped.

BTW - The volume of MOST songs will be lowered and this bothers some people but if you have enough analog gain that's not a problem.)

If you simply Loudness Normalize you'll have to manually check for clipping.

2. It's designed for batch processing. Although if you want to use Album Gain I think you have to scan one album at a time.

...There's one odd thing with ReplayGain (at least the original ReplayGain). It uses an SPL loudness target of 89dB and that correlates to some digital level (which uses a different, but similar, algorithm than UBU R128). An SPL level has to be assumed because of the equal loudness curves. EBU R128 is also assuming some acoustic listening level (unknown to me) but all of the "numbers" are in digital dBFS.

Apple has Sound Check which is similar to ReplayGain.

(my streaming device does support Replay Gain)
All of the popular streaming services are already using their own loudness normalization. But the high-end lossless services may not... It can't be bit-perfect if they are messing with the volume.

And otherwise it shouldn't be possible with streaming because the file has to be scanned in advance....

I can not imagine the disaster it would be to use the wrong application on a few thousand tracks, I need some advice.
It's pretty safe because as you say, it's only adding a "tag" to the file. And you can always disable ReplayGain in your player software.

That's not the case with MP3Gain or WaveGain. They change the actual audio data so they work with any player.
 
Regular "normalization" is peak normalization (it's a mathematical or statistical concept) and the peaks don't correlate well with perceived loudness. Most commercial music is already peak normalized.

There are a couple of advantages with ReplayGain... (Also MP3Gain & WaveGain).

1. It checks for clipping. If boosting a quiet-sounding song with high peaks (which is not unusual) it won't boost into clipping (unless you change the default settings). Some songs will still remain below the target but they won't be clipped.

BTW - The volume of MOST songs will be lowered and this bothers some people but if you have enough analog gain that's not a problem.)

If you simply Loudness Normalize you'll have to manually check for clipping.

2. It's designed for batch processing. Although if you want to use Album Gain I think you have to scan one album at a time.

...There's one odd thing with ReplayGain (at least the original ReplayGain). It uses an SPL loudness target of 89dB and that correlates to some digital level (which uses a different, but similar, algorithm than UBU R128). An SPL level has to be assumed because of the equal loudness curves. EBU R128 is also assuming some acoustic listening level (unknown to me) but all of the "numbers" are in digital dBFS.

Apple has Sound Check which is similar to ReplayGain.


All of the popular streaming services are already using their own loudness normalization. But the high-end lossless services may not... It can't be bit-perfect if they are messing with the volume.

And otherwise it shouldn't be possible with streaming because the file has to be scanned in advance....


It's pretty safe because as you say, it's only adding a "tag" to the file. And you can always disable ReplayGain in your player software.

That's not the case with MP3Gain or WaveGain. They change the actual audio data so they work with any player.
Thank everyone for your help.

Looks like Replay Gain:

1. I could use a VST for the clipping, and at 100db SPL I still have 20db headroom.
2. The Program I use is PerfectTunes by DbPoweramp it does batch and EBU 128; according to the PertectTunes the track is calculated with EBR128 and a LUFS of -18 target volume.
3, Could always edit the tag or turn off Replay Gain and I use a M4A format.

Thank you for your time :)
 
Use ReplayGain if your player supports it, as it does not alter the music files, only the tags. Also ReplayGain has both track and album modes. Normalization for when the player does not support ReplayGain. Some forms of volume normalization are one way and cannot be undone; it's therefore good to normalize only a copy of your files.
Thank you for your time :)
 
Replaygain can be found here: https://en.wikipedia.org/wiki/ReplayGain
Indeed a 2001 standard.
EBU R 128 can be found here: https://en.wikipedia.org/wiki/EBU_R_128
Both do the same (loudness normalization) but R128 is considered a better method to cope with the loudness war.
Thank you for your time :)
Replaygain can be found here: https://en.wikipedia.org/wiki/ReplayGain
Indeed a 2001 standard.
EBU R 128 can be found here: https://en.wikipedia.org/wiki/EBU_R_128
Both do the same (loudness normalization) but R128 is considered a better method to cope with the loudness war.
I appreciate your time :)
 
2. The Program I use is PerfectTunes by DbPoweramp it does batch and EBU 128; according to the PertectTunes the track is calculated with EBR128 and a LUFS of -18 target volume.
That's equivalent to what Foobar2000 does. It's basically R.128 scanning aiming for the same loudness as "traditional" ReplayGain for compatibility with older scans still employing the legacy algorithm.
 
Last edited:
Juste a note in case it can help someone.

I just discovered and use 'rsgain', simple and powerful:

https://github.com/complexlogic/rsgain#easy-mode

Easy Mode recursively scans your entire music library using the recommended settings for each file type. Easy Mode is invoked with the command rsgain easy followed by the root of the directory you want to scan:

Bash:
rsgain easy /path/to/music/library

I use it with Moode Audio, installed and launched rsgain by ssh. Moode use MPD who have an option for replay gain.

And one last thing, it support every format, even 'm4a' from my iTunes library.
 
Last edited:
foobar2000 allows for recursive RG scanning and tagging.

The option to recognize folders as albums in the process can allow for automatic processing of large libraries.
 
My preferred method, although requires potentially a lot more faffing about is this:

ReplayGain scan the entire album, even if you only want particular tracks.
This performs a RGTrack scan on each track, then averages the values found and creates the RGAlbum gain from that average.
What I do here is to find the track with the most -ve offset RGTrack gain (the loudest track) and apply that as the RGAlbum gain manually for all tracks of the album.

So it sets the loudness reduction amount for the entire album based on the loudest track.

By doing this is multiple albums, it keeps the relative loudness of tracks even when put into cherry picked compilations.
It is not perfect though, and some tweaks of up to 1dB may be required to make this flow better, but it prevents any reaching for the volume control!

Foobar2000 and a bit of Powershell script and ffmpeg/flac tools makes things quicker and automated for me.
 
a bit of Powershell script and ffmpeg
I suppose you configure the ffmpeg tools to output JSON (aka. -of json ). And pipe it to ConvertFrom-Json cdmlet ?
It seems a nice way to batch process some audio file. I never invested many time in PowerShell, but I will keep the trick in memory in case of.
 
I suppose you configure the ffmpeg tools to output JSON (aka. -of json ). And pipe it to ConvertFrom-Json cdmlet ?
It seems a nice way to batch process some audio file. I never invested many time in PowerShell, but I will keep the trick in memory in case of.
If I recall I tried to do everything from Foobar2000, but couldn't do it all in-house (even using run command, which will run external .exe from fb2k).

I had to RG scan the tracks in the album. Then dump the full paths of the tracks (if not a one-track-album with cue sheet). Then run a script to red the metadata RG values and hold the greatest negative value, and only update the held value if it saw one more negative. Then apply that value to the RGalbum gain for each track/file.

Of course, using two columns to display %Replaygain_track_gain% and %Replaygain_album_gain% respectively and then just scan the tracks, and manually adjust the entire RG album gain yourself manually works.
 
Speaking of Foobar2000, your post give the idea to try it. And I have find it exists an Android version.

This Android version can even scan Windows share, I have "replay gain" scanned my files shared by Moode Audio on the Raspberry Pi. And he found 6 on 286 albums left alone by rsgain , so I asked him to calculate and save replay gain for the missing albums.

In glad to have find an Android solution to recommend for those not familiar with the command line.
 
I've been using Foobar2000 (running on windows) to scan my library for years. Just to repeat or add comments:

- It is incredibly simple. No scripts etc needed. Open as many files and folders as you want in FB2K. Select all the files in the main window with Ctl-A. Note that you can set up FB2K auto-select all files on startup. Right click and select ReplayGain, then pick "Scan as albums (by tags)", if all your tracks an albums have already been correctly tagged using MP3tag. You'll then see a results window that shows proposed album and track details. Click on "Update file tags" - you're done.

- it is completely non-destructive. It adds 4 tags to your files: AlbumGain, TrackGain, AlbumPeak & TrackPeak. There is a option to add a tag that indicates which scan method was used, if you care. You can remove the new tags en-masse in FB2K or in MP3 tag with just a couple of clicks. You can see the tags in any list presented by MP3tag, so long as you set the column display to include the relevant tags, and do things like sirt the columns as usual.

- most media players and streamers will offer the choice to the user to use album or track gain on playback, and may offer the ability to choose your own gain (FB2K does). Generally, if you play albums you'd choose to apply AlbumGain as this makes albums somewhat similar in volume to each other. I have measured 14dB differences from one album to another. Note that the relative track volume in a given album remains as it was, which you want. If you pick single tracks or play mixed playlists (tracks from multiple albums), you'd choose TrackGain on your playback device/media player.

On Android, I have not tested this yet but I think FB2K adds RG into its library (if you use the library feature, which is a database of tags and cover art). I don't think it adds tags to the actual files, but maybe there is a setting that lets you do this.

If your music includes MP3 files, you can use MP3Gain. This is semi-destructive as is adds a volume modifier into the actual frames of music contentm. It also adds tags to files that show up as APE tags in MP3tag that include "undo" information. If you remove those tags, your MP3s will be permanently altered but you can always regenerate from your FLAC easily enough.
 
foobar on android is not bad. It has a lot of features. Personally I don't like the pipe into playlists all the time. But it is the 2nd best player there I know of. VLC is my favorite.
 
- It is incredibly simple. No scripts etc needed. Open as many files and folders as you want in FB2K. Select all the files in the main window with Ctl-A. Note that you can set up FB2K auto-select all files on startup. Right click and select ReplayGain, then pick "Scan as albums (by tags)", if all your tracks an albums have already been correctly tagged using MP3tag. You'll then see a results window that shows proposed album and track details. Click on "Update file tags" - you're done.
It's missing one thing, but most if not all scanners might miss this. That is handling of albums with more than one disc. Say you have a folder album and under that CD1 to CD4. And you want them to be seen as one big album and album peak from all 4. This would require a different file layout or manual work.

I am OK with album/track peak per folder in this case too. But others might disagree. Especially in the classics/acoustics/vocal area I can imagine the wish to see the CD box as one piece of work.
 
I am OK with album/track peak per folder in this case too. But others might disagree. Especially in the classics/acoustics/vocal area I can imagine the wish to see the CD box as one piece of work.
All disk can be in the same folder and cd, tracks can bee encoded in the tag metadata. I have checked in my collection, similar situation have given a single "replay gain album" for all albums in the folder (coded in tags and filename cd-track-name.ext )
 
On Android, I have not tested this yet but I think FB2K adds RG into its library (if you use the library feature, which is a database of tags and cover art). I don't think it adds tags to the actual files,
On Android, files in a windows share, Foobar2000 seen to have saved the tag to the file when instructed to do so.
 
Back
Top Bottom