Author Topic: What is loudness normalization, why would I need it, and how do I use it?  (Read 32422 times)

hiccup

  • Hero Member
  • *****
  • Posts: 5300
Loudness normalisation
What? Why?


When playing music on a computer or a portable audio player, you will often encounter some songs or albums sounding much louder then others and vice versa.

MusicBee has a feature to prevent such large differences in loudness between albums and tracks at playback.
You can find it under: Tools > Analyse Volume, or by selecting the song(s) or album(s), and right-click and select Send To > Volume Analysis.

It will analyse the perceived loudness of the audio tracks, and write volume adjustment tags to the files.
The audio itself is not affected in any way, so the sound quality stays exactly the same.
The song/album will only be played at an adjusted volume level as defined by the ReplayGain tag in the track.
(If you also have ReplayGain enabled for playback)

Loudness basics


When audio is recorded, registered and distributed, many choices are made by the involved technicians about the dynamics and the loudness.
Therefore there are recordings that will be perceived as very loud with no room for subtle dynamics, and there will be recordings that have more subtle content and a larger range in dynamics. For example an '80's radio hit-song' will be mastered much louder than the average classical recording.
(you can learn more about this by doing a web-search on 'Dynamic Range')

When playing such two tracks on the same audio equipment at the same set volume, there will be a large difference in the perceived loudness, which is of course not desirable, or worse, might even hurt or damage your ears or your speakers/headphones.

Thankfully there is an algorithm that is very good in analysing a song (or an album, a commercial, a podcast, an audiobook, etc.) for it's loudness as it is perceived by the average human ear, and it has an implementation in MusicBee's loudness analysis option.

It is called EBU R128. (or itu-r bs.1770-3 depending on global region/implementation)
In MusicBee, R128 works by first performing a psycho-acoustic analysis of a track to measure it's perceived loudness.
The resulting value (in the professional audio world called 'Integrated Loudness' and expressed as LUFS) is used to write track-gain and album-gain volume adjustment tags to your files.
These tags are read at playback and used to make adjustments to the volume they are played at.

MusicBee's 'Analyse Volume' panel

The checkboxes on the left can be used to select or unselect tracks to be processed.
You can choose to have either 'track' or 'album' gain tags written, or both.
Note that as soon as you press 'Proceed', the tracks are not only getting analysed for their loudness, but the resulting adjustment tags are also immediately written.

If 'on album basis' is checked, all tracks that are considered to belong to the same album will get the same value for the ReplayGain Album tag.
What is considered by MusicBee to make an album will adhere to your album grouping rules under Preferences > Sorting/Grouping > Grouping.

If you have tracks in view that are not considered to be part of the same album by MusicBee, but you still want them to get the same album gain value, you can force that by checking 'calculate a single album gain value for all the selected tracks'.

Clipping

For tracks that are 'loud' to begin with, depending on the slider position you have set for the desired loudness, tracks can be amplified into distortion at playback.
In the digital domain that is called clipping.
Clipping can vary anywhere in between being completely unnoticeable and being extremely ugly.
This will depend on the audio material and the severity of the clipping.
If you want to be alerted that clipping will occur for a track using the current slider setting, check 'alert when the ReplayGain adjustment would cause clipping'.
Then after analysing and writing the tags the panel will remain open, displaying the suggested adjustment values per track.
Note that the ReplayGain tags at that moment will have been written anyway, and clipping will occur if you leave things at that.
Select the track(s) you want to adjust, adjust the slider, make sure the checkboxes for track gain and album gain are still to your liking, and press 'Proceed' to re-analyse and write the new tag values.
The panel will remain open so you can repeat this for different tracks/albums with different adjustment values.
When done press 'Close'.

(see the image at the bottom that shows how clipping can occur)

MusicBee's adjustment slider


This slider allows you to set a perceived loudness target for your audio tracks.
You will find some suggestions and more details on the slider further down this article.
There is one aspect of the scale that has proven to be a bit confusing and often misunderstood.
It is the position on the scale marked '0'.
Do realise that in reality this position has no relation to any concept of 'zero' at all.
It is only some remnant of an ancient and obsolete loudness analysis algorithm that had different workings and different results.

So understand that even if you have the slider at this '0' position, loudness is being calculated and volume adjustment is being applied.
Just consider the '0' to maybe be helpful as some starting point, or it making it easier to memorise adjustments. Nothing more.

Suggested slider settings

This will depend on:

The material and variety of the media content in your library.
   - When your library contains mainly popular or rock music, a medium or higher setting somewhere around -18 LUFS or up might work for you.
   - When there is a large variety of media in your library, such as rock music, classical music, podcasts, audiobooks, etc., chances are you will need more 'headroom', and you will probably want to choose a lower setting around -23 LUFS or so.

The capabilities and overall quality of the audio chain.
   When playing on a portable device with low output or 'insensitive' headphones, you might want to use a higher LUFS setting, otherwise the music might play at a too low level. When playing on high quality audio equipment with enough power reserve, you may want to choose a lower LUFS setting, so to make sure the chances of any clipping distortion are minimized.

The chances of clipping occurring.
    Obviously, when you increase the target loudness of the slider, the chances of clipping occurring also increases.
    If you are concerned about clipping and want to avoid having to do manual corrections too often, try to make it a habit of having the adjustment slider at a low position.
 
