HydrogenAudio

CD-R and Audio Hardware => Audio Hardware => Topic started by: krabapple on 2012-10-23 16:32:34

Title: DAC that handles intersample overs
Post by: krabapple on 2012-10-23 16:32:34
I was tipped off to this on an audio mailing list and thought it might be of interest here -- Benchmark has released a consumer DAC that (among other features) allows  3.5dB of headroom to account for correct reconstruction of intersample overs (peaks between samples that exceed 0dbFS, which are said to be "common in commercial releases")


http://www.benchmarkmedia.com/dac/dac2-hgc (http://www.benchmarkmedia.com/dac/dac2-hgc)


Quote
High Headroom DSP - with 3.5 dB "Excess" Digital Headroom
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.



disclaimer: i neither work for Benchmark nor own a Benchmark DAC ;>  Claims about reduced 'high frequency sparkle' taken with a grain of salt.
Title: DAC that handles intersample overs
Post by: greynol on 2012-10-23 17:36:55
We believe these broadband distortion products often add a harshness or false high-frequency sparkle to digital reproduction.

The operative (read: weasel word) is believe.

Even still it is good design practice.  Personally I'd like to see some evidence before I buy into the "we are practically the only ones who do it" meme.
Title: DAC that handles intersample overs
Post by: RonaldDumsfeld on 2012-10-23 19:20:44
I wonder how they do it? How can you represent a value greater than all 111111s?

Perhaps they simply subtract 3.5dB from the incoming samples.

Commercial releases, CD or download;losslessor lossy, almost always show as red overs on most downbeats on my meters if o/p via ASIO etc. I've never been sure if it's the metering system (MOTU CueMix) being wrong, deliberately over reads by 2dB or so as a precaution or the tracks really are that hot.
Title: DAC that handles intersample overs
Post by: DVDdoug on 2012-10-23 20:15:51
Quote
I wonder how they do it? How can you represent a value greater than all 111111s?
It shouldn't be that hard...  I assume a properly designed analog reconstruction filter would "overshoot" when appropriate.    The 0dB hard limit only applies to the PCM integer data fed into the DAC.  Once the data is inside the DAC, or once it's converted to analog, there should be no such limits.
Title: DAC that handles intersample overs
Post by: Arnold B. Krueger on 2012-10-23 20:25:59
I wonder how they do it? How can you represent a value greater than all 111111s?


They are talking about an overage that is is created by the reconstruction filtering between samples when the input signal is increasing rapidly at a critical range.

IME they occur infrequently in live recordings if you are working close to FS.

Quote
Perhaps they simply subtract 3.5dB from the incoming samples.


That would probably do it. Consider the incidence of this situation among those of us who make our recordings with say, 10 dB headroom.


Quote
Commercial releases, CD or download;lossless or lossy, almost always show as red overs on most downbeats on my meters if o/p via ASIO etc. I've never been sure if it's the metering system (MOTU CueMix) being wrong, deliberately over reads by 2dB or so as a precaution or the tracks really are that hot.


If you're using Audition or CEP, all you have to do is look at the file in waveform view.  They fit Sinc curves to the data points for display.
Title: DAC that handles intersample overs
Post by: AndyH-ha on 2012-10-23 22:07:02
The DAC's output is an analogue voltage swing. If the power supply will support it, the voltage should keep rising, rather than clipping, as long as there is something to drive it, just as with a preamp or power amp, no? Its has been years since I paid any attention but the impression from my reading is that most decent DACs, including those in professional and semipro soundcards, have quite a bit of headroom beyond 0dBfs.
Title: DAC that handles intersample overs
Post by: [JAZ] on 2012-10-23 22:17:08
There are several sentences that sound strange to me:

Quote
All of the digital processing in the DAC2 HGC is designed to handle signals as high as +3.5 dBFS.

It specifically says digital, and 3.5dB is a weird number in digital. Keeping one more bit (6dB) of precision for operations (that is, assuming that it works in integer, not float) would have sense, but.. what is 3.5dBs? is it using some sort of floating point representation?

Quote
The interpolation process is absolutely necessary to achieve 24-bit state-of-the art conversion performance.

I guess that, with interpolation, they actually mean upsampling, since obviously, it does not have sense at all to interpolate the bits. And said that, what does that have to do with playing 24bit or whatever?


