INTERACT FORUM

Please login or register.

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

Author Topic: Avoiding inter sample peaks  (Read 10051 times)

thezone

  • Galactic Citizen
  • ****
  • Posts: 257
Avoiding inter sample peaks
« on: February 01, 2013, 11:26:58 pm »

Does MC have any built in protection against inter sample peaks?

Heres a good explanation of what I mean.

http://www.hometracked.com/2007/11/08/prevent-intersample-peaks/
Logged

bobkatz

  • World Citizen
  • ***
  • Posts: 213
Re: Avoiding inter sample peaks
« Reply #1 on: February 02, 2013, 09:28:29 am »

Does MC have any built in protection against inter sample peaks?

Heres a good explanation of what I mean.

http://www.hometracked.com/2007/11/08/prevent-intersample-peaks/

I have not seen any protection against intersample peaks in JRiver. It can measure "clips" but these are sample measurements, not intersample. But I'm not suggesting that JRiver become the traffic cop, simply the warning device. However, an intersample peak meter would take up more DSP than is desirable in JRiver. You can install a VST plugin (such as Toneboosters EBU Loudness  http://www.toneboosters.com/tb-ebuloudness/) to keep Matt from wasting his time. And there's a simple solution: Headroom! We can ask Matt to provide a simple sample clip reading in decibels.

Turning down the gain to keep the output from exceeding a sample peak of -2 dBFS (or even -1 dBFS) on all material should remove all fear of intersample peak overload in your DACs. That's because the vast majority of intersample peaks in typical popular music do not exceed + 0.2 dBFS. And a few pathological ones might hit +1 and a once in a hundred year one might hit +2. But the kind of material that does that is so distorted that even turning it down 2 dB isn't going to make it sound more pleasant by eliminating DAC overload!

So, quite simple, instead of measuring clips in %, it would help if JRiver measures them in dB below full scale. And makes a suggestion to turn down the gain until the highest peaks reach -2 dBFS max.

Keep in mind that when doing a digital XO or room correction system, the equalization can generate more intersample peaks than are in the original material, but also, since a frquency divider drops the level in each band and gives you more headroom, it's not a problem unless you turn it up again. In that case I have not measured the intersample peak to sample peak ratio to see if it's a bit more dangerous, but I still wager that keeping it -2 dBFS (sample peak) max should be more than enough protection against intersample peaks.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42441
  • Shoes gone again!
Re: Avoiding inter sample peaks
« Reply #2 on: February 02, 2013, 09:55:15 am »

Bob's advice is good, and might be an argument for using Internal Volume:
http://wiki.jriver.com/index.php/Volume#Internal_Volume_Headroom

However, I'm struggling a little to understand how this is a DAC issue.  

If a DAC is always smoothing the digital input, it's going to be introducing distortion (over-extending any sharp change) and should appear if its specs are measured.

Why would this distortion be any more relevant at full amplitude than half amplitude?

From the mastering side it makes sense to avoid flat-lines at peak amplitude in the digital signal simply because natural sounds don't have flat peaks.  A digital flat line at the top of a wave will sound bad with any DAC or speakers.  It seems like a DAC that over-extends could actually even sound a little better in this case if the over-extension acted to "naturalize" the unnatural digital flat line.
Logged
Matt Ashland, JRiver Media Center

bobkatz

  • World Citizen
  • ***
  • Posts: 213
Re: Avoiding inter sample peaks
« Reply #3 on: February 02, 2013, 11:31:07 am »

Bob's advice is good, and might be an argument for using Internal Volume:
http://wiki.jriver.com/index.php/Volume#Internal_Volume_Headroom

However, I'm struggling a little to understand how this is a DAC issue.  

If a DAC is always smoothing the digital input, it's going to be introducing distortion (over-extending any sharp change) and should appear if its specs are measured.

Why would this distortion be any more relevant at full amplitude than half amplitude?



Sometimes the answer is yes, sometimes no. Let's start with first principle: There are many devices and processes which produce greater amplitude on their output than on their input, including: filters, equalizers, sample rate converters, oversamplers, and lossy coders. Severe distortion and strong high frequency equalization in the source material produces even greater intersample peak output on a proportional basis. More "normal" material only goes over the sample peak occasionally on the output of a DAC. I have a simplified explanation as to why this occurs on page 70 of the second edition of my book, "Mastering Audio". Thanks to B.J. Buchalter for that revealing diagram.

Anyway, let's look at two cases and see if it answers your question.

a) You can have a recording made in a pristine fashion, without severe processing, material whose sample peak reaches up to 0 dBFS on a sample measurement, which will go OVER 0 dBFS and cause distortion on the output of the DAC, simply because of the upsampler in the DAC. This will overload the DAC and produce additional distortion that was not in the material. Simply turning down the digital level in front of the DAC fixes this problem and the sound can be pristine again.