The probability of normalizing your entire library consistently.
   If you start normalizing your library at a relatively high LUFS level, the chances are bigger that you will have to adjust new audio tracks later on to an adjusted lower level to avoid clipping. This of course will have the consequence that this will (re)create differences in loudness within your library. The higher a setting you chose as a starting point, the more often you will have to make exceptions to that setting later on.

ReplayGain playback


Since the audio remains untouched and only ReplayGain tags are written, ReplayGain must also be enabled at playback.
In MusicBee you can find settings for this under Main menu > Controls
You can choose between the modes: Track Gain only, Album Gain only, and Smart gain.
Smart gain will e.g. use Album gain values when you play albums as a whole, and Track gain values when you play separate tracks or have activated random play.

Portable devices that support ReplayGain will have similar settings.
If your portable device does not have support for ReplayGain but you still want to have the music transferred to it normalised for volume, you can do that:
Under MusicBee's synchronisation settings for your portable device you can activate 'level volume'.
In that case the audio volume of the tracks will be adjusted to the target volume that has been set.
Be aware that in that case the audio itself will be altered irreversibly.
In theory this may affect the quality of the audio.

Some technical details on R128 LU's and LUFS


In the audio world 'LU' is used as the measurement unit for loudness.
 - LU (loudness unit) is comparable to what you may know as dB.
 - LUFS is the scale that is used to divide loudness into LU's.
   (Loudness Units relative to Full Scale)

For defining the perceived loudness of an audio recording as a whole, the term 'Integrated Loudness' is used.
In the professional audio- and broadcasting world (depending on the country and it's legislation) usually a value of -23 LUFS or -24 LUFS is used as the target for the Integrated Loudness.
In many countries this is even mandatory by law. (usually for commercial television and radio stations and streaming services)

The values on MusicBee's adjustment scale


So what do the numbers on the adjustment scale in MusicBee represent?
When performing loudness analysis, a target value for the required perceived loudness is set by the position of the slider, and tags are written accordingly.

As said, MusicBee internally calculates LUFS values according to the R128 standard.
At the moment of this writing, MusicBee has a slider scale ranging from -9dB to +6dB to set the desired resulting loudness.
Since 1dB on this scale can be considered equal to 1 LU, that gives a range of 15 LU's to make adjustments.
That range is from -27 LUFS as the softest, to -12 LUFS as the loudest.
(If you want to use values beyond this range you can edit the ReplayGain tag values in Tag Editor)

If you would set the slider at the 0dB position on the scale, in reality that means that the resulting integrated loudness will be exactly -18 LUFS.
So if for example you want it to be -23 LUFS, you must set the slider at -5dB.

An image that explains how clipping can occur

To conclude, here is a graphical example to explain better how clipping can arise from using loudness normalization:
Track A is a classical track with subtle dynamics, track B a contemporary pop rock song that blasts almost from the beginning to the end.
You can imagine that compared to each other, track A as a whole will be perceived to have a low overall loudness, and track B will be perceived as being loud.
So loudness normalization will then increase the volume of A, end decrease the volume of B.
When the target loudness is set at a high value, and clipping detection is disabled (and so any suggested adjustments to prevent clipping are ignored), the result is that the loudest peaks of song A will exceed the maximum digital threshold and will be clipping.



revised and updated 140221
Last Edit: February 14, 2021, 10:35:19 PM by hiccup



hiccup

  • Hero Member
  • *****
  • Posts: 5300

denny1

  • Newbie
  • *
  • Posts: 3
Thank you, I've been searching for this more detailed type of explanation for a couple of days! :)


OfLoveAndLiquor

  • Newbie
  • *
  • Posts: 5
What does the "calculate a single album gain value for all the selected tracks" checkbox from the Analyse Volume dialog do exactly? When should I check it?

Edit: I think I found it: https://getmusicbee.com/forum/index.php?topic=23969.0
Last Edit: August 20, 2020, 02:45:12 PM by OfLoveAndLiquor

hiccup

  • Hero Member
  • *****
  • Posts: 5300
What does the "calculate a single album gain value for all the selected tracks" checkbox from the Analyse Volume dialog do exactly? When should I check it?
Edit: I think I found it: https://getmusicbee.com/forum/index.php?topic=23969.0

Good question. That feature wasn't available yet when I wrote this article.
I revised the article and added this information.

lopies

  • Newbie
  • *
  • Posts: 1
Just joined and was looking for this exact information. Thanks for the time and detail. This also should be pinned.
Last Edit: April 04, 2021, 08:12:24 PM by lopies

hiccup

  • Hero Member
  • *****
  • Posts: 5300
Just joined and was looking for this exact information.
Thank you lopies, and welcome to the forum!

I remember starting the article with the intention of making it a brief explanation.
And then it got a bit out of control and quite lengthy.
I feared it might be too verbose, so it's nice to know when somebody finds it useful.
(and makes the effort to post that)

wysocki

  • Newbie
  • *
  • Posts: 6
When I select a folder under Computer then Analyse Volume, only SOME of the tracks are already checked. Why is that?

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7047
When I select a folder under Computer then Analyse Volume, only SOME of the tracks are already checked. Why is that?
The tracks that are checked are tracks for which the volume will be analyzed. I suggest checking them all and (re) analyze the volume based on album and on tracks.
Download the latest MusicBee v3.4 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
Check out the MusicBee Wiki.
How to post screenshots is here.