• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Let's develop an ASR inter-sample test procedure for DACs!

No, it will give something similar but not quite the same.
...
Minor correction to my post. I should have used "+/- amplitude" instead of "+/- FS", because my examples are not full scale but -3 dBFS (as is rather evident from the waveform graphs).
 
I believe the confusion arose because @NTTY defines an "overshoot" as the dB difference between the peak values of the original samples (before interpolation) and 0dBFS.

Most of us think of the overshoot either as the dB difference between 0dBFS and the peak value of the original wave or as the peak value of the original wave relative to the dB scale (both of these definitions give the same result for the purpose of this thread).

EDIT: Typos.
 
Last edited:
Out of curiosity, I have burnt NTTY's test CD in order to check the performance of my CD players on the ISO tests with modest analogue equipment.

Here are the results (comments below) :

View attachment 407370

The Sony SCD-555ES is an European and Japan only 2 channels SA-CD/CD player. It uses a Sony standalone interpolation filter (CXD8762) which precedes the DAC (one of the last Sony PLM converter, a descendant of the CXD2552). The DSP offers the choice between 5 different types of digital filter for CD replay. Obviously, none of them have any headroom.

I also own a Sony DVP-S9000ES, which uses the same interpolation filter built-in within the DAC chip (Sony CXD9556), with only a choice of 2 filter types and, interestingly, the added possibility to apply a fixed digital attenuation. Unfortunately, the drive of the DVP-S9000ES does not read CD-R and I was unable to test this player and the effect of the digital attenuator.

The Marantz DV-12S2 uses Cirrus Logic CS4392 DAC chips with built-in interpolation filter. It is my belief that the wide-band THD+N only shows the effect of the aggressive noise-shaping this DAC is known for. When the measurement bandwidth is restricted to 30 kHz (the Boonton 1130 cannot do better), the THD+N drops to about 0.04 %, even with the two first ISO test signals. Only with the 11,025 Hz +3dBFS test signal does the THD+N rise to 2.83 % over a 30 kHz measurement bandwidth. The interpolator in the CS4392 DAC chip seems to have some kind of headroom to accommodate ISO.

The Pioneer DV-868AVi is a complicated topic. It uses Burr Brown PCM1738 DAC chips with built-in interpolation filter, but there is a user choice to add to the two front (stereo) channels an optional Pioneer standalone DSP (PD074) with two different functions : (1) a "bit extension" function (?) dubbed "Hi-Bit" from 16 (or 20) to 24 bits depth and (2) four different user defined interpolation filters (dubbed "Legato Pro", standard through 3). The effect of those functionalities and their interaction with the DAC chips are not clear to me. With CD data, the "Hi Bit" function appears to be transparent, because nothing changes with or without it. As navigating through the on-TV screen menu in order to select the various "Legato Pro" filters is very cumbersome (I hate that kind of user interface!), I only take measurements with one filter position. The Pioneer seems to performs not much better than the older Sony.

The Pioneer CLD-2950 is an old Laserdisc player which is also able to play CDs. Is uses a Pioneer DAC chip (PD2026). It also has a built-in digital attenuator which can bring 25 dB of attenuation in 1 dB step. I have not yet test that function. The behavior of the converter is odd, as it mutes the output with two ISO test signals, but seems to be happy with the 7,350 Hz test signal.

I have not test the digital level trim function of every channels of the Marantz and Pioneer DVD players. I am not sure this trimming function does work on CD replay. I will give them a try if I find the time.
Wow, thanks for the testing, time taken and sharing!

I suppose the Pioneer increases bit depth with the DSP. You could verify that by playing the file "D_Sine_997_-90.31dB_NoDither_LR.wav" of the test disc. If you see a nice sine wave on the scope, then there was a processing to increase bit depth. Else you should have the 3DC levels representation of the smallest amplitude signal in 16bits. But that requires a very low level high definition interface.

This DSP may perform oversampling and so will filter too before passing the digital signal to the following oversampling filter. That might imply two oversampling actions in sequence.

Thanks again!
 
Last edited:
I believe the confusion arose because @NTTY defines an "overshoot" as the dB difference between the peak values of the original samples (before interpolation) and 0dBFS.