b) You can have a recording which was highly processed and which is inherently distorted (e.g. name the latest pop release), which produces even higher intersample peaks in the DAC. Turn it down digitally and you fix the additional distortion which the DAC had added, but it still doesn't get rid of the distortion due to the extreme processing, it still sounds bad.

How's that?

Quote

From the mastering side it makes sense to avoid flat-lines at peak amplitude in the digital signal simply because natural sounds don't have flat peaks.  A digital flat line at the top of a wave will sound bad with any DAC or speakers.  It seems like a DAC that over-extends could actually even sound a little better in this case if the over-extension acted to "naturalize" the unnatural digital flat line.

I think this is a misunderstanding. "Over-extends" is actually distortion, it overloads the output of the DAC. See http://www.tcelectronic.com/tech-library/mastering/ and read the article:  "Stop Counting Samples" and the article "0 dBFS+ Levels in Digital Mastering", and "Programmed for Distortion" by my friends Thomas Lund and Soren Nielsen.
Logged

AndyU

  • Galactic Citizen
  • ****
  • Posts: 363
Re: Avoiding inter sample peaks
« Reply #4 on: February 02, 2013, 02:22:45 pm »

Benchmark media have recently released a new DAC, the DAC2 HGC, which features 3.5db headroom. Benchmarks argument is (and remember they make highly regarded A-Ds and D-As):

"All of the digital processing in the DAC2 HGC is designed to handle signals as high as +3.5 dBFS. Most digital systems clip signals that exceed 0 dBFS. The 0 dBFS limitation seems reasonable, as 0 dBFS is the highest sinusoidal signal level that can be represented in a digital system. However, a detailed investigation of the mathematics of PCM digital systems will reveal that inter-sample peaks may reach levels slightly higher than +3 dBFS while individual samples never exceed 0 dBFS. These inter-sample overs are common in commercial releases, and are of no consequence in a PCM system until they reach an interpolation process. But, for a variety of reasons, virtually all audio D/A converters use an interpolation process. The interpolation process is absolutely necessary to achieve 24-bit state-of-the art conversion performance. Unfortunately, inter-sample overs cause clipping in most interpolators. This clipping produces distortion products that are non-harmonic and non-musical . We believe these broadband distortion products often add a harshness or false high-frequency sparkle to digital reproduction. The DAC2 HGC avoids these problems by maintaining at least 3.5 dB of headroom in the entire conversion system. We believe this added headroom is a groundbreaking improvement."

Quoted from http://www.benchmarkmedia.com/dac/dac2-hgc

Logged

Vincent Kars

  • Citizen of the Universe
  • *****
  • Posts: 1154
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42441
  • Shoes gone again!
Re: Avoiding inter sample peaks
« Reply #6 on: February 02, 2013, 04:03:20 pm »

First, thanks for the help Bob.

a) You can have a recording made in a pristine fashion, without severe processing, material whose sample peak reaches up to 0 dBFS on a sample measurement, which will go OVER 0 dBFS and cause distortion on the output of the DAC, simply because of the upsampler in the DAC. This will overload the DAC and produce additional distortion that was not in the material.

If the DAC is doing processing on the digital side, I understand distortion when you cross some threshold.

But are you saying there is also some sort of brick wall on the analog side, and crossing a certain level there will create distortion?  I never think of analog circuits as having hard limits.

In other words, I would have expected the analog side of the DAC to distort about the same (in percent) at 0 dBFS as at -12.0 dBFS.  Or does it simply distort a little worse as it approaches the limit of its capacitors (or whatever)?

Please keep in mind that I'm about as smart about analog circuit design as an eighth grade boy is about girls :P
Logged
Matt Ashland, JRiver Media Center

bobkatz

  • World Citizen
  • ***
  • Posts: 213
Re: Avoiding inter sample peaks
« Reply #7 on: February 02, 2013, 05:36:14 pm »

Translation (to get rid of market-speak):

"Benchmark attenuates 3.5 dB in the digital domain." Hopefully they also dither to remove the distortion of the additional multiplication. I await some careful measurements to prove their claims. By the way, I was the first reviewer of the first Benchmark DAC in Pro Audio Magazine if I recall correctly. I was thrilled by its sound and gave it quite a boost, by the way.

BK


Benchmark media have recently released a new DAC, the DAC2 HGC, which features 3.5db headroom. Benchmarks argument is (and remember they make highly regarded A-Ds and D-As):

