Help - Search - Members - Calendar
Full Version: K-Setting and Clipping prevention in mppdec
Hydrogenaudio Forums > Lossy Audio Compression > MPC
Sethur
Greets,
Yes, I know the K-Setting should be set to 14 for Home Theater play, but I'd rather know what K-Setting means before I just set it to some recommended value.
So that's already the first question: How exactly does the K-Setting manipulate the sound? What is it good for? I tried to find it out for myself but I don't wan't to read a 10 pages complex manual about mastering to understand just the K-Setting.
Second thing: If you decode a mpc file with mppdec --prev, how exactly does this prevent clipping? Will the overall gain of the mpc source be lowered? If yes, the decoded WAV would be audible different from the original so why should one want to do this?

Thanks in advance
DickD
The K-setting of 14 is supposed to be related to headroom for loud moments in music of 14 dB above the "average" level.

It is another way of saying 89 dB SPL (sound pressure level) loudness.
Dolby theatre sound systems are calibrated to 83 dB SPL and have 6 dB extra headroom, but this sounds unusually quiet for most CDs and 89 dB (K-14) was chosen instead for the ReplayGain standard.

If you read The ReplayGain website it will explain about the loudness measurement idea and also about clipping prevention and why clipping occurs in lossy compression if the music is mastered too loud. However, most codecs like MPC are ABX tested at full volume, so most clipping on straight encode/decodes without -prev is probably inaudible anyway. I don't usually find track peaks above about 1.2000 in MPC, which is 1.6 dB, so it's only just an audible change in volume in the worst case.

Most CDs are not mastered at their "intended" loudness anyway, because it's not calibrated or standardised. Instead, in recent years there has been a stupid loudness war, so, for example a recent Rush CD was about 10-12 dB louder than earlier Rush CDs from the early 1990s. This means you're constantly reaching for the volume control when shuffle-playing songs. ReplayGain is a great solution, especially when making compilations or shuffle playing. I use it most of the time, in Album Gain mode (which preserves the relative volume of tracks and keeps intentionally quiet tracks quiet - unless the whole album is very quiet.)

Usually the overloud albums are tamed down and the well mastered albums are left about the same loudness at K-14 (or 89 dB SPL).

If you search for the name Bob Katz on the forums, you should find a thread with some background about the K-system.
Sethur
So the K-Setting is only relevant when "use replaygain" is set to on? Did I get that right? And what exactly do you mean with headroom and SPL? Unfortunately I don't know either of this terms. I can only guess that SPL is the average volume...
torok
QUOTE(Sethur @ Mar 18 2003 - 08:22 AM)
So the K-Setting is only relevant when "use replaygain" is set to on? Did I get that right? And what exactly do you mean with headroom and SPL? Unfortunately I don't know either of this terms. I can only guess that SPL is the average volume...

Less headroom and your music gets louder and more likely to clip. More headroom is the opposit. That's my impression, at least. You just get to choose replaygain 89db, or 94db, or whatever, at runtime.
GeSomeone
QUOTE(Sethur @ Mar 18 2003 - 05:22 PM)
So the K-Setting is only relevant when "use replaygain" is set to on?

No, it is also used without replaygain. It is in effect an adjustment of the output level of the decoding stage.
QUOTE
And what exactly do you mean with headroom and SPL?

(wait .. google search) SPL means Sound Level Pressure see more info. The difference between the nominal and the highest (peak) levels in a program is the headroom.
--
Ge Someone
KikeG
QUOTE(GeSomeone @ Mar 19 2003 - 11:44 AM)
No, it is also used without replaygain.  It is in effect an adjustment of  the output level of the decoding stage.

If so, how can you get rid of it? I mean, to have same levels as the original files.
Case
QUOTE(KikeG @ Mar 19 2003 - 06:54 PM)
QUOTE(GeSomeone @ Mar 19 2003 - 11:44 AM)
No, it is also used without replaygain.  It is in effect an adjustment of  the output level of the decoding stage.

If so, how can you get rid of it? I mean, to have same levels as the original files.

K-slider only has effect when replaygain is enabled.
Sethur
Ok, now Case says the K-Setting is only effective with Replaygain set to on. GeSomeone claims the opposite is true. What is it now? Also, I still don't have the detailed info I wanted about the K-Setting and especially decoding side clipping prevention with --prev. All the information I got until now was vague and/or bad explained (no offense!). For example the term headroom, of which I have absolutely no idea what it is, was used without explanation. What I need is somebody who really knows what's behind the K-Setting and clipping prevention (--prev) with or without replaygain (--gain 0,1 / --gain 2,3).

The reason why I am asking is the fact that I want to decode my files without making any audible changes, so that they sound exactly like the unencoded originals.
That's why I want to know whether --prev makes the files ABXable from the originals.
kdo
QUOTE(Sethur @ Mar 19 2003 - 10:53 PM)
 

QUOTE
Ok, now Case says the K-Setting is only effective with Replaygain set to on. GeSomeone claims the opposite is true. What is it now?

Here is what I would do in this situation:
I would open some mpc song in winamp, set the settings to No replaygain, No prevention, and play this song. Then I would push the K-slider all the way to the left, and play the song. Then I'd push the slider all to the right, and play. I would then compare how loud these three sound. I would hear no difference and conlcude that Case was right.

QUOTE
Also, I still don't have the detailed info I wanted about the K-Setting and especially decoding side clipping prevention with --prev.

Some info is in the manual. (RTFM?)
Also, searching the forum for the term "replaygain" pops up this question on replaygain.
Feel free to ask more specific questions, if anything is still unclear.

Headroom is the difference between the full scale maximum (= 32768 = 0 dBFS) and the level of average loudness, measured in dB.
Meaning is that some very loud passages will use this "headroom" and will not hit the full scale "ceiling" (and thus will not be clipped).

QUOTE
The reason why I am asking is the fact that I want to decode my files without making any audible changes, so that they sound exactly like the unencoded originals.

Then don't use any switches at all.

QUOTE
That's why I want to know whether --prev makes the files ABXable from the originals.

It depends on how much attenuation is needed to prevent the peaks from clipping. Loudness change of less then 1 dB is hard to notice.
DickD
A change in loudness of 1.5 dB is just about detectable, but if you turn up the volume to compensate, then it makes no audible difference to the sound.

--prev might introduce a change in loudness, but usually the track peak will be less than 1.2000 (normalised = +39321 for 16-bit audio) which would require only -1.6 dB adjustment (just about noticeable) to correct.

If you go from an unadjusted track to one that's been adjusted -1.5 dB with no silence in between you might hear a small click at the transition if it's a mix album or live album. That would only happen with track-based clipping prevention.

For sound that's as near indentical as possible for side-by-side listening, don't use clipping prevention because it might just possible create a volume change.

Most of the time, severe clipping is during a transient and won't be noticed.

However, for the highest quality, I'd personally used album-based ReplayGain (which I like) and album-based clipping prevention to ensure no audible hard-clipping can occur, then I'd use the volume control to reach the loudness I require (instead of assuming that the CD has some 'correct' or 'intended' loudness that is artistically justified. The loudness war has made that assumption totally invalid).

This should be the least ABXable from the original CD with the volume control set lower to make it the same loudness as it will only depend on the accuracy of the encoder's psychoacoustic model. Also, it should be the least likely mode to be ABXable from the CD audio (or ripped WAV files) with the same volume reduction applied.
Sethur
Thanks for all the answers. There's no need for explanations left for me now.

Regards Sethur
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.