Most of us think of the overshoot either as the dB difference between 0dBFS and the peak value of the original wave or as the peak value of the original wave relative to the dB scale (both of these definitions give the same result for the purpose of this thread).

EDIT: Typos.
Correct. This is where I got lost in translation.

One more thing: I already test for 0 dBFS. Stereophile doesn't and uses lower levels. Just last week a manufacturer complained that at 0 dBFS they have problems and they wanted me to test at lower levels. In other words, I am already pushing the industry to produce clean signal when the source is at maximum PCM value.
And I believe that’s what Amir meant here.
A sine unharmonically related to the sampling rate, at 0dBFS, will exhibit the issue by pushing the peaks above 0dBFS.
 
This DSP may perform oversampling and so will filter too before passing the digital signal to the following oversampling filter. That might imply two oversampling actions in sequence.

Thanks again!


Yes, according to the block diagram of the Pioneer PD0274, this chip applies an 8x oversampling. I suspect the following PCM1738 just auto-detects that the input data is already at 8x oversampling rate and disables or bypasses its own 8x oversampling filter stage.

Many thanks to you for your test-CD image!
 
I believe the confusion arose because @NTTY defines an "overshoot" as the dB difference between the peak values of the original samples (before interpolation) and 0dBFS.

Most of us think of the overshoot either as the dB difference between 0dBFS and the peak value of the original wave or as the peak value of the original wave relative to the dB scale (both of these definitions give the same result for the purpose of this thread).
None of which makes sense to me.

I'm using the definition as known from standard electronics: The maximum value of the output signal (after upsampling and/or analog filtering) vs. the steady state (DC) maximum, just like we see in the waveform display I posted. It does not scale with input level until clipping (or whatever) is reached.
 
None of which makes sense to me.

I'm using the definition as known from standard electronics: The maximum value of the output signal (after upsampling and/or analog filtering) vs. the steady state (DC) maximum, just like we see in the waveform display I posted. It does not scale with input level until clipping (or whatever) is reached.

Okay, but in that case you would have to include In your definition both clipped and unclipped ISOs, which to me would be confusing.

Let's take for example a sampled wave for which the peaks do not coincide with samples. If we were to perfectly reconstruct that wave, it would have peaks that go beyond the samples.

Now, let's normalize those samples to 0dBFS. The peaks of that wave, if perfectly reconstructed, would exceed the 0dBFS threshold.

Let's say the peaks go over the sample points by 3dB.

Let's pretend to run that signal into an actual oversampling DAC with no headroom. Now, instead of a peak between samples we'd have a train of 0dBFS samples.

Let's now skip to the output of the DAC after the analog low-pass filter. The reconstructed wave would now have peaks that exceed the 0dBFS threshold due to the Gibbs phenomenon, but since the wave was digitally clipped they obviously wouldn't be at +3dBFS.

Let's say those peaks are now at +1dBFS (I'm making up a number).

By your definition, you would have to call those peaks "+1dBFS ISOs or ISPs", which is fine, but it wouldn't really give us an idea of how much information was lost during the conversion due to clipping.

If I were to say "this DAC can't accurately reproduce +3dBFS ISOs above 0dBFS" it wouldn't make any sense to you, because you would say that the ISOs only measure 1dB above 0dBFS, even though the original wave had 3dB worth of information that was lost.

