Skip to main content

Topic: Understanding Mp3Gain? (Read 2042 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • sigrun
  • [*]
Understanding Mp3Gain?
So I understand that Mp3Gain essentially adjusts the volume of Mp3 files. I also understand that clipping is when the volume brakes a certain level and causes distortion.

But what I am having trouble understanding is the clipping that Mp3Gain changes and the clipping on the track that it can't adjust and why some tracks clip at lower levels than others.

Also I was reading the old thread on "WaveGain vs Mp3Gain", and if I read it correctly WaveGain is the better option but I am unsure exactly what it does to be beneficial and how significant it is.


Any help on explaining this stuff would be appreciated!
  • Last Edit: 25 November, 2011, 11:15:16 AM by sigrun

  • saratoga
  • [*][*][*][*][*]
Understanding Mp3Gain?
Reply #1
Lossy coding introduces quantization noise. If your audio is near clipping the added noise can cause clipping. Lowering the volume can prevent that.

  • [JAZ]
  • [*][*][*][*][*]
Understanding Mp3Gain?
Reply #2
Mp3Gain and WaveGain do the same, but they are applied over a different medium (yes, i use the word medium here to differentiate between lossy and lossless).

Both calculate the peak amplitude and the "perceived loudness" as per replaygain specification.

The key difference is the ability to have values over full scale (integer PCM cannot, lossy and float PCM can), and in the way the lossy audio is different than the lossless original.


Saratoga mentioned quantization noise. That's only part of the problem. Lossy encoding filters and exploits other features like frequency masking, where the lossy codec might skip some frequencies because they are not heard in the context of other stronger frequencies.

All these affect the waveform, and as such, can affect the peak value.
As an example, playing a sine at 20Hz and another at 40hz at the same amplitude will cause the peak amplitude to double* compared to only playing one of them. This is an extreme example, but can give you an idea of what happens.

So, if the original signal is quite compressed (as in DSP), this situation is more prone to happen.


* ok, it will double, if it is played with an offset of 1/4th of pi radians.
  • Last Edit: 25 November, 2011, 01:31:50 PM by [JAZ]

  • DVDdoug
  • [*][*][*][*][*]
Understanding Mp3Gain?
Reply #3
Quote
So I understand that Mp3Gain essentially adjusts the volume of Mp3 files. I also understand that clipping is when the volume brakes a certain level and causes distortion.
Clipping is flat-topped distorted waves that  happens when you try to go over the maximum level.  You can clip a WAV file if you try to go over 0dBFS, you can clip your digital-to-analog converter during  playback, or you can clip a 100W amplifier if you try to get 110 Watts out of it.

Clipping happens to the wave peaks, but perveived loudness doesn't depend on peaks, it depends on the average level and the frequency content. 

Quote
But what I am having trouble understanding is the clipping that Mp3Gain changes and the clipping on the track that it can't adjust and why some tracks clip at lower levels than others.
Most digital music (including quite sounding songs) is already "normalized" with peaks at or near 0dB (the digital maximum)...  All of these files have equal (maximized) peaks, but some songs sound louder than others.  You can safely reduce the loud-sounding files, but you can't increase the quiet-sounding files without clipping.   

So, MP3Gain will reduce the volume for most of your music.  This gives it some "breathing  room" and makes it possble to match the volumes of most loud-sounding files and quiet-sounding  files without clipping. 

Still, some songs are too quiet-sounding and can't be volume matched without clipping.  MP3 gain gives you a choice.  If you setup MP3Gain to "prevent clipping", it will boost the volume as much as possible without clipping.  If you allow clipping, it will adjust-up the average volume and the clips will be clipped (of some files).