In analog domain, it has been quite common to allow for higher than 0dbFS. Mixing tables, amplifiers,... even in tape decks. So it confuses me as to what are they advertising.
Title: DAC that handles intersample overs
Post by: Wombat on 2012-10-23 22:30:38
I am absolutely no expert at this but may it be as simple as the DAC uses a delta-sigma that adds a safety margin while doing the step from PCM to bitsteam?
Title: DAC that handles intersample overs
Post by: AndyH-ha on 2012-10-23 23:16:44
Considering the general state of decent hardware, is there actually a problem to be solved in this area? If so, that, I think, would be some news.
Title: DAC that handles intersample overs
Post by: pdq on 2012-10-24 10:55:25
Upsampling would involove multiplying a set of data points each by some factor before summing them. If this is done with floating point then the sum of the factors can be 1.0, but if integer math is used then the sum of the factors will be a fairly large integer value.

You can then divide by this value to normalize the result, or you can divide by a larger value to reduce the output amplitude. My guess is that the 3.5 dB reduction meant that instead of dividing, they could just shift the result by some number of bits, making the chip that much cheaper.
Title: DAC that handles intersample overs
Post by: RonaldDumsfeld on 2012-10-24 13:13:39
I know the OP is talking about inter sample overs specifically but I am both intrigued and puzzed by what is going on with modern pop and electronic releases as regards digital clipping.

I have done some experiments and would welcome comments and suggestions if anyone else is interested.

I downloaded a brand new commercial MP3 release via Beatport, the popular on-line music store. Loaded it into Traktor, effectively a professional grade media player. All controls left  on unity gain (no effects, EQ etc) and played it via ASIO and WASAPI drivers. So called 'bit perfect' playback.

The output meter in Trakor indicated regular red overs. Practically every beat. I couldn't actually hear clipping unless I applied more EQ. However Trakor docs state that a limiter is always applied to the OP. So I wasn't really outputting an over scale signal. What the meter was telling me was that I was losing dynamic range and hence 'punch' from my performance.

So I looked at the metering on my DAC (MOTU Ultralite) using it's in built facilities (CueMix). Both input and output meters indicated frequent red overs. Unchecking the limiter in Traktor had little or no effect. Cuemix said I was clipping. Although it wasn't audible, at least to my ears.

So I loaded the track into Audacity and analyzed for clipping. Sure enough the waveform was a sea of red. Both amplify and normalize  suggested I needed to take off a whopping 0.9dB to stay within scale. Which I did. Whereupon Audacity reported no errors on playback. The waveform looked like a regulation crew cut haircut. When I exported the normalized file and loaded back into Traktor the playback now showed no clipping. Cuemix on the other hand still insisted the file was clipping at the DAC. I had to return to Audacity and take off another 1dB (i.e. -1.9dB) before the track played 'clean'.

I carried out a frequency analysis on the original track in Audacity.  The only place it came closer than -24dB was very low down (>50hz) where it actually touches 0.

I have absolutely no idea what is going on here. perhaps the meters are inaccurate, perhaps they deliberately over read as a safety precaution, perhaps popular modern music is either deliberately or incompetently released mildly clipped in a quest for volume on the basis that most users will not hear it as it is so low down in the audio spectrum?

Whatever it certainly raises doubts on the commonly expressed audiophile recommendation to always play back domestic audio via 'bit perfect' ASIO or WASAPI drivers.


Title: DAC that handles intersample overs
Post by: Arnold B. Krueger on 2012-10-24 13:51:44
The DAC's output is an analogue voltage swing. If the power supply will support it, the voltage should keep rising, rather than clipping, as long as there is something to drive it, just as with a preamp or power amp, no? Its has been years since I paid any attention but the impression from my reading is that most decent DACs, including those in professional and semipro soundcards, have quite a bit of headroom beyond 0dBfs.


IME your impressions are not representative.  The digital world is under a lot of pressure to work well with low power and therefore low voltages. Most modern active parts (for audio and otherwise) are designed to exploit available power supply voltages, which means that most DACs  convert digital FS signals to an analog voltage that is as close to the power supply rail(s) as possible.
Title: DAC that handles intersample overs
Post by: Arnold B. Krueger on 2012-10-24 13:59:51
Considering the general state of decent hardware, is there actually a problem to be solved in this area? If so, that, I think, would be some news.


