Veej007
Apr 17 2004, 20:01
hey hey kiddies
alright, i've determined that i CAN hear clipping.
the thing is... maybe i've been listening to too much mainstream music... but it definitely seems to me that the non replaygained tracks sound better? richer? the gain adjusted ones seem muffled.
so what i am looking for is:
1) a stupidly easy explanation of what's going on. i mean, the cd contains frequencies that can't be adequately reproduced by 16/44.1? what the heck? how does that work, because cd fidelity is 16 bit/44.1 khz?
with my limited knowledge of recording and some links from loudnessrace.net, i found something that indicated that what's going on is that engineers are compressing cds all to crap so that they fill up the available frequency spectrum.
if the clipping is in the source (ie the masters, which clip long before being dithered down to cd fidelity), then nothing can be done about it? that's what all the loudnessrace stuff indicates... so then what exactly am i achieving by replaygaining? the mp3 is still going to clip no matter what, right? so all i'm doing is adjusting the clipping to a standardized level?
2) an assurance that i'm not screwing up my sound quality AT ALL by replaygaining. right? it's just lower volume, which is why i can notice the difference and maybe not hear as many details in the gain adjusted ones... but if i were to listen to them both at different volumes so as to negate the replaygaining, they'd be the same?
4) this is the most important one: hopefully a link to some sound samples which will illustrate to me how nonclipped audio sounds better than clipped, plus some links to samples that will indicate how replaygained tracks sound better than nonreplaygained ones.
(and yes, i HAVE read the forums and done searches, i'm still confused about this though)
Mike Giacomelli
Apr 17 2004, 20:44
QUOTE
1) a stupidly easy explanation of what's going on.
replaygain lowers volume, thus your music isn't as loud as you're used to.
Veej007
Apr 17 2004, 20:51
yes, i understand that, and i realize what it means as far as evening out the volume levels across my collection... i'm just asking what this is accomplishing in terms of dealing with the clipping
kjoonlee
Apr 17 2004, 21:01
Abnomally high volume can cause clipping. ReplayGain lowers abnormally high volume and raises abnormally low volume. So ReplayGain reduces risk of clipping.
Easy enough?
Ariakis
Apr 17 2004, 21:01
Most digital audio doesn't "clip," as most compressed formats have floating-point precision, or cannot extend past what upper integer bound they do have. Instead, most modern music has square peaks on the waveform, which occurs when the original is way too compressed/limited for "maximized volume." There's not much you can do about that, as the damage is already done. The distortion you hear occurs when the signal is so close to full-scale digitally that, when converted to an analog signal, creates peaks above above clipping level. What ReplayGain does, then, is move those square peaks down away from full-scale, 0dB, so that when converted to analog, those peaks no longer clip.
ReDVsion
Apr 17 2004, 21:27
Under normal circumstances, I wouldn't use replaygain, just the soft clipping limiter in foobar's DSP. However, I've found it much more convienient simply due to the widely varying volume levels of the music I listen to. Using replaygain means I don't have to constantly fiddle with the volume knob when switching from quiet jazz recordings to loud, ultra-compressed, high-gain rock albums.
Andavari
Apr 18 2004, 00:37
Using Replaygain will also allow you to not have to normalize your files prior to encoding, or writing an audio CD. It can be undone easily and quickly, whereas normalizing is a slow, permanent, and destructive method of trying to control the volume.
QUOTE(ReDVsion @ Apr 18 2004, 11:27 AM)
Under normal circumstances, I wouldn't use replaygain, just the soft clipping limiter in foobar's DSP.
The soft clipping limiter is actually a hard limiter. It may be better to use the advanced limiter.
Mike Giacomelli
Apr 18 2004, 02:28
QUOTE(Veej007 @ Apr 17 2004, 06:51 PM)
yes, i understand that, and i realize what it means as far as evening out the volume levels across my collection... i'm just asking what this is accomplishing in terms of dealing with the clipping
Sorry, thought you meant about the difference in sound between RG and not RG.
About clipping, from what I've read there is some rounding involved in decoding lossy files. If a sound was close to clipping, but not quite clipped on the CD, the extra rounding can cause it to clip when decoded. If you replaygain a file, it reduces the gain during decoding which should reduce the likely hood of decoder induced clipping.
Of course I could be wrong.
Veej007
Apr 18 2004, 17:26
ok, i guess that makes sense. for some reason i was under the impression that the problem was caused by the encoded file containing values that can't be reproduced within the range available to 16 bit audio. that confused the crap out of me, since both the source audio and target lossy file (mp3) are 16 bit...
i used the default rg value (89) and my tracks were REALLY muffled. is a value that low really necessary? i mean, if it's just taking care of some minute rounding error, why does it need to make such a huge adjustment?
also, please confirm this -- replaygain does NOT hurt fidelity at ALL, correct?
That is correct, provided you are doing it losslessly (ie using either --scale for LAME or running MP3Gain afterwards. Wavegaining the files before encoding can at least in theory result in some dithering.
Things should not sound muffled AT ALL when doing this... maybe your system is set up funny or something... do you have the master volume maxed out? Its usually analog and can introduce distortion. If you have an external speaker volume knob, set the system to about 75% and then adjust from the speakers.
Pio2001
Apr 19 2004, 04:19
Clipping in modern CDs because of the loudness race is one thing. Clipping in the decoder, prevented by replaygain is another.
The compressed and clipped music that you buy is as it is. You can't recover it.
But the point is that lossy encoders, such as MP3, MPC etc may introduce additional clipping to a wav file. This happens very often with modern clipped music, because the waveform is often squared, and the lossy encoder can remove the highest harmonics, if it considers that they are inaudible. This causes the flat part of the waveform, that is already maxed on the 0 db value, to oscillate at the frequency of the highest harmonic left.
But since it was clipped to begin with, it can't oscillate up, it can only oscillate down, which introduce additional unwanted clipping.
Replaygain, if you set the clipping prevention ON, prevents this to happen. You just keep the original clipping of your music, without adding extra distiortion.
If, like me, you don't like replaygain to work as it is intented to, lowering the volume of loud CDs, you have two solutions.
In Winamp plugins, the target value of replaygain was configurable, set at K-14 by default (that is 89 db). If you set it to K-2 instead, clipping prevention ON, the target will be 101 db, which should never lower the volume more than necessary to avoid clipping. The drawback is that albums that are very quiet will be amplified (but they have to be too quiet for this, with an album peak level below 0db).
Second solution, Foobar's volume DSP can act as a clipping prevention too. But someone must tell us if it works for MP3, Vorbis or other formats. I just checked MPC. I set it to -2 db, and I have nearly no clipping added anymore (exept in pathological cases, when the audio is very distorded anyway, so it doesn't make an audible difference).
Of course, we'd prefer a plugin that would just read the album peak level of the file and set the volume accordingly, only if needed. It should be easy to develop, but I'm not familiar with plugin development, and I have no compiler installed on my machine anyway.
QUOTE(Pio2001 @ Apr 19 2004, 12:19 PM)
Of course, we'd prefer a plugin that would just read the album peak level of the file and set the volume accordingly, only if needed. It should be easy to develop, but I'm not familiar with plugin development, and I have no compiler installed on my machine anyway.
You can do exactly the same what you've done with winamp (increasing RG target volume and scaling down clips that clip after applying RG) with foobar2000. Check the replaygain settings (Preferences -> Playback). Or use Advanced limiter or (ab)use Dynamics compressor to prevent clipping without changing volume at all.
mojoworkin'
Apr 19 2004, 07:30
Okay, if lossy encoding can cause additional clipping to heavily compressed/clipped files, that must mean that the AACs and WMAs offered by the downloading services (iTunes, Napster 2.0) not only sound worse because of the low bitrate compression, but also have distortion added by the encoding.
If so, this is just another reason to stay away from what many are calling the future of music distribution. Most pop/rock songs are already hypercompressed/clipped.
Do any types of lossy encoders, such as Lame aps, tend to minimize this added clipping?
Torben Schink
Apr 19 2004, 07:41
mojoworkin'
If you read this thread carefully, you should have noticed that the additional clipping is added during the decoding, not the encoding. You can still prevent/reduce this by using replaygain.
QUOTE(mojoworkin' @ Apr 19 2004, 03:30 PM)
Do any types of lossy encoders, such as Lame aps, tend to minimize this added clipping?
Optimfrog Dual Stream seems to avoid those clipping issues, the same might apply to WavPack lossy.
Reducing volume before/during encoding minimizes the problem as well obviously (e.g. using --scale 0.x switch with lame).
MugFunky
Apr 19 2004, 09:18
if it sounds muffled, turn up the master volume. simple. if it's still muffled, get the wax out of your ears.
if you're using foobar, there should be no ABXable difference (strong ATH shaped dither) when you adjust analog volume to a set level. there's a little extra quantization noise from having lower volume in 16 bits output, but this is dithered and the noise is shifted to places you will not hear it. that's what noise shaping means.
replaygain, aside from preventing clipping, is extremely good for long playlists of varied genre. so, even though you must adjust the volume after applying replaygain, you wont have to touch it again like you would going between tracks like with winamp.
Pio2001
Apr 19 2004, 17:08
QUOTE(tigre @ Apr 19 2004, 01:31 PM)
You can do exactly the same what you've done with winamp (increasing RG target volume and scaling down clips that clip after applying RG) with foobar2000. Check the replaygain settings (Preferences -> Playback). Or use Advanced limiter or (ab)use Dynamics compressor to prevent clipping without changing volume at all.
Yes, I just saw that the K setting was present in Foobar, called "preamp".
But I prefer using the DSP volume control (no boost for completely quiet albums), and I certainly won't use dynamics compression or limiter, as it might introduce as much distortion as clipping, while lowering the volume solves clipping without introducing distortion.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.