Furthermore, if we were to change the values of the analog low-pass filter in the DAC, that +1dBFS value could become +0.5dBFS, or +0.2dBFS (again, I'm making up numbers. @JIW will correct me with the math). The values would also change if we increased the headroom of the interpolator. If we instead stayed in the digital realm, every clipped ISO would measure 0dB above 0dBFS.

This to me would be confusing. I'd rather say that our wave has +3dBFS ISOs or ISPs. That stays true regardless of what the DAC is doing to the signal.

Does this make any sense?
 
Ah, sorry and thanks for the correction.

View attachment 407300
I would bet the actual upsampling done in that Revox CDP will have lower peaks as the digital reconstruction filter will not be that good.

Hence,

No. If the above upsampled stream hits numeric limits at -1dBFS levels (of the max value of the square) this means the actual headroom is only +1dB because the overshoot is only 2dB, not 3dB.
Correct, my mistake. I’ll update the text.
Only that you seem to have made the wrong assumption what the max level at the output of the upsampler would be.

The only way to find out what really happens is to scope the analog output in front of any additional analog filter and look how that waveform develops vs. input levels, that is, at what input levels it starts to visibly clip/deform when zooming in. Looking at the final analog output is of course possible but the start of the clipping will be not as visible, depending on the actual analog filter transfer function. OTOH, one could double check by this whether its really the digital stages clipping first and not the analog ones.
Yep, I requested assistance as to how to identify which one is contributing to the clipped output. Testing as you suggest is ideal but invasive and not easy.

That said, when seeing a zero-hold type effect at wide band, we’re sure the oversampling filter is defeated before generating issue in the analog output stage. But if it’s not the case, that’s less easy.

Older DACs with low level oversampling will be helped by their final analog output which is likely to filter earlier the artifacts of the conversion. But we still should see the zero-hold effect (sinc envelope), I think. At least I see it with the Revox and I don’t have lower oversampling DAC at disposal.
 
I added that into MATLAB. With aliases, the peaks are at 1.4785* FS or +3.3964 dBFS.
If I understand the code correctly you only added aliases for harmonics from 22050:44100 Hz range. So this value is correct for a signal produced by taking a properly bandlimited 100.227 Hz square wave at 88.2 kHz sampling rate and downsampling it, without further bandlimiting, to 44.1 kHz sampling rate (i.e. just throwing out every second sample).

To get correct value for a +/- amplitude signal, you'll have to add aliases for harmonics from 22050:inf range, which may be challenging :)
 
If I understand the code correctly you only added aliases for harmonics from 22050:44100 Hz range. So this value is correct for a signal produced by taking a properly bandlimited 100.227 Hz square wave at 88.2 kHz sampling rate and downsampling it, without further bandlimiting, to 44.1 kHz sampling rate (i.e. just throwing out every second sample).

To get correct value for a +/- amplitude signal, you'll have to add aliases for harmonics from 22050:inf range, which may be challenging :)

Yes. Adding more harmonics is not a problem. But they will not fold into below fs/2. This is with harmonics up to 4*fs. +6.1309 dB overshoot. Seems strange to me.

Screenshot 2024-11-17 at 18.11.12.png
 
Okay, but in that case you would have to include In your definition both clipped and unclipped ISOs, which to me would be confusing.

Let's take for example a sampled wave for which the peaks do not coincide with samples. If we were to perfectly reconstruct that wave, it would have peaks that go beyond the samples.

Now, let's normalize those samples to 0dBFS. The peaks of that wave, if perfectly reconstructed, would exceed the 0dBFS threshold.

Let's say the peaks go over the sample points by 3dB.

Let's pretend to run that signal into an actual oversampling DAC with no headroom. Now, instead of a peak between samples we'd have a train of 0dBFS samples.

Let's now skip to the output of the DAC after the analog low-pass filter. The reconstructed wave would now have peaks that exceed the 0dBFS threshold due to the Gibbs phenomenon, but since the wave was digitally clipped they obviously wouldn't be at +3dBFS.

Let's say those peaks are now at +1dBFS (I'm making up a number).

By your definition, you would have to call those peaks "+1dBFS ISOs or ISPs", which is fine, but it wouldn't really give us an idea of how much information was lost during the conversion due to clipping.

If I were to say "this DAC can't accurately reproduce +3dBFS ISOs above 0dBFS" it wouldn't make any sense to you, because you would say that the ISOs only measure 1dB above 0dBFS, even though the original wave had 3dB worth of information that was lost.