"All of the digital processing in the DAC2 HGC is designed to handle signals as high as +3.5 dBFS. Most digital systems clip signals that exceed 0 dBFS. The 0 dBFS limitation seems reasonable, as 0 dBFS is the highest sinusoidal signal level that can be represented in a digital system. However, a detailed investigation of the mathematics of PCM digital systems will reveal that inter-sample peaks may reach levels slightly higher than +3 dBFS while individual samples never exceed 0 dBFS. These inter-sample overs are common in commercial releases, and are of no consequence in a PCM system until they reach an interpolation process. But, for a variety of reasons, virtually all audio D/A converters use an interpolation process. The interpolation process is absolutely necessary to achieve 24-bit state-of-the art conversion performance. Unfortunately, inter-sample overs cause clipping in most interpolators. This clipping produces distortion products that are non-harmonic and non-musical . We believe these broadband distortion products often add a harshness or false high-frequency sparkle to digital reproduction. The DAC2 HGC avoids these problems by maintaining at least 3.5 dB of headroom in the entire conversion system. We believe this added headroom is a groundbreaking improvement."

Quoted from http://www.benchmarkmedia.com/dac/dac2-hgc


Logged

bobkatz

  • World Citizen
  • ***
  • Posts: 213
Re: Avoiding inter sample peaks
« Reply #8 on: February 02, 2013, 05:42:30 pm »

Dear Matt:

The TC Electronic articles explain things very well and will take you to graduate school. As I understand it, the majority of DACs do not have good analog headroom and are designed so the analog components clip about the same as the digital components. Consequently, when the digital goes over 0 dBFS after upsampling and filtering, it produces an over signal on the analog side. Therefore I believe that 0 dBFS+ signals could be handled properly in a well-designed DAC.

Maybe that's what Benchmark does, increases their analog headroom. Otherwise, theoretically at least, if they attenuate 3.5 dB in the digital domain they could reduce their signal to noise ratio. Though I think the DAC noise floor is so far above the 24-bit digital noise floor (dithered) as not to worry about a little attenuation.

But it's still good practice (as mentioned in the TC papers) to make sure the interpolated and oversampled digital signal does not exceed 0 dBFS (or what we now call "0 dBTP", known as 0 dB True Peak) because so many DACs are designed with very little analog headroom.

Hope that explanation helps,


Bob

First, thanks for the help Bob.

If the DAC is doing processing on the digital side, I understand distortion when you cross some threshold.

But are you saying there is also some sort of brick wall on the analog side, and crossing a certain level there will create distortion?  I never think of analog circuits as having hard limits.

In other words, I would have expected the analog side of the DAC to distort about the same (in percent) at 0 dBFS as at -12.0 dBFS.  Or does it simply distort a little worse as it approaches the limit of its capacitors (or whatever)?

Please keep in mind that I'm about as smart about analog circuit design as an eighth grade boy is about girls :P
Logged

magnust

  • Galactic Citizen
  • ****
  • Posts: 380
Re: Avoiding inter sample peaks
« Reply #9 on: February 03, 2013, 10:29:31 am »

You could add a "remove intersample distorsion" check box in MC. :-D :-D :-D (=just lowering the level with a couple of dBs)

Half joke. Half serious.

;-)




Ps
I wonder if there is a audio signal that can help detecting if you have a DAC with this design flaw by just listening with you ears.
Logged

John_Siau

  • Member
  • *
  • Posts: 1
Re: Avoiding inter sample peaks
« Reply #10 on: May 01, 2013, 09:26:33 am »

Quote from: bobkatz
Quote
As I understand it, the majority of DACs do not have good analog headroom and are designed so the analog components clip about the same as the digital components. Consequently, when the digital goes over 0 dBFS after upsampling and filtering, it produces an over signal on the analog side. Therefore I believe that 0 dBFS+ signals could be handled properly in a well-designed DAC.

Maybe that's what Benchmark does, increases their analog headroom. Otherwise, theoretically at least, if they attenuate 3.5 dB in the digital domain they could reduce their signal to noise ratio. Though I think the DAC noise floor is so far above the 24-bit digital noise floor (dithered) as not to worry about a little attenuation.

Bob,
No matter how you approach the problem, SNR is reduced when the D/A conversion system is designed to accomodate 0dB+ signals.  The DAC2 has a measured SNR of better than 126 dB A-weighted.  If we did not reserve 3.5 dB for intersample overs, this specification would be 129.5 dB.
We have an additional 3 dB of analog headroom above the maximum peak level that can be produced by a +3.5 dB intersample over.  This additional analog headroom has now performance penalty because the analog output stage has an A-weighted SNR of about 138 dB.

Building headroom into the D/A chip reduces the SNR of the chip.  Adding digital attenuation in front of the chip produces the same result.  Either way SNR is reduced.  The key is to start with enough SNR that the loss is insignificant.

The slight SNR reduction is a small price to pay for the improved overload performance.
Logged
John Siau
VP
Benchmark Media Systems, Inc.
Pages: [1]   Go Up