Be a Supporter!

Loudness Normalization

  • 2,312 Views
  • 13 Replies
New Topic
AironEXtv
AironEXtv
  • Member since: Mar. 26, 2012
  • Offline.
Forum Stats
Member
Level 01
Filmmaker
Loudness Normalization 2012-07-10 04:39:47

This is for the site administrators, and most definitely up for discussion. Please take a good look at this request, as it may improve the listening experience for the audio portion of the site a great deal.

How about a reasonably easy way to ensure that nobody wants and needs to change the volume on the audio player of the site ?

Don't like having to change the volume for every track you listen to ? Just want to relax to a nice playlist ?

The answer is loudness normalization.

It's worked for almost ten years in the form of Replaygain (check the Wikipedia article for history).

Quite simply it means that the track is scanned for how loud it is overall with a well-tested algorithm and then tagged. A reference loudness level is chosen and each track is then turned up or down in its entirety to match the target loudness. The track is not altered in any way, except for being turned up or down.

This means that compressed tracks in a dynamics sense will be just as loud as more dynamic tracks.

How does this work ?

Foobar2000 ( http://www.foobar2000.org ) has a replaygain scanner that uses the EBU R128 standard( http://tech.ebu.ch/loudness) to scan the tracks and tag them in relation to a loudness of -18 LUFS. The only thing the flash player on the site then has to do is read that tag information and use it during playback. This is one method. There is a free open source (MIT license) library for scanning material at https://github.com/jiixyj/libebur128 , and it includes a commandline utility which can certainly be modified to anyone's needs.

Man, I would love not to have to change the playback volume so often, and this is how you do it. Services like Spotify perform loudness normalization like this by default because nobody likes to constantly have to change the volume on their playback device, software player or flash player.

Thanks for reading
Airon / Extelevision.com
Editor and Re-Recording Mixer


"My ego comes pre-shrunk" - Randy Thom

AironEXtv
AironEXtv
  • Member since: Mar. 26, 2012
  • Offline.
Forum Stats
Member
Level 01
Filmmaker
Response to Loudness Normalization 2012-07-10 05:01:07

Some additional information about loudness normalization can be seen in this presentation of the EBU :

EBU R128 Introduction by Florian Camerer - http://www.youtube.com/watch?v=iuEtQqC-Sqo
37:50 for some listening examples, comparing peak and loudness normalization

A mix of clips from well known tracks to demonstrate the effect of loudness normalization. All excerts used under Fair User for educational purpose.

http://www.mediafire.com/?fjxrq74yi29awfq (15 MB)


"My ego comes pre-shrunk" - Randy Thom

Buoy
Buoy
  • Member since: May. 18, 2006
  • Offline.
Forum Stats
Member
Level 40
Musician
Response to Loudness Normalization 2012-07-10 07:14:02

no, not worth it

- You still have to change your volume a lot. A highly compressed electronic song sounds much louder than a dynamic solo guitar piece with transients.
- Automated normalization can lead to inter-sample clipping and requires additional dithering.
- You have to either 1. make it flash-based, which hogs resources and makes the site version sounds different from the downloaded one or 2. apply it to an mp3 and then re-encode it as a new mp3 file, leading to a file with low quality relative to the filesize which is definitely not what you want when you're using it in games and movies.

AironEXtv
AironEXtv
  • Member since: Mar. 26, 2012
  • Offline.
Forum Stats
Member
Level 01
Filmmaker
Response to Loudness Normalization 2012-07-10 09:36:59

At 7/10/12 07:14 AM, Buoy wrote: no, not worth it

- You still have to change your volume a lot. A highly compressed electronic song sounds much louder than a dynamic solo guitar piece with transients.

That can only happen to a rather small degree. Certain bits may be louder. The frequency content plays a big role are well, so the more aggressive the sound, the louder it can seem, but even then the differences are not considerable in overall loudness. The most extreme example in the clip mix is Norah Jones versus Metallica's track from the Death Magnetic Album and it's pretty easy to spot just how horrid the Metallica song does.

The loudness situation would in fact improve dramatically, though it never can be perfect, which research suggests is an impossible goal.

- Automated normalization can lead to inter-sample clipping and requires additional dithering.

This can happen with dramatically dynamic material, which is also why Replaygain tags include a peak parameter. This would be the last safety net to avoid clipping.

An interesting fact is that with todays style of mastering and compression that so many on the site seem to employ, a truly full-volume flash player will be clipping the DA converters almost all the time when decoding those crunched MP3 files.

At the very least this clipping distortion, which is often masked by even more distortion from the actual tracks from compression, limiting, saturation or deliberate clipping, could be avoided. The peak parameter gained from the Replaygain scan would lower the playback volume as much as needed just in case some fantastically dynamic material comes along.

- You have to either 1. make it flash-based, which hogs resources and makes the site version sounds different from the downloaded one or 2. apply it to an mp3 and then re-encode it as a new mp3 file, leading to a file with low quality relative to the filesize which is definitely not what you want when you're using it in games and movies.

These are solvable problems.

1. The Flash player only needs to apply one level of gain in addition to what it already does. This costs next to no performance.

2. The site could tag the original MP3 files themselves before offering them for download, and suggest to the user to replaygain-tag them themselves as well, and then check them in a player that supports replaygain tags.

I'm going to make the assumption that the site produces a 128 kbps MP3 for playback in the Flash player.

There is the option of destructively altering the MP3, which however does not require re-encoding. The MP3 format has descriptions for every frame that lets you scale the volume in 1.5 dB steps. This is what the commandline tool MP3Gain lets you do, as well as Foobar2000 wiht its "Apply Track ReplayGain to MP3 data" and "Apply Album ReplayGain to MP3 data" functions.

That will still leave a margin of error of up to 0.75 dB in the loudness of the track when played in a player that does not support Replaygain, but it would still improve the situation. The peak parameter would be taken in to accout at this stage too.

Tagging the original file and the Flash player MP3 would be the least intrusive option. Btw, nobody needs to be worried about quality degredation. It's a simple gain applied to a single descriptor in an MP3 frame. The MP3 compression makes a real difference.

The cost of the entire process is likely to be two additional decoding passes and one tagging process. This assumes that the original is scanned, tagged, and then used to produce the already Replaygained new 128 kbps MP3.

A commandline version of a Replaygain scanner using the EBU R128 standard is already available and it's open source.
http://r128gain.sourceforge.net/

The question is, will or can the site maintainers pull this off.

If this is done, nobody will be louder than the other. This is the real benefit as the focus will fall more strongly on the sound quality of tracks, the production and the mix. Nobody would either have to turn something up again, or be surprised in a horrible way and turn a track down, which I consider the worst thing that could happen to anyone's music.


"My ego comes pre-shrunk" - Randy Thom

Buoy
Buoy
  • Member since: May. 18, 2006
  • Offline.
Forum Stats
Member
Level 40
Musician
Response to Loudness Normalization 2012-07-10 10:29:03

At 7/10/12 09:36 AM, AironEXtv wrote: That can only happen to a rather small degree. Certain bits may be louder. The frequency content plays a big role are well, so the more aggressive the sound, the louder it can seem, but even then the differences are not considerable in overall loudness. The most extreme example in the clip mix is Norah Jones versus Metallica's track from the Death Magnetic Album and it's pretty easy to spot just how horrid the Metallica song does.

I was thinking more about the difference in dynamics - I often have songs that are normalized but average around -12dB before compression due to loud drum transients, and compression and limiting is the only thing that will help then. Normalization helps if that isn't done already, but it's such a simple thing for the author to do (my DAW automatically does it on export by default) which is the main reason why I think it isn't worth the hassle of coding it into the site.

a lot of stuff about ReplayGain

If there already exists software that takes care of these problems and is easy to implement, then I guess that works..

I'm going to make the assumption that the site produces a 128 kbps MP3 for playback in the Flash player.

Newgrounds makes an exact copy of the file that was uploaded just fyi (except name and metadata and all that). I'm grateful for that, I wish Soundcloud would do that too

There is the option of destructively altering the MP3, which however does not require re-encoding. The MP3 format has descriptions for every frame that lets you scale the volume in 1.5 dB steps. This is what the commandline tool MP3Gain lets you do, as well as Foobar2000 wiht its "Apply Track ReplayGain to MP3 data" and "Apply Album ReplayGain to MP3 data" functions.
That will still leave a margin of error of up to 0.75 dB in the loudness of the track when played in a player that does not support Replaygain, but it would still improve the situation. The peak parameter would be taken in to accout at this stage too.

Really? I wasn't aware of that. At least intuitively it doesn't seem possible to do something that changes the value of each sample without decoding the mp3 into an uncompressed signal, applying the process to every sample, then encoding back to mp3. But fair enough

The question is, will or can the site maintainers pull this off.

Probably not if you just post it here since they don't browse this forum much, talk to mike (who made the audio player) or liljim (who is in charge of most of the audio portal stuff) if you want to see it done.

If this is done, nobody will be louder than the other. This is the real benefit as the focus will fall more strongly on the sound quality of tracks, the production and the mix. Nobody would either have to turn something up again, or be surprised in a horrible way and turn a track down, which I consider the worst thing that could happen to anyone's music.

Eh, songs that clip will still sound terrible and songs with loud transients will still be more quiet and an intro could still be anywhere from inaudible to full-volume, but I guess it could help somewhat. At least I don't have a problem with changing the volume since I have a big fat delicious volume knob by my side at all times. :)

InvisibleObserver
InvisibleObserver
  • Member since: Feb. 9, 2009
  • Offline.
Forum Stats
Moderator
Level 22
Musician
Response to Loudness Normalization 2012-07-10 14:31:43

Its a nice idea but I like uploading something and having what I made sound the way it sounded to me to everyone else. I don't like when sites change what I've done.


BBS Signature
AironEXtv
AironEXtv
  • Member since: Mar. 26, 2012
  • Offline.
Forum Stats
Member
Level 01
Filmmaker
Response to Loudness Normalization 2012-07-10 16:03:03

At 7/10/12 02:31 PM, InvisibleObserver wrote: Its a nice idea but I like uploading something and having what I made sound the way it sounded to me to everyone else. I don't like when sites change what I've done.

The radio does it all the time, and they do it in a highly destructive fashion too.

ITunes does loudness nomralization, though not by default. Spotify never came without it, which is probably why it's quite relaxing to listen to, depending on the genre :) .

A few years ago people were complaining so much about TV ads that a law was passed in the US not very long ago. This was the CALM act. The ITU-R BS.1770-1 spec became the basis for loudness normalization and the resulting delivery specs. As a result, ads no longer annoy people with their loudness, though of course they still do in other ways.

This doesn't change your product, it simply punishes overcompressed, bad sound. There can be good compressed sound, as some genres have excellent entries that use compression creatively or even brutally.

This loudness normalization just puts everyone on an equal level. It's not a dynamic process that changes your song over time, it just turns the volume up or down ONCE per song.

Thanks for the tip on who to contact. I'll send word to them.


"My ego comes pre-shrunk" - Randy Thom

AironEXtv
AironEXtv
  • Member since: Mar. 26, 2012
  • Offline.
Forum Stats
Member
Level 01
Filmmaker
Response to Loudness Normalization 2012-07-10 16:12:03

Really? I wasn't aware of that. At least intuitively it doesn't seem possible to do something that changes the value of each sample without decoding the mp3 into an uncompressed signal, applying the process to every sample, then encoding back to mp3. But fair enough

MP3 data is grouped in to chunks of data called frames.

You can even cut MP3 files with DirectCut at frame borders. DirectCut can even make fades, and that is the only part it reencodes. Of course it is much more elegant to add Replaygain tags, which is what ITunes does as well, though in its own format.

Btw, "Mastered for ITunes" means your tracks are loudness-normalized either track by track or across an entire album. The album replaygain value doesn't make sense on a site like Newgrounds, but it does make sense to release albums fully tagged like that, so that mastering engineers work of balancing the songs to each other on an album is not undone.


"My ego comes pre-shrunk" - Randy Thom

NorskeDrittsekk
NorskeDrittsekk
  • Member since: Apr. 10, 2012
  • Offline.
Forum Stats
Member
Level 02
Musician
Response to Loudness Normalization 2012-07-12 11:10:52

iTunes always has its myth of modifying and equalizing client's musical products, which is true. So as Bandcamp and Soundcloud.

I disagree with your point of view sir. Keep what it is where it belongs.

TheBenjerman
TheBenjerman
  • Member since: Nov. 12, 2008
  • Offline.
Forum Stats
Member
Level 14
Musician
Response to Loudness Normalization 2012-07-12 13:22:00

I don't know that I agree with putting a blanket normalizer on all audio files. For some of my tracks I have intentionally lowered the volume of the entire track, because they are meant to be listened to at a lower level. This might make sense on the radio, but dynamics are very important to film, TV and game composers at least, and I think as NG artists we should be allowed to make the choice to have our entire track below the threshold and not have to throw a louder part into a track to keep the rest of the song comparatively low. We don't WANT our (intentionally) quieter, more peaceful tracks to be as loud as everything else.

Now for those of us who don't know how to normalize something or have difficulty with this sort of thing, I could certainly see and OPTION of normalizing a track while we are submitting, but I don't want my soft tracks to be as loud as my loud ones!


BBS Signature
Mrmilkcarton
Mrmilkcarton
  • Member since: Jul. 19, 2006
  • Offline.
Forum Stats
Member
Level 11
Blank Slate
Response to Loudness Normalization 2012-07-12 16:30:06

Don't be a lazy fuck just turn it up and down yourself. I mix my music a certain way and I don't need something going and changing what I've already done.

jpbear
jpbear
  • Member since: Apr. 24, 2010
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to Loudness Normalization 2012-07-12 20:46:36

At 7/12/12 04:30 PM, Mrmilkcarton wrote: Don't be a lazy fuck just turn it up and down yourself. I mix my music a certain way and I don't need something going and changing what I've already done.

yout ell em boss fuck the game

BrokenDeck
BrokenDeck
  • Member since: Jun. 7, 2003
  • Offline.
Forum Stats
Moderator
Level 40
Musician
Response to Loudness Normalization 2012-07-12 22:11:17

This post and others like it belong in the Audio Portal Improvement Ideas thread.

Also, audio artists should have the freedom to make a track as quiet or as loud as they want without a brick wall limiter / loudness normalization process forcibly applied to it.

I believe in retaining as much DYNAMIC RANGE as possible.

Back-From-Purgatory
Back-From-Purgatory
  • Member since: Dec. 11, 2004
  • Offline.
Forum Stats
Member
Level 33
Musician
Response to Loudness Normalization 2012-07-12 22:23:02

At 7/12/12 10:11 PM, BrokenDeck wrote: This post and others like it belong in the Audio Portal Improvement Ideas thread.

Also, audio artists should have the freedom to make a track as quiet or as loud as they want without a brick wall limiter / loudness normalization process forcibly applied to it.

I believe in retaining as much DYNAMIC RANGE as possible.

I'm gonna have to agree with BrokenDeck on this one... Both that people shouldn't be forced into having their music mutilated by a limiter, and that this belongs in the improvements thread, or in one of the programmers inbox's, because it's very unlikely that they'll find this otherwise.

As far as I can tell, all the relevant links have already been provided... Soooo....


Audio/BBS Mod
News: Bye bye Skype - Music: Tonight Will Be The Night- Art: Kira
\/\/\/ Click the sig for fun times! \/\/\/

BBS Signature