Furthermore, if we were to change the values of the analog low-pass filter in the DAC, that +1dBFS value could become +0.5dBFS, or +0.2dBFS (again, I'm making up numbers. @JIW will correct me with the math). The values would also change if we increased the headroom of the interpolator. If we instead stayed in the digital realm, every clipped ISO would measure 0dB above 0dBFS.

This to me would be confusing. I'd rather say that our wave has +3dBFS ISOs or ISPs. That stays true regardless of what the DAC is doing to the signal.

Does this make any sense?
I think we have some wording issues causing a misunderstanding.

Taking your signal after normalization to 0dBFS sample values and observe the theoretical (precision sinc reconstruction) overshoot is +3dB ref 0dBFS. Actually, this would be the known fs/4 @45deg signal, highest sample being 0.1dB below saturation.

But if you reduce the peak input level to, say, -10dBFS, the idealized output peaks will be rendered at -7dBFS, so still the same 3dB of overshoot. So I would call this 3dBr overshoots, the "r" defining the reference output level we would see if we take the largest sample and repeat it infinitely (the mentioned "DC" or steady-state level). That's the intrinsic overshoot characteristic of that signal.

In application, we would start with a signal level that should never be clipped, say, -1dB below FS for those peak values, that is, -4dBFS actual, for the largest input sample value. Then increase slowly the level and look at the waveform or spectrum until it distorts. Your DAC without any headroom would start clipping when the largest input sample exceeds -3dBFS.

In the end, we try to find the level where the output stream starts to change (either from digital or analog artifacts) and add the theoretical overshoot value to find the headroom value.

We just have to be aware that the actual upsampling overshoot, depending on the filter implementation, might be less than the theoretical maximum. If the upsampler produces only 2dBr actual overshoot like when using a typical "slow" filter setting, we have gained 1dB of headroom "for free" even for the headroom-less DAC. We could normalize our input signal to -2dBFS and still have no clipping/distortion at the output.

Likewise for a NOS DAC we get the full 3dB back "for free". Not quite for free of course, as the cost is the imperfect reconstruction.

That's what is actually observed when you look at the output of a DAC with a variety of filter settings, like the AK4493 which even have a NOS setting (called "super slow" by AKM).

I hope I have now cleared up the fog at little ;-)
 
Last edited:
I think we have some wording issues causing a misunderstanding.

Taking your signal after normalization to 0dBFS sample values and observe the theoretical (precision sinc reconstruction) overshoot is +3dB ref 0dBFS. Actually, this would be the known fs/4 @45deg signal, highest sample being 0.1dB below saturation.

But if you reduce the peak input level to, say, -10dBFS, the idealized output peaks will be rendered at -7dBFS, so still the same 3dB of overshoot. So I would call this 3dBr overshoots, the "r" defining the reference output level we would see if we take the largest sample and repeat it infinitely (the mentioned "DC" or steady-state level). That's the intrinsic overshoot characteristic of that signal.

In application, we would start with a signal level that should never be clipped, say, -1dB below FS for those peak values, that is, -4dBFS actual, for the largest input sample value. Then increase slowly the level and look at the waveform or spectrum until it distorts. Your DAC without any headroom would start clipping when the largest input sample exceeds -3dBFS.

In the end, we try to find the level where the output stream starts to change (either from digital or analog artifacts) and add the theoretical overshoot value to find the headroom value.

We just have to be aware that the actual upsampling overshoot, depending on the filter implementation, might be less than the theoretical maximum. If the upsampler produces only 2dBr actual overshoot like when using a typical "slow" filter setting, we have gained 1dB of headroom "for free" even for the headroom-less DAC. We could normalize our input signal to -2dBFS and still have no clipping/distortion at the output.

Likewise for a NOS DAC we get the full 3dB back "for free". Not quite for free of course, as the cost is the imperfect reconstruction.

That's what is actually observed when you look at the output of a DAC with a variety of filter settings, like the AK4493 which even have a NOS setting (called "super slow" by AKM).

I hope I have now cleared up the fog at little ;-)

Yep. I understand what you mean a little better now, but I think I had gotten the gist of it even in your previous message.

What I meant to say is that when we mention inter-sample overs, what I think of is what you referred to as “theoretical overshoot”.
I just find it easier to talk about an inter-sample peak by defining it like this, since if you define it as the peak found at the DAC’s output you always have to make a distinction between the value of the theoretical peak, the value of the oversampled and filtered (but not clipped) peak, and the value of the oversampled, filtered, clipped peak. In practice, these are 3 different values (or 5 if you differentiate between the sample values before the analog filter and the measured output voltage after said filter). I find it quite a bit easier to talk about the subject if I refer to the theoretical peak as “ISO” (or “ISP”) and to the other 4 values as “the DAC’s output”.

