Inter-sample peaks

We’ve seen that samples can represent a signal with greater peak amplitude than the peak sample values.

If those sample values were higher, the output would exceed “1.0”, or 0 dB full-scale—I’ll refer to these as “overs”. This brings two questions: Can DACs reproduce such a signal? And, what is the worst case peak between samples?

There is nothing inherent in analog design that ties the maximum digital input value to the maximum voltage a DAC can put out. But exactly how much higher the output can be depends on the design, and it’s certainly possible that there isn’t enough headroom to handle overs typical of the vast library of music available.

How bad can it be?

There is no absolute limit to how high an inter-sample peak can be. Yikes.

Intuitively, we can understand that high frequencies are more of a problem with such peak than low, since a low frequency sine wave would have many samples per cycle, while high frequencies have few, leaving curves less well defined. As such, we can take the worst-case high frequency signal, which is alternating positive and negative extreme values, and introduce a discontinuity that causes and overshoot of the waveform. That’s illustrated in this article, True Peak Detection, which includes a proof that there is no limit to the potential overshoot.

All is not lost

First, real music doesn’t include sustained high frequencies at maximum amplitude. The unbounded test signal described was at the Nyquist frequency, a signal we’re technically not defined to handle, and relies on increased duration to increase the peak, at maximum sample values. Even dropping the frequency slightly would ruin the phase relation and produce maximum sample values far closer to the analog signal it represents.

For music, inter-sample overs are most likely on transient peaks, where it’s extremely difficult to tell whether the signal clipped. It doesn’t mean we shouldn’t strive to reproduce them without clipping, or avoid them in the music production process. And there is another way to avoid them even if your equipment can’t handle these overs gracefully—I’ll get to that in a moment.

Avoiding overs in production

The sure place to avoid inter-sample overs is at the mastering stage (or he mix stage if there is no formal mastering). A true peak meter, which might oversample at 8x and check for overs, can let you know of any potential problem. I suspect about +3 dB is limit of what most music with overs might hit—in absence of true peak detection, you could hedge your bets by backing your mix down a couple of dB.

Handling overs in DACs

While you’re unlikely to hear inter-sample overs in the first place, it’s possible that some equipment or software handles overs poorly—in the worst case, an oversampling converter that doesn’t handle magnitudes greater than 1.0 well numerically, for instance. However, this is unlikely with modern equipment, particularly using modern DAC chips.

Some DACs boast the ability to contend with overs in their design. Benchmark Audio claims to handle +3.5 dB, for instance. But few manufacturers list specs on their headroom.

And finally…digital gain control

You can use digital gain control to reduce the sample magnitude before the DAC. You probably do it every day already. Do you keep your iPhone turned up all the way, or backed down a bit? Do you have a digital control knob, or remote volume control on your DAC for home listening? Computer output turned down a little from maximum output? Reducing just 2-3 dB from maximum output adds that much headroom to the DAC’s analog output for handling peaks. If you run a DAC with no digital gain control directly into a pre-amp, and control the analog level, you don’t have this protection, but more and more we control gain digitally, ahead of the conversion.

In closing

It’s unlikely inter-sample overs have ruined any listening experiences for you—you probably haven’t even noticed them. And if you listen using digital volume at least a few dB below its maximum, it’s unlikely any music you’re listening to will cause inter-sample overs. Ultimately, inter-sample overs are important to understand, but not a major threat.

This entry was posted in Digital Audio, Fun Facts, Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *