INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Did you know about 0 dBFS+?  (Read 5164 times)

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Did you know about 0 dBFS+?
« on: June 23, 2006, 03:48:17 pm »

Did you know about 0 dBFS+? I did not until some time ago, when I came across TC Electronics’ site, where several papers about pro audio are presented. One of them is about 0 dBFS+. Other interesting articles exist on related topics, Dealing With Peaksby by Bob Katz and Taming Wild Mastering Levels by David Moulton. They require more than one reading in order to fully grasp the concepts, but I think they deserve the time needed to read and study them. At least for people interested in serious digital audio.

So, what is 0 dBFS+? It refers to the 0 dBFS reference level (FS stands for Full Scale) in digital audio, that is the maximum allowed level for the digital representation of signals. The term 0 dBFS+ means that what appears to be a perfectly “legal” digital signal (a “full scale” or 0 dBFS signal, with no “digital over”) can cause distortion when it is converted back to the analog form (during D/A conversion). What is encoded at full scale in the digital domain can actually be the representation of an analog signal larger than full scale. This can overload the D/A converter, if it is (poorly) designed thinking that signals larger then “full range” will never turn out, and therefore cause distortion.

To illustrate the concept you should be familiar with the sampling (Nyquist) theorem, which is the foundation of digital signal processing (DSP). With a sampling frequency of 44100 Hz, take a 11025 Hz sine wave with a 45 degree phase and sample it. Imagine that the A/D converter range is -1 Volt to +1 Volt, and the sine wave amplitude is exactly 1 Volt. The actual samples are +0.707, +0.707, -0.707, -0.707 in amplitude. Now take a “simple” normalization program. It thinks that the signal is below digital full range, so it amplifies the samples 1.414 times (that is, +3 dB), and they become +1, +1, -1, -1. This is a fully “legal” digital signal, but it is the digital representation of a 11025 Hz sine wave whose amplitude is 1.414 Volt (+3 dBFS). And finally bring the signal into a D/A converter with a range of -1 Volt to +1 Volt. The converter will clip the signal, as it is designed to handle signals in the -1 Volt to +1 Volt range, but tries to reproduce a sine wave with an amplitude of 1.414 Volt.

This is the basic concept as far as I can understand. Maybe the full story is not so simple, but the principle should be similar to what I expressed.

Here is why oversampling D/A converters, with more bits than the original signal, are required. And here is why oversampling is required in digital signal processing. Oversampling the previous signal (+0.707, +0.707, -0.707, -0.707) by a factor of 2 yields the following samples: 0, +0.707, +1, +0.707, 0, -0.707, -1, -0.707. Here even a “simple” normalizing program can’t do wrong. The signal is already full-range. It cannot be further amplified.

I think that there is little knowledge about digital technology in general. Industry, of course, does not want to let everybody know the drawbacks of digital technology (in every field, not only in audio). I think that working in the digital domain adds one (or more) level(s) of indirection to anything. Quality and response times are sacrificed to the cheapness of using digital technology.

What are the implications of 0 dBFS+ in Media Center?
•   Media Center should Analyze Audio using oversampling. This way peak level of more than 100% can be detected. The “amplified” signal in  the previous example (+1, +1, -1, -1) should give a peak level as big as 141.4% (or +3 dBFS).
•   Peak meters, if they’ll ever be implemented, should use oversampling as well.

Logged

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid
Re: Did you know about 0 dBFS+?
« Reply #1 on: June 23, 2006, 04:39:30 pm »

No, I didn't. But after reading that I can now say I still don't. ;)
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Did you know about 0 dBFS+?
« Reply #2 on: June 23, 2006, 04:46:15 pm »

Here is another related article about the CD-audio loudness race:

http://www.prorec.com/prorec/articles.nsf/articles/8A133F52D0FD71AB86256C2E005DAF1C