Anyways, whatever the more “correct” definition is, the important thing is that we understand each other, I guess. :)
 
I created a new test file, an unfiltered square at 44100Hz/440 = 100.2227Hz and at different levels, from -3.01dBFS to 0dBFS. At 0dBFS, a square test tone will generate an overshot at +3.01dBFS when reconstructed.
Unfiltered square waves produce a 3.01 dB overshoot when reconstructed. They can easily be generated with the APx555 test stations. I have been using these square waves and a +3.01 dBFS fs/4 sinewave. I created the sinewave using Audacity.

I have just published another application note on this topic:

"Interpolator Overload Distortion"

This paper shows how an overloaded interpolator can create high levels of non-harmonic distortion at low frequencies. This is distinctly different than the harmonic distortion that is created by clipping.

Overloaded Interpolator in an ASRC (3 dB overload):
(massive distortion below 20 kHz)
1732564221011.png


Overloaded Analog Stage (3 dB Overload):
(no distortion below 20 kHz)
1732564308389.png


In the paper, I discuss why an interpolator overload problem is much more serious than a clipping problem.
 
Unfiltered square waves produce a 3.01 dB overshoot when reconstructed.
That's not what I and others are observing, see my post #564.
Only the special case of the fs/4 @ 45deg sine wave (+1, +1, -1, -1 repetitive sample sequence) is reaching this level of overshoot. All other squares with N samples at +1 followed by N samples at -1 give lower peaks and a -1, +1 step change settles at 2.1dB(1.27x) overshoot:
1732565975522.png
 
That's not what I and others are observing, see my post #564.
Only the special case of the fs/4 @ 45deg sine wave (+1, +1, -1, -1 repetitive sample sequence) is reaching this level of overshoot. All other squares with N samples at +1 followed by N samples at -1 give lower peaks and a -1, +1 step change settles at 2.1dB(1.27x) overshoot
Yes, I agree.

With most square wave frequencies that I can generate with my APx555, I see the onset of interpolator overload distortion when the unfiltered square wave is between -2.100 dBFS (distorted) and -2.115 dBFS (clean). This threshold agrees with your calculations.

For this hardware test, I was running the signal through a fixed-point ASRC (miniDSP SHD). The interpolator in the ASRC has exactly 0 dB of headroom. This ASRC has a linear-phase low-pass filter.

The results will be different (generally worse) if you are not using a linear phase brick wall filter in the interpolator.
 
these issues can found in the different ""streaming channels"" ?or are they standardized in order to avoid them?
;-)
 
these issues can found in the different ""streaming channels"" ?or are they standardized in order to avoid them?
;-)
Take Spotify as an example. If they apply a positive gain (to boost loudness), they will keep (or limit) true peak at -1 dB. So, no intersample peak problem (I guess the possible exception is when the piece is close to -14 dB LUFS long term, which requires no/little normalization, and has TP above 0 dB).
spotify.png
 
Unfiltered square waves produce a 3.01 dB overshoot when reconstructed. They can easily be generated with the APx555 test stations. I have been using these square waves and a +3.01 dBFS fs/4 sinewave. I created the sinewave using Audacity.

I have just published another application note on this topic:

"Interpolator Overload Distortion"

This paper shows how an overloaded interpolator can create high levels of non-harmonic distortion at low frequencies. This is distinctly different than the harmonic distortion that is created by clipping.

Overloaded Interpolator in an ASRC (3 dB overload):
(massive distortion below 20 kHz)
View attachment 409516

Overloaded Analog Stage (3 dB Overload):
(no distortion below 20 kHz)
View attachment 409517

In the paper, I discuss why an interpolator overload problem is much more serious than a clipping problem.

In the paper, you write:
If a playback device has a digital volume control, test the device with a +3.01 dBFS tone. If the device has an interpolator overload problem, this may go away when the digital volume control is turned down. However, in most cases, you will discover that the volume control is located after the interpolator.
How did you determine that in most cases the volume control is located after the interpolator?

The ESS ES9039 chips have the volume control before the interpolator as well as the AKM AK4499. I mentioned this in this thread here.

You also claim:
Curiously, nobody tests for interpolator overload distortion, and many DACs still have this problem!