I've done some ABXing and it is my experience that infrequent brief clipping, is undetectable even when it is pretty severe during those rare instances.

YMMV.

Bottom line, these infrequent overages due to what amounts to being an mathematical oddity aren't a real world problem. 

Furthermore, careful practitioners manage them out of existence as a matter of course. One example being my habit of making recordings with 10 dB headroom.

I have a set of envelopes that I apply to these peaks in CEP. The envelopes start out at unity gain, smoothly drop to various amounts of attenuation such as 1 dB, 3 dB, 6 dB, etc. hold it for a while, and then smoothly rise back up to unity gain.  If I see one of these anomalous peaks, it gets smoothly leveled out. They are usually a just few milliseconds long, and no harm, no foul.
Title: DAC that handles intersample overs
Post by: 2Bdecided on 2012-10-24 15:22:16
@RonaldDumsfeld, many modern pop CDs are near clipping most of the time (whether the waveform is cut off at 0dB FS or some fraction of a dB below it is irrelevant). Inter-sample overs are inevitable. clipping after mp3 encoding+decoding is inevitable. (unless you reduce the level or increase the headroom at the right point in each case).

The audibility of mp3-induced clipping is rare (I've seen one positive ABX on here), but it's entirely avoidable.

The audibility of the damaged inflicted by the mastering practices that create these kind of recordings on CD is hard to ABX (we have no "before" - and when we do, it sounds obviously different anyway) - but my guess would be that far more damage is done at this stage than in mp3 clipping or inter-sample over clipping.


Your meters can only guess. They typically go red when they see single or multiple samples at full scale. they don't actually know if the waveform should/did go above full scale. they just guess that (multiple) samples at full scale mean it much have. That's usually true, but you can have samples way below full scale that cause inter-sample overs. It takes more sophisticated metering to catch this, though it exists (it's discussed in EBU R-128, amongst others).

Cheers,
David.
Title: DAC that handles intersample overs
Post by: greynol on 2012-10-24 15:32:09
The audibility of mp3-induced clipping is rare (I've seen one positive ABX on here), but it's entirely avoidable.

Real music or a synthetic sample? I've continually asked for real-world evidence for this as people regularly take measures to prevent it.  They often get quite testy when I suggest they are just being paranoid.  Whenever I demand proof I am often assured some will be given in the near future and it never is.

EDIT: I am assured -> I am often assured.  Anyway, I really don't want to make hay of this here.  I too recall reading about it once, perhaps in addition to the link lvqcl will give three posts down, though I will have to review it before I am personally satisfied.
Title: DAC that handles intersample overs
Post by: pbelkner on 2012-10-24 15:45:48
I had to return to Audacity and take off another 1dB (i.e. -1.9dB) before the track played 'clean'.

Could you give r128gain (http://r128gain.sourceforge.net/) a try? Among others r128gain determines inter-sample peaks at 192 kHz, and it is not uncommon to have inter-sample peaks at about 2 dBFS for contemporary hard limited audio. It would be interesting to know whether it is the same with your original sample.
Title: DAC that handles intersample overs
Post by: 2Bdecided on 2012-10-24 16:46:23
The audibility of mp3-induced clipping is rare (I've seen one positive ABX on here), but it's entirely avoidable.

Real music or a synthetic sample? I've continually asked for real-world evidence for this as people regularly take measures to prevent it.  They often get quite testy when I suggest they are just being paranoid.  Whenever I demand proof I am assured some will be given in the near future and it never is.
I thought I PM'd you when I saw it - or at least mentioned your name in a reply to the post - I remembered your long-standing request when it came up. But search can't find it, so maybe I was dreaming.

Cheers,
David.
Title: DAC that handles intersample overs
Post by: lvqcl on 2012-10-24 17:00:22
Probably this -
http://www.hydrogenaudio.org/forums/index....st&p=496757 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=55363&view=findpost&p=496757)
http://web.archive.org/web/20110611012024/...3.net/norm.html (http://web.archive.org/web/20110611012024/http://ff123.net/norm.html)
Title: DAC that handles intersample overs
Post by: Speedskater on 2012-10-24 18:06:21
A sometimes technical and sometimes not E-mail group discussion of the DAC.

http://bach.pgm.com/pipermail/proaudio/201...ber/015712.html (http://bach.pgm.com/pipermail/proaudio/2012-October/015712.html)
http://bach.pgm.com/pipermail/proaudio/201...ber/015717.html (http://bach.pgm.com/pipermail/proaudio/2012-October/015717.html)
Title: DAC that handles intersample overs
Post by: gymnos on 2012-10-24 21:47:00
some of the topics of this discussion were covered in TC Electronic Tech Library (http://www.tcelectronic.com/media/nielsen_lund_2003_overload.pdf).
At least it shows that even pro DACs don't have that headroom. no listening tests, but comparison of impact of different codecs on peak levels for real music is included as well.
Title: DAC that handles intersample overs
Post by: krabapple on 2012-10-25 05:37:39
Yes, but that work is a decade old.  Are pro DACs today still lacking that headroom?  And as 2bdecided notes, metering exists  that can alert audio engineers  to intersample overs during production  (I remember Bob Katz touting one such meter years ago).  Whether or not this has actually led to less overs in commercial products would make for an interesting followup to those old TC Tech reports.
Title: DAC that handles intersample overs
Post by: RonaldDumsfeld on 2012-10-25 15:31:24
Quote
Could you give r128gain a try?


I'd love to oblige and once I've figured out what it does, how to make it do it and how to prevent it doing anything I don't want it too I will.
Title: DAC that handles intersample overs
Post by: pbelkner on 2012-10-25 16:19:52
Quote
Could you give r128gain a try?


I'd love to oblige and once I've figured out what it does, how to make it do it and how to prevent it doing anything I don't want it too I will.
It does nothing else than scanning the chosen file and producing a report. If you want to be on the safe side just load a copy of your file.
Title: DAC that handles intersample overs
Post by: RonaldDumsfeld on 2012-10-25 18:42:01
^^ I'd already done that.

It opens a command line window, instructs me to to Hit Enter to continue.....Then nothing happens.

It at that point I decided a little more research might be appropriate.
Title: DAC that handles intersample overs
Post by: Arnold B. Krueger on 2012-10-26 15:12:40
I wonder how they do it? How can you represent a value greater than all 111111s?

Perhaps they simply subtract 3.5dB from the incoming samples.


Simplest way to do it, I guess.

It may not be enough. I did some sample editing in CEP 2.1 and found that I could create peaks that were more than twice (> +6 dB)  the values of any of the samples. 

Creating this wave needs some, err coincidences to occur if it were to happen in the real world. For a positive peak >> FS:

(1) The peak has to come exactly between samples.

(2) The samples on each side of the peak have to be +FS.

(3) The next set of samples on each side of the peak have to be -FS.

(4) You have to adjust sample values up to +/- 4.5  samples from the peak to get the largest possible peak.
Title: DAC that handles intersample overs
Post by: pbelkner on 2012-10-27 05:56:08
I did some sample editing in CEP 2.1 and found that I could create peaks that were more than twice (> +6 dB)  the values of any of the samples. 

Creating this wave needs some, err coincidences to occur if it were to happen in the real world. For a positive peak >> FS:

To give you a real world example consider the second track of VH's latest release (http://en.wikipedia.org/wiki/A_Different_Kind_of_Truth):
Code: [Select]
pb@PETER-PC ~/test
$ r128gain --sample-peak 02_she_s_the_woman.wav
SoX sucessfully loaded.
FFmpeg sucessfully loaded.
analyzing ...
  [1/1] "02_she_s_the_woman.wav": -5.6 LUFS (-17.4 LU)
      peak: -0.1 SPFS, range: 2.1 LU
  [ALBUM]: -5.6 LUFS (-17.4 LU)
      peak: -0.1 SPFS, range: 2.1 LU
done.

pb@PETER-PC ~/test
$ r128gain --true-peak 02_she_s_the_woman.wav
SoX sucessfully loaded.
FFmpeg sucessfully loaded.
analyzing ...
  [1/1] "02_she_s_the_woman.wav": -5.6 LUFS (-17.4 LU)
      peak: 3.3 TPFS, range: 2.1 LU
  [ALBUM]: -5.6 LUFS (-17.4 LU)
      peak: 3.3 TPFS, range: 2.1 LU
done.

pb@PETER-PC ~/test
$ r128gain --sample-peak 02_she_s_the_woman.mp3
SoX sucessfully loaded.
FFmpeg sucessfully loaded.
analyzing ...
  [1/1] "02_she_s_the_woman.mp3": -5.6 LUFS (-17.4 LU)
      peak: 2.0 SPFS, range: 2.1 LU
  [ALBUM]: -5.6 LUFS (-17.4 LU)
      peak: 2.0 SPFS, range: 2.1 LU
done.

pb@PETER-PC ~/test
$ r128gain --true-peak 02_she_s_the_woman.mp3
SoX sucessfully loaded.
FFmpeg sucessfully loaded.
analyzing ...
  [1/1] "02_she_s_the_woman.mp3": -5.6 LUFS (-17.4 LU)
      peak: 3.5 TPFS, range: 2.1 LU
  [ALBUM]: -5.6 LUFS (-17.4 LU)
      peak: 3.5 TPFS, range: 2.1 LU
done.

pb@PETER-PC ~/test
$
Title: DAC that handles intersample overs
Post by: Wombat on 2012-10-27 16:55:22
I wonder if these inter-sample peaks are a problem on modern playback systems at all.
With my network player i stream 16bit flacs and use its build in 24bit volume control. Normal listening happens between -8db to -18dB.
I don´t know exactly how it works with PC playback but i guess here also the data gets calculated down in level before playback.
If so the most problematic playback may happen with classic CD-Players or players without digital volume control that go full scale on these peaks.

Besides that i often did play with clipped pieces of music but did not find they sound cleaner when simply lowered in volume, samples welcome.
Title: DAC that handles intersample overs
Post by: pbelkner on 2012-10-27 18:08:34
I wonder if these inter-sample peaks are a problem on modern playback systems at all.

As it was discussed several times in this forum and as it can be found elsewhere contemporary DACs up-sample in the course of reconstruction, i.e. in the course of "smoothing the digital staircase". I can hardly imagine that clipping during the up-sampling stage is improving reconstruction.

I don´t know exactly how it works with PC playback but i guess here also the data gets calculated down in level before playback.

I simply don't know. Moreover, as far as I can see that's exactly where this thread is about, quoting the OP:

Benchmark has released a consumer DAC that (among other features) allows  3.5dB of headroom to account for correct reconstruction of intersample overs (peaks between samples that exceed 0dbFS, which are said to be "common in commercial releases")

Reading through the posts so far nobody else seems to know.
Title: DAC that handles intersample overs
Post by: lvqcl on 2012-10-27 19:22:51
Several posts in this thread (http://www.hydrogenaudio.org/forums/index.php?showtopic=97217) are relevant to this discussion
Title: DAC that handles intersample overs
Post by: bandpass on 2012-10-27 19:45:53
Sounds like this DAC is just what I need for my amp that goes to 11.
Title: DAC that handles intersample overs
Post by: Dynamic on 2012-10-28 01:12:27
Thomas Lund has measured intersample over distortion in many high end DACs he tested, according to this portion of his technical presentation in a YouTube video (http://youtu.be/BhA7Vy3OPbc?t=2m46s) where he demonstrates intersample over distortion in a NAD C 520 playing a 11.025 kHz sinusoid constructed to produce continuous intersample overs, viewed on an oscilloscope.

However, he's addressing a lot of issues from the precautionary principle and the idea of preventive measures in audio production engineering, hence the reason for measuring distortion in iTunes AAC and playing the S "side" signal of M/S stereo decomposition, with the message (eventually) coming that use of lossy sources in production should be avoided, but is perfectly fine for distribution (it felt like a massive TOS8 violation for most of the video until that became clear!).

In other words this is all about measurability, not proving audibility, and having tried and failed to ABX digital clipping of a sample-or-two's duration once or twice in the past, I'm tempted to think that audibility is unlikely. It certainly pales against the clear audible damage done by the Loudness War.

Nonetheless, for good engineering design, since I saw this video while bearing EBU-R128 intersample peak measures in mind, I've also thought it's eminently sensible to design any oversampling DAC to incorporate a fixed attenuation during the upsampling phase, potentially compensated for by the analogue circuitry. The upsampling and reconstruction filtering is performed with many multiplications in any case in floating point or high-depth fixed point in DSP, so a fixed multiplication or scaling of the filter coefficients to provide maybe 2-6 dB of headroom above digital full scale to the rail voltage of the op-amp is potentially relatively easy.