By default MC's Replay Gain uses a relatively low "83 dB SPL" reference gain (as originally proposed here: www.replaygain.org). This should make most standard CD-audio to not clip at the output/DAC stage. Naturally it cannot resque badly mastered audio CDs, which already have different clipping that is caused by limiters and digital compression.

I think the problem you described is more possible if Replay Gain is not used.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Monkeyboy

  • Regular Member
  • World Citizen
  • ***
  • Posts: 247
  • I'm a Monkey
Re: Did you know about 0 dBFS+?
« Reply #3 on: June 23, 2006, 05:20:18 pm »

I wouldn't worry about MC causing clipping (distortion).
I think you are trying to understand something that goes quiet deep.
You forget to mention whether your signals are peak, peak-peak or rms voltages.

If you stick a 2v pk-pk sine wave into a 16-bit ADC with 2v pk-pk analog input, its output is going to be between 32767 and -32767.
MC should not apply a gain to this (as its full scale).

In a normal situation even if you did try to apply a gain, it would wrap (unless you converted it to a 24 or 32 bit number), you cannot make the sample any bigger, add 1 to 32767 (which is a 16 bit signed integer) and it goes to -32767. You would hear this, believe me.

As for saying the samples would be +0.707, +0.707, -0.707, -0.707. I think you are mixing RMS voltages and peak voltages. 1 volt peak equates to 0.707v RMS and in your example it would be +0.707, -0.707, +0.707, -0.707.

I think dynamic range is the problem with a lot of CDs, not loudness, but thats for another day, when I have had less to drink.
Any music produced which contains clipping is just totally unproffesional.
Hope I haven't come accross obnoxious.

Rich
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Did you know about 0 dBFS+?
« Reply #4 on: June 24, 2006, 03:37:59 am »

No, I didn't. But after reading that I can now say I still don't. ;)
Sorry if I wasn't so clear. The problem is really complex here, and it requires some technical (DSP) background. I have tried to simplify things, but now I'll try to be even simpler. You need to know what "analog", "digital" and "D/A converter" mean,  though.

There are digital signals that standard digital meters do not detect as "bad", but can cause distortion when converted back to the analog form. They are called 0 dBFS+ signals. They are at most at the peak level (0 dBFS) when in the digital domain. So digital meters won't detect a "digital over" (depends on the definition on "digital over"). But when such signals are fed into a D/A converter, they result in a waveform that goes beyond the full scale of the converter. If the converter has not enough dynamic range (and a good power supply), the signal will be clipped, causing distortion.

Oversampling is the key here:
•   Oversampling in the meters (and in all the processing gear in general) would have prevented 0 dBFS+ from happening in the mastering stage. And oversampling in the playback chain meters can still detect them (for anyone interested in the quality of the mastering).
•   Oversampling in the D/A converter (with a couple of bits added) would prevent the converter from clipping when converting 0 dBFS+ signals.

MC won't do any harm to the signal, even with Replay Gain active. The 0 dBFS+ signal is already "bad" from the mastering stage. You just cannot revert it to a good one.

Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Did you know about 0 dBFS+?
« Reply #5 on: June 24, 2006, 03:43:47 am »

By default MC's Replay Gain uses a relatively low "83 dB SPL" reference gain (as originally proposed here: www.replaygain.org).
I just can't understand what is the relation between dBFS (the digital signal level, that cannot be higher than 0 dBFS by definition) and dB SPL (the analog sound pressure coming out of the speakers). It depends upon the position of the volume knob in the audio power amplifier. So, unless we refer to a calibrated audio system, how can we tell how loud will a 0 dBFS signal will come out of the speakers?

By the way, I usually listen to music below 83 dB SPL.

Quote
I think the problem you described is more possible if Replay Gain is not used.
The 0 dBFS+ problem is from the mastering stage. MC cannot modify an already “bad” signal. Also, it does not apply gain based on the peak level, but on the average perceived loudness.
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Did you know about 0 dBFS+?
« Reply #6 on: June 24, 2006, 04:03:55 am »