Golden Sound uses a fs/4 sine at 45 degree up to +3.01 dBFS at 44.1 kHz sample rate such as in the test of your DAC3.
1732581297137.png


Archimago tests using white noise with 0 dBFS as well as -4 dBFS peaks.
1732581370326.png


Are those not interpolator overload tests?
 
Unfiltered square waves produce a 3.01 dB overshoot when reconstructed. They can easily be generated with the APx555 test stations. I have been using these square waves and a +3.01 dBFS fs/4 sinewave. I created the sinewave using Audacity.

I have just published another application note on this topic:

"Interpolator Overload Distortion"

This paper shows how an overloaded interpolator can create high levels of non-harmonic distortion at low frequencies. This is distinctly different than the harmonic distortion that is created by clipping.

Overloaded Interpolator in an ASRC (3 dB overload):
(massive distortion below 20 kHz)
View attachment 409516

Overloaded Analog Stage (3 dB Overload):
(no distortion below 20 kHz)
View attachment 409517

In the paper, I discuss why an interpolator overload problem is much more serious than a clipping problem.

You write in the paper:
Music can cause overloads even if it has no content at the worst case 11.025 kHz frequency. For example, multi-sample sustained overloads can be caused by square waves of any frequency. Tones at 1/8 and 1/16 of the sample rate are also problematic.

All frequencies of which the sample rate is a multiple, are problematic for ISOs. Particularly those, where the multiplicative factor is even and/or low.

A sine wave with a frequency of fs/k with k being a positive integer has repeating samples for every cycle (see below for proof). Thus, if it produces ISOs, it will have at least one per cycle. For k being even, i.e. a multiple of 2, absolute sample value is repeated every halfcycle (also see below for proof) and will thus produce two ISOs per cycle if it produces any. In this case, the maximum ISO value is if the peak is exactly between two samples. For even multiples of 2, i.e. 4, 8, 12, 16 etc, this is easily accomplished since there is an even number of samples per halfcycle and the samples for every halfcycle are mirrored at the peak. For odd multiples of 2, i.e. 2, 6, 10, 14 etc, there is an odd number of samples per halfcycle and the first sample per halfcycle has to be zero with the rest being mirrored at the peak. For k being odd, there is no integer number of samples per halfcycle. Thus, one halfcycle will have an even number of samples while the other halfcycle will have an odd number of samples and the maximum ISO value is not if the peak is exactly between two samples since this is not possible for both halfcycles.

For k = 6, the maximum ISO value is -20*log10(sin(pi*(1 - 1/6 - 1/2))) = 1.2494 dB based on what I derived here. For k = 8, the maximum ISO value is -20*log10(sin(pi*(1 - 1/8 - 1/2))) = 0.6877 dB. For k = 3, setting the first sample to 0, the remaining two samples are +-sin(1/3*2*pi) = +-0.8660. Thus, if those are set to +-1, i.e. the sample sequence is [0, 1, -1, 0, 1, -1, ...], the ISO value is -20*log10(sin(1/3*2*pi)) = 1.2494 dB and repeated every halfcycle.


Proof mentioned above:
The function for a sine with frequency fs/k and phase phi is x(t) = sin(2*pi*fs/k*t + phi). It is sampled at tn = n/fs. Thus, the samples are x(n) = x(tn) = sin(2*pi*n/k + phi). The samples repeat every cycle if for the additional samples dn, 2*pi*dn/k = 2*pi, i.e. if dn = k. The samples repeat in absolute value for every halfcycle if 2*pi*dn/k = pi, i.e. if dn = k/2.
 
With most square wave frequencies that I can generate with my APx555, I see the onset of interpolator overload distortion when the unfiltered square wave is between -2.100 dBFS (distorted) and -2.115 dBFS (clean). This threshold agrees with your calculations.

For this hardware test, I was running the signal through a fixed-point ASRC (miniDSP SHD). The interpolator in the ASRC has exactly 0 dB of headroom. This ASRC has a linear-phase low-pass filter.
This underlines IMHO why a 3dB headroom would be sort of safe to avoid ISO issues with typical modern mastering where we find clipped square wave'ish patterns all the time (hard-clipped kickdrums and snares.
 
Back
Top Bottom