Skip to main content
Topic: Revised attitude on normalization / question (Read 4588 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Revised attitude on normalization / question

I don't know exactly in which forum this should go, so I'm putting it here...

There was a time, not that long ago, that I scoffed at the idea of normalizing / scaling audio. "These tracks are mixed at the levels at which the studio intended..." I reasoned - since my goal was to preserve as much of the original CD sound as possible, I didn't want to jack around with the levels.

Of course, I've learned a bit since then. For one, I've been enlightened to the concept that compression introduces clipping by raising the levels slightly. So, if a CD is already pegged, the act of compression will tend to tip it over the edge (couple this with the fact that so many CDs these days are mixed with terrible dynamic compression for radio play...)

Going back over my previous mp3 encodes, I could verify this. Many of my tracks, mostly busy ones to begin with, sounded awfully distorted, esp. at higher volumes. Using the MAD plugin for Winamp, I could see that it was these, and only these, distorted tracks that showed definite clipped output (I don't have the luxury of these stats under my usual player - XMMS). Clipping was the culprit.

Obviously, I thought, high bitrates and fancy presets don't do me much good if I have nasty clipping artifacts...

Recompressing these tracks, with scaling, like -scale 0.98 with mp3 or mpc, reduces this problem and brings clarity back to these busy tracks. Of course, often, I would have to twiddle around to find the right scaling factor to simply eliminate the problem, whether it be .98, .95, .90, or whatever.

Finding that "magic number" for each track is difficult, because too high, and I have to re-encode with a lower value. But too low, and my tracks lose their "punch", and sound flat.

My question - is there a (quick / easy) way, under Windows and preferrably under *NIX, to analyze CDs and / or WAV files for peak levels, and thereby determine an optimal normalization / scaling factor for that CD's tracks to preserve sound, yet remove clipping artifacts completely?... I want to get the optimal scale level, use it, and encode only once.

I'm not concerned with creating mix CDs - I don't want a constant level for all tracks from all CDs... Different CDs SHOULD be at different volumes... I simply want my CDs to be as much as possible at the originally intended levels *without* any clipping.

Thanks in advance for any suggestions.

Revised attitude on normalization / question

Reply #1
> My question - is there a (quick / easy) way, under Windows and preferrably under *NIX, to analyze CDs and / or WAV files for peak levels, and thereby determine an optimal normalization / scaling factor for that CD's tracks to preserve sound, yet remove clipping artifacts completely?... I want to get the optimal scale level, use it, and encode only once.

Give mp3gain a try - www.geocities.com/mp3gain

It's a tool which scans mp3s for their peak volume and suggests a change to correct them, or lets you specify your own.  The nice part is that it corrects the volume losslessly on the mp3 files themselves, not requiring recompression or incurring any quality loss.

-h

Revised attitude on normalization / question

Reply #2
>>>'at higher volumes. Using the MAD plugin for Winamp, I could see that it was these, and only these, distorted tracks that showed definite clipped output'<<<

hmmm we've discussed it before on the r3mix.net message board

the mad decoder for winamp introduces additional clipping because it dithers the output (some would say incorrectly).  mp3s that have a peak amplitude very close to or at 0 dbFS will clip when decoded with mad for winamp, but most likely won't clip with other high quality decoders that don't use dither

to get around this you need to disable the dithering algorithm that mad uses

>>>'high bitrates and fancy presets don't do me much good if I have nasty clipping artifacts...'<<<

the only side effect you get when the signal is clipped is harsh static-like distortion (called digital distortion) <-- very annoying shit

>>>'with scaling, like -scale 0.98 with mp3'<<<

scale .98 won't work very well nowadays on really loud and compressed music. it will eliminate some clipping, but not all. there's still going to be considerable distortion in the music

>>>'I simply want my CDs to be as much as possible at the originally intended levels *without* any clipping.'<<<

thats not going to happen. if the levels of the source are high enough to cause clipping, you always need to attenuate the levels of the original if you want zero clipping in your mp3s. but sometimes this compromise is barely noticeable, and even if it is, then its much more preferred than having a completely distorted mp3
Be healthy, be kind, grow rich and prosper

Revised attitude on normalization / question

Reply #3
Quote
Give mp3gain a try - www.geocities.com/mp3gain


Thanks for the response.

Actually, I just downloaded this tool, and plan to play with it... it looks _very_ slick. However, I'm not sure it's exactly what I need...

My goal is to eliminate clipping, not to scale all my tracks to the exact same volume. After all, I'm not making mixes - I *want* my tracks to have different volumes. It wouldn't seem right to fiddle with the levels to bring JS Bach and Slayer to the same "radio gain", would it?  Besides, isn't it radio that created this damned dynamic compression mess in the first place? (i.e., classic rock CDs don't have this problem - only newer CDs...)

Unless I'm misguided on this issue. If so, please feel free to correct my flawed reasoning and persuade me otherwise.

Take care.

Revised attitude on normalization / question

Reply #4
If you want to eliminate all clipping, but still keep the relative volume in an album the same, I'd suggest using mp3trim (I understand the registered version does batch operations).  This also gets around the problem of quality loss caused by excessive scaling.  So, you would encode without the --scale switch, and then scale the mp3 file appropriately after the fact.  Removes all added clipping.

ff123

Revised attitude on normalization / question

Reply #5
Just an addition to ff123's message: There's no 16 bit "internal" resolution with MDCT coefficients, so there's no internal clipping when you encode mp3-file. So in princible you don't have to worry about quality degration due internal clipping (because there's no internal clipping) just as long as the CD source is not mastered badly (There might be clipping in the source!).

The clipping only occurs when decoding.
Then you can scale the mp3-file's global gain value so that the decoding doesn't have clipping. This is done for example with mp3Trim. And is "lossless" or more like reversible process. Of course you can scale the mp3 already (lame --scale) in the encoding phase, but you can do it also afterwards with programs like mp3Trim and mp3Gain.
Juha Laaksonheimo

Revised attitude on normalization / question

Reply #6
> My goal is to eliminate clipping, not to scale all my tracks to the exact same volume. After all, I'm not making mixes - I *want* my tracks to have different volumes.

I don't use the radio or album gain - I just select all tracks, perform "album analysis" to list the maximum values of each track, then "apply constant gain" in steps of -1 or -2 until each maximum value is below 32768, thus eliminating the clipping.

I usually do it on all tracks in an album at once (to keep them the same relative volume), but where separate songs are concerned I just use "apply constant gain" until each mp3 is clip free.

I don't particularly fancy the idea behind radio and album gain, so I don't use em.

-h

Revised attitude on normalization / question

Reply #7
you can eliminate or attenuate clipping distortion on wav files with this directx plugin: "sonic foundry clipped peak restoration" and although it's a sonic foundry plugin it will work with any directx enabled audio editing program (like wavelab b.e.).

the package is called "sonic foundry noise reduction dx 2.0", there's a 4.0 version but it doesn't come with the clipped restoration tool (or at least i was unable to find it) so be careful.

the plugin works by reducing the volume by a given amount of db's (making room for new peaks) and then interpolates and restores any clipped peak found, however since it works well neither do miracles with very hard clipped tracks.

and as for the mp3 if the source was clipped from the beginning then it's useless to use any amplification scale editor (like mp3gain or mp3trim) the distortion will be there no matter if you lower the volume

Revised attitude on normalization / question

Reply #8
Quote
Originally posted by gambito
and as for the mp3 if the source was clipped from the beginning then it's useless to use any amplification scale editor (like mp3gain or mp3trim) the distortion will be there no matter if you lower the volume


If the CD was "clipped" from the beginning, then (even if it sounds terrible) it's the way it was supposed to sound. Messing up with any restoration tools will change the music and make it different from the original, and if your goal is to "archive" the original this is definitely not the way to go...

Revised attitude on normalization / question

Reply #9
>>>'If the CD was "clipped" from the beginning, then (even if it sounds terrible) it's the way it was supposed to sound'<<<

ha!! yeah right

i don't think anyone will intentionally completely distort their music, unless they don't know jack shit about what they're doing!
Be healthy, be kind, grow rich and prosper

Revised attitude on normalization / question

Reply #10
normally you will not find clipped peaks on release albums but this is not the case with compilations that normally are rms normalized and not allways using dynamic compression :eek:

Revised attitude on normalization / question

Reply #11
Quote
i don't think anyone will intentionally completely distort their music, unless they don't know jack shit about what they're doing!


Unless they do it to 'be the loudest on radio'... As an example, try "Cold : 13 Ways To Bleed On Stage", if you know someone who has it. Among CDs, it is the worst culprit for massive digital distortion - I couldn't seem to salvage it very well. Unless I experienced a severe brain-fart and did something wrong, this CD is utter crap.

I have other CDs with distortion like this as well - but to a much lesser extent.

It's worth noting that nothing I have that was mastered before 1990 has this problem (anything 'classic') - they all sound great - with no need for scaling, I might add!

Thanks, radio, for ruining music. :mad:

Revised attitude on normalization / question

Reply #12
>>>'normally you will not find clipped peaks on release albums'<<<

heheh... i wish.. although clipped CDs are not all that common, there is still a fairly significant number of those circulating out there

this problem is just too "unknown". in other words, not everyone who buys a CD will bother ripping it just to look at the waveform. people who don't know what clipping is, or the side effects it produces, simply don't care about things like that because they don't know its there in the first place  .... that is unless they notice excessive distortion in the music

>>>'this is not the case with compilations that normally are rms normalized and not allways using dynamic compression'<<<

recording studios today don't use "normalize" to increase the overall loudness of the mix.. mmmaybe primitive studios of some kind

more modern studios or mastering houses are using whats called 'loudness maximizers', either in software or hardware form. it allows mastering engineers to get a hot, "punchy" signal by raising the threshold by a certain number of decibels while at the same time apply hard limiting to "push back" peaks that want to go "Over" full scale digital

using a tool like that obviously requires a trained ear because you could technically distort the music without actually clipping it. if clipping does occur as a result of hard limiting, then the distortion you get from that is more like a cherry on top of the ice cream

so krsna77, now you see that if tools like that fall into the wrong hands then we're all f.ucked in terms of how the sound quality of music is shaping out to be 

seriously though if that CD sounds really bad, don't bother restoring it. its not the job of the consumer. return it to the record store right away to get your money back and tell 'em to shove it! i would also write a strongly worded letter to the record company about that, though i hardly believe they'll actually give a damn. record companies today are all about money, not music. doesn't matter really whether you trade mp3s or buy a perfectly legal copy of the album

___________
edit:

>>>'It's worth noting that nothing I have that was mastered before 1990 has this problem (anything 'classic') - they all sound great - with no need for scaling, I might add!'<<<

oh about that.. you're spot on!  thats because in the early 90s and mid and late 1980s even, CDs were mastered slightly different than they are today. competent mastering engineers gave themselves plenty of headroom and the music wasn't about how loud it is, but how good it sounds. after all, the compact disc at the time was such a "revolutionary" medium. the dynamic range was excellent, and the music sounded a lot more natural and pleasant imho
Be healthy, be kind, grow rich and prosper

Revised attitude on normalization / question

Reply #13
Quote
Originally posted by krsna77

Thanks, radio, for ruining music. :mad:


krsna77,

you know it's not really radio, per se, but more the record producer wanting to have a loud mix of a song that has potential of being a radio hit.

cheers,

albert 

Revised attitude on normalization / question

Reply #14
gambito,

i never really liked the sound of ANY clip restoration tool.  they certainly make the WAVs look good, but not sound appreciably any better.  imho.

in other words, at least for me, once a signal has been clipped, then it's done for.

cheers,

albert 

Revised attitude on normalization / question

Reply #15
> i never really liked the sound of ANY clip restoration tool. they
> certainly make the WAVs look good, but not sound appreciably
> any better. imho.

if no sound appreciably any better how do you never really liked that not appreciably sound, i can see a contradiction here, however about the sound neither i can appreciate a significant difference, maybe at high volume levels it would be more noticeable...

regards

Revised attitude on normalization / question

Reply #16
>>>'maybe at high volume levels it would be more noticeable...'<<<

quite the other way around.. the higher the levels, chances are the more clipping there is in the music. the more clipping there is, the less effective all those clipped peak restoration tools work

remember they were all designed for music with light (as in not too much of it) clipping. and even then i would advise caution. heavily clipped music is unsalvageable
Be healthy, be kind, grow rich and prosper

Revised attitude on normalization / question

Reply #17
Quote
Originally posted by gambito
> i never really liked the sound of ANY clip restoration tool. they
> certainly make the WAVs look good, but not sound appreciably
> any better. imho. 

if no sound appreciably any better how do you never really liked that not appreciably sound, i can see a contradiction here, however about the sound neither i can appreciate a significant difference, maybe at high volume levels it would be more noticeable...

regards


gambito,

what i meant to say in my last post is that, while you could see the shape of the clipped waveform to have been rounded out by the plugin, which is what i meant when i said "they make the WAVs LOOK good", the sound is not any better, not even a bit imo.

and the monitoring level doesn't really make a difference.  outscape is correct.  but at very loud levels the signal clips at the monitor end, which is another phenomenon entirely.  in other words, a clipped signal after recording is a clipped signal during reproduction.

i have emphasized that this is just my opinion, as i have a friend producer who thinks otherwise.  i told him he was probably being deceived only by what he can see (rounding out the clipped waveform), thus influencing the way he perceives what he could hear, but he insists that there is a noticeable difference, so...

regards,

albert 

Revised attitude on normalization / question

Reply #18
> quite the other way around.. the higher the levels, chances are
> the more clipping there is in the music. the more clipping there
> is, the less effective all those clipped peak restoration tools
> work

sorry but what i mean with higher volume levels was that when we turn up the volume on the home stereo the clipped peaks will be more noticeable as distortion

> remember they were all designed for music with light (as in not
> too much of it) clipping. and even then i would advise caution.
> heavily clipped music is unsalvageable

fully agree and it's what i said previously


> what i meant to say in my last post is that, while you could see
> the shape of the clipped waveform to have been rounded out
> by the plugin, which is what i meant when i said "they make the
> WAVs LOOK good", the sound is not any better, not even a bit
> imo.

it's what i understood and i agree also

> i have emphasized that this is just my opinion, as i have a friend
> producer who thinks otherwise. i told him he was probably
> being deceived only by what he can see (rounding out the
> clipped waveform), thus influencing the way he perceives what
> he could hear, but he insists that there is a noticeable
> difference, so...

i too have a friend that says that he can hear differences by using his golden cables instead of the regular ones

best regards

Revised attitude on normalization / question

Reply #19
Well, I followed h's suggestion, and have been using mp3gain, applying constant gain in -1 increments across an album until no files have a peak value of greater than 32768.

This has eliminated most of my problem nicely.  Most 'clipped' mp3s had only a slight problem to begin with - levels just a bit too high. This did not solve the problem with my very few nasty distorted mp3s, but I suppose this is due to the source CD being crap (yes - most of these were from custom mix CDs come to think of it...)

Anyhow, now I only wish there were a similar tool for mpc and / or vorbis!

Actually, I wish there were a tool that would analyze a CD beforehand and alert you to any excessive levels before encoding (so you could then issue the correct --scale value to get final peak values to just below 32768)...

Revised attitude on normalization / question

Reply #20
Quote
Actually, I wish there were a tool that would analyze a CD beforehand and alert you to any excessive levels before encoding (so you could then issue the correct --scale value to get final peak values to just below 32768)...


Unfortunately, the level of distortion introduced is completely dependent on the encoder, as well as the parameters used.  I've encoded some tracks with --r3mix which gave peak output levels of around 50,000, where the same tracks with FastEnc gave 33,000.

The only way to be sure is, well, encode the whole album, find the peak volume, then re-encode the whole album with --scale (32768/peakvolume).  Which is a tad time-consuming for what mp3gain gives us already =)

-h

Revised attitude on normalization / question

Reply #21
Isn't the max peak for 16-bit audio 32767, because samples are represented by singed words? Or are they unsigned?

Revised attitude on normalization / question

Reply #22
Quote
Originally posted by YouriP
Isn't the max peak for 16-bit audio 32767, because samples are represented by singed words? Or are they unsigned?

the amplitude range for 16-bit audio is -32768 to 32767.. it has nothing to do with "singed words" though. 32767 is just a simple abbreviation for any 16-bit sound at 0dB, the maximum permitted peak amplitude i nthe digital domain without the signal going 'over'
Be healthy, be kind, grow rich and prosper

Revised attitude on normalization / question

Reply #23
Well, that may be, but above 32767, the signal clips. So the max peak value for 16-bit audio which doesn't clip is that.

 
SimplePortal 1.0.0 RC1 © 2008-2019