I wouldn't worry about MC causing clipping (distortion).
In facts 0 dBFS+ clipping is from the mastering stage. MC can just detect it using oversampling, nothing more.

There can be some more problem with "simple" normalizing programs, that normalize signals based on their peak level. MC analyzes audio and computes Replay Gain based on the perceived loudness. But, again, 0 dBFS+ clipping is from the mastering stage.

Quote
I think you are trying to understand something that goes quiet deep.
I agree.

Quote
You forget to mention whether your signals are peak, peak-peak or rms voltages.

[…]

As for saying the samples would be +0.707, +0.707, -0.707, -0.707. I think you are mixing RMS voltages and peak voltages. 1 volt peak equates to 0.707v RMS and in your example it would be +0.707, -0.707, +0.707, -0.707.
I forgot to mention that I was talking about a 1 Volt peak sine wave (that is a 2 Volt peak-to-peak or 0.707 Volt RMS). But the 0.707 in the value of the samples has nothing to do with the RMS amplitude. By chance, in this simple example, the two values are the same. The sample value depends upon the phase of the signal (45 degrees or Pi/4). I am not an ASCII artist. If I were, I could have drawn an ASCII chart of a sine wave showing that sampling a sine wave starting at 45 degrees (or Pi/4) gives sample values of +0.707, +0.707, -0.707, -0.707. in Mathematica-like notation:

Sin[1/4 Pi]=+0.707
Sin[3/4 Pi]=+0.707
Sin[5/4 Pi]=-0.707
Sin[7/4 Pi]=-0.707

Sampling the same sine wave with a 0 degree phase, we obtain your example (where MC should not apply any gain):

Sin[0]=0
Sin[1/2 Pi]=+1
Sin[Pi]=0
Sin[3/2 Pi]=-1
Logged

Monkeyboy

  • Regular Member
  • World Citizen
  • ***
  • Posts: 247
  • I'm a Monkey
Re: Did you know about 0 dBFS+?
« Reply #7 on: June 24, 2006, 06:38:42 am »

oops, I overlooked the 45 degree phase change. You are right in this case.

Quote
In facts 0 dBFS+ clipping is from the mastering stage. MC can just detect it using oversampling, nothing more.
I thought you were saying that in your example MC could apply gain causing clipping? (or more).
I'm not sure what you mean by this line, MC can detect what using oversampling? MC surely just gets its 44.1KHz samples from the decoder?
I have not done much digital audio stuff in windows, in fact any. I work on dedicated DSPs for my work, I have not heard any problems with MCs audio analysis and so just take it for granted they use the correct techniques, and trust they do.

Rich
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Did you know about 0 dBFS+?
« Reply #8 on: June 24, 2006, 07:21:12 am »

I just can't understand what is the relation between dBFS (the digital signal level, that cannot be higher than 0 dBFS by definition) and dB SPL (the analog sound pressure coming out of the speakers). It depends upon the position of the volume knob in the audio power amplifier. So, unless we refer to a calibrated audio system, how can we tell how loud will a 0 dBFS signal will come out of the speakers?

By the way, I usually listen to music below 83 dB SPL.

It is a reference value that has 20 dB of headroom. With a calibrated system a 0 dBfs peak should produce 103 dB SPL. A quote from http://replaygain.hydrogenaudio.org/calibration.html:
Quote
Finding a standard
Having calculated a representative RMS energy value for the audio file, we now need to reference this to a real world sound pressure level. The audio industry doesn't have any standard for listening level, but the movie industry has worked to an 83dB standard for years.

What the standard actually states is that a single channel pink noise signal, with an RMS energy level of -20 dB relative to a full scale sinusoid should be reproduced at 83 dB SPL (measured using a C-weighted, slow averaging SPL meter). In simple terms, this means that everyone can set their volume control to the same (known, calibrated) gain.

ASIDE: This number (83dB SPL) wasn't picked at random. It represents a comfortable average listening level, determined by professionals from years of listening. That reference level of -20dB pink noise isn't random either. It causes the calibrated average level to be 20dB less than the peak level. In other words, it leaves 20dB of headroom for louder than average signals. So, if CDs were mastered this way, the average level would be around -20dB FS, leaving lots of room for the dramatic peaks which make music exciting.

An ideal world...
NOW (are you still with me?) if the mastering engineer set the levels on a CD using that calibrated volume control setting, that CD will sound best at that volume. If all CDs were mastered in such a way, they'd all sound best at that volume. If you (as a listener) didn't want to listen at that particular volume setting, you could always turn it down, but all CDs would still sound equalling "turned down" at your preferred setting. You wouldn't have to change the volume setting between discs.

Reality check! We know CDs aren't made like this. There is NO audio standard replay level. So, here's the clever bit - here's the whole point of this website...

Fixing a non-ideal world
We know the level should average around 83dB SPL, and we know a -20dB pink noise signal will give 83dB SPL in a calibrated system. So, we send the pink noise signal through the ReplayGain program, and store the result (let's call it ref_Vrms). For every CD we process, the difference between the calculated value for that CD and ref_Vrms tells you how much you need to scale the signal in order to make it average 83dB.

The actual process is quicker to do than to say!

One complication
The system calibration uses a single channel of pink noise (reproduced through a single loudspeaker). You then play music through both loudspeakers. So, though we use 1 channel of pink noise to calibrate the system gain, the ideal level of the music is actually the loudness when both speakers are in use. So, in ReplayGain, we calibrate to 2 channels of pink noise, because that's how loud we'd like the music to sound. In reality, we just have a monophonic pink noise wavefile, and ReplayGain automatically assumes you're playing it through both speakers, as it would any monophonic file.

Implementation
ReplayGainScript.m loads a .wav file containing -20dB FS pink noise from disc, and processes this via ReplayGain.m, storing the result as a reference. The reference wavefile is available here. The relevant lines of code are:

      % Calculate perceived loudness of -20dB FS RMS pink noise
      % This is the SMPTE reference signal. It calibrates to:
      % 0dB on a studio meter / mixing desk
      % 83dB SPL in a listening environment (THIS IS WHAT WE'RE USING HERE)
      [ref_Vrms]=replaylevel('ref_pink.wav',a1,b1,a2,b2);
        ...
      % Calculate the perceived loudness of the file using "replaygain" function
      % Subtract this from reference loudness to give replay gain adjustment to 83 dB reference
      Vrms=ref_Vrms-replaygain(current_file,a1,b1,a2,b2);

That's it. That's the value we store. To yield the actual replay gain, just add 83dB.

Suggestions and further work
When the block length and % are standardised (I've chosen 50ms and 95%, but further testing may show these values can be tweaked), there is no need to calculate ref_Vrms every time the program is run - the value can be calculated once, then assigned directly


Quote
The 0 dBFS+ problem is from the mastering stage. MC cannot modify an already “bad” signal.

I don't really understand the maths you provided. I would need to experiment with real life audio samples and audible differences.

This is what I have read and also personally experienced:

Usually the default Replay Gain setting makes badly mastered compressed rock and pop albums much quieter, so the possibly remaining peaks should not clip anymore on the output stage. Generally, digital clipping should not happen with unadjusted lossless audio formats. When lossy formats are decoded the peaks can be over the full-scale without a Replay Gain adjustment: http://www.hydrogenaudio.org/forums/index.php?showtopic=40131.

Quote
Also, it does not apply gain based on the peak level, but on the average perceived loudness.

Actually, the "Overflow Handling: Clip Protection" option should take care of that in case the calculated Replay Gain adjustment would still clip.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Did you know about 0 dBFS+?
« Reply #9 on: June 24, 2006, 12:38:39 pm »

I thought you were saying that in your example MC could apply gain causing clipping? (or more).
MC can introduce (almost) no additional signal clipping, especially when using Replay Gain, that decreases the overall system gain. So 0 dBFS+ peaks won't overflow the D/A converter.
 
Quote
I'm not sure what you mean by this line, MC can detect what using oversampling?
One thing is Replay Gain, another thing is Peak Level. With my example badly amplified sine wave (+1, +1, -1, -1), Replay Gain would be -20 dB (or -17 dB?), while (oversampled) Peak Level would be 141.4%, indicating that there is a 0 dBFS+ signal.

MC can only detect 0 dBFS+ signals in Audio Analysis using oversampling. A Peak Level of more than 100% would indicate the presence of 0 dBFS+ signals.

If MC had level indicators too (in addition to the eye-candy spectrum analyzer), could have both real time “digital over” and 0 dBFS+ indicators. A “digital over” is an event triggered by 3 or more full-scale samples.

MC is a listening tool, after all, and cannot improve badly mastered audio.

Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Did you know about 0 dBFS+?
« Reply #10 on: June 24, 2006, 12:45:21 pm »

It is a reference value that has 20 dB of headroom. With a calibrated system a 0 dBfs peak should produce 103 dB SPL. A quote from http://replaygain.hydrogenaudio.org/calibration.html:
With a reference level and a calibration method, now the whole picture is much clearer.

I am afraid, however, that to set levels in my equipment as described in the ReplyGain documentation, I have to turn the analog volume up about 20 dB (as Reply Gain decreases the computer-side level about 20 dB). So I will start hearing some background hiss, even if I own decent analog audio gear.

Also, the frequency response of the audio system matters in calibration. I own Bose Acoustimass 5, that do not have a flat frequency response.

Quote
I don't really understand the maths you provided. I would need to experiment with real life audio samples and audible differences.
I used over-simplified maths in order to try to illustrate the concept of 0 dBFS+. I know that the whole story is much more complex, when dealing with real life signals.

Quote
Actually, the "Overflow Handling: Clip Protection" option should take care of that in case the calculated Replay Gain adjustment would still clip.
I don't know how "Overflow Handling: Clip Protection"  works in MC. Actually I can't find documentation about any of the audio algorithms used in MC.

Logged

Monkeyboy

  • Regular Member
  • World Citizen
  • ***
  • Posts: 247
  • I'm a Monkey
Re: Did you know about 0 dBFS+?
« Reply #11 on: June 24, 2006, 03:36:46 pm »

For me it is really not clear what you are after.
I was trying to make the point that MC cannot introduce more clipping because it came accross that you were worried it might make the mistake as in your example.
I read your line "MC can detect it using oversampling" wrong before because I think it should be using upsampling, oversampling is done on the data acquisition side (ADC), I dont see how you could oversample a digital signal, or maybe i'm wrong?

Rich
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Did you know about 0 dBFS+?
« Reply #12 on: June 24, 2006, 04:17:40 pm »

For me it is really not clear what you are after.
I was talking about 0 dBFS+, and I was wondering if MC could detect it, both in Analyze Audio and in real-time meters (still to be implemented).

Quote
I was trying to make the point that MC cannot introduce more clipping because it came accross that you were worried it might make the mistake as in your example.
I am not worried about MC making such mistakes. Other software/hardware can. For example digital compressors/limiters employed nowadays in the mastering stage that can produce a mix with the average level quite close to the peak level. And simpler normalization software that normalizes to the peak level (not using Replay Gain).

Quote
I read your line "MC can detect it using oversampling" wrong before because I think it should be using upsampling, oversampling is done on the data acquisition side (ADC), I dont see how you could oversample a digital signal, or maybe i'm wrong?
Correct. The right term is "upsampling". As both "upsampling" and "oversampling" translate in my native language (Italian) as "sovracampionamento", I confused the two.
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Did you know about 0 dBFS+?
« Reply #13 on: June 25, 2006, 10:29:28 am »

The topic has already discussed in a site dealing with "Discussion of Audio Compression", but not with the name 0 dBFS+.
Logged
Pages: [1]   Go Up