• Welcome to ASR. 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!

John Siau explains the mechanism of this distortion at the beginning of the video I linked in post #449.

ok so am I right in saying that with non-oversampling the waveform can be reproduced to its full amplitude, but with oversampling the interpolator cannot create values higher or lower than 1 or -1? Why is the interpolator not able to do this but non-oversampling can get higher?
 
The difference is that oversampling is done in the mathematical/numerical realm whereas a simple DAC conversion process isn't bound to another character set one can run out of. Still, the analog equivalent has to be "rendered" correctly and NOS DACs can run out of respective headroom as well voltage-wise.

When performing calculations related to waveforms, one has to take into account that the numerical values may rise and map it accordingly to prevent clipping.
 
The difference is that oversampling is done in the mathematical/numerical realm whereas a simple DAC conversion process isn't bound to another character set one can run out of. Still, the analog equivalent has to be "rendered" correctly and NOS DACs can run out of respective headroom as well voltage-wise.

When performing calculations related to waveforms, one has to take into account that the numerical values may rise and map it accordingly to prevent clipping.

I'm not sure I follow your answer. At the risk of putting words into @VientoB 's mouth, here's my take on it. I expect I'm misunderstanding something, an explanation would be most welcome:

It seems to me that NOS DACs also have distortion at the points where there would be an ISO, it's just that by being incapable oversampling they don't even "know" that those peaks should be there. i.e.

NOS: "I don't know there's a peak"
Oversampling: "I know there's a peak but cannot represent it"

Similar distortion(?), but different underlying cause, and thus different names?
 
I'm not sure I follow your answer. At the risk of putting words into @VientoB 's mouth, here's my take on it. I expect I'm misunderstanding something, an explanation would be most welcome:

It seems to me that NOS DACs also have distortion at the points where there would be an ISO, it's just that by being incapable oversampling they don't even "know" that those peaks should be there. i.e.

NOS: "I don't know there's a peak"
Oversampling: "I know there's a peak but cannot represent it"

Similar distortion(?), but different underlying cause, and thus different names?
Hmm, I'm pretty sure the whole point of the 44.1kHz sample rate is that you can recreate any waveform with a frequency less than half the sample rate from two sample points. So the NOS DAC can recreate the peaks - otherwise it wouldn't be able to recreate peaks that don't even reach 1 or -1
 
Here we go. File is mono content, so only one channel was processed in the following.

Original track, at the largest ISO with more than +5dBFS peak level which is beyond what any DAC I'm aware of would handle without clipping.
View attachment 323918

Reference track (upsampled to 705.6kHz 32 bit, -6dB gain applied, downsampled to 176.4 16bit):
View attachment 323920

Clipped (same as above, with hard-clipping at -6dBFS before the final downsampling):
View attachment 323921
Note: The "dimple on the roof" comes from the downsampling as theory says it should (ringing from the linear phase resampling).

Now let's have some fun comparing the two versions (ABX logs welcomed). I didn't bother as I'm heavily biased anyway towards "no difference" from previous experiences.
I'm aware that this simple test might not fully represent what could happen in practice (notably the analog output stage of DAC might run into saturation with a sticky recovery even when the DAC chip itself could handle +6dBFS peaks properly). But is a starting point at least.

Slightly more than four samples between the negative peaks with two zero crossings means the signal is very close to fs/2.

This got me thinking. For any halfcycle of a sine at below fs/2 from 0 to pi, pi to 2 pi etc., the maximum intersample over is if the samples are placed symmetrically about the peak and thus have the same value. This is of course why for fs/4, sampling is at pi/4 and 3pi/4 and the sample values are sqrt(1/2). For a non-clipped constant amplitude fs/4 gives the maximum intersample overs. However, if amplitude is varied, higher frequencies may be used.

A sine signal at frequency f = k*fs, where 0 < k < 1/2, with phase phi, has the function

x(t) = sin(2*pi*f*t + phi) = sin(2*pi*k*fs*t + phi).

Sampling is done at times tn = n/fs. Thus, the sampled values are

x(n) = sin(2*pi*k*fs*tn + phi) = sin(2*pi*k*fs*n/fs + phi) = sin(2*pi*k*n + phi).

For the maximum value over the adjacent sample values, x(n0) = x(n0+1) and the fictional sample of the maximum is at x(n0+1/2) = 1 or x(n0+1/2) = -1 for a minimum. Since asin(+-1) = pi-+pi/2, it is the case that 2*pi*k*(n0+1/2) + phi = pi-+pi/2, which gives that n0+1/2 = (1-+1/2)/(2k) - phi/(2*pi*k) which gives

n0 = (1-+1/2 - phi/pi)/(2k) - 1/2 = (1 - k -+ 1/2 - phi/pi)/(2k).

Thus, the other sampling points are at

n = n0 + dn = (1-+1/2 - phi/pi)/(2k) - 1/2 + dn = ( 1 + (2*dn-1)*k -+1/2 - phi/pi)/(2k).

This gives the sample values

x(n0) = sin(2*pi*k*(1 - k -+ 1/2 - phi/pi)/2k + phi) = sin(pi*(1 - k -+ 1/2))

and x(n0+1) = sin(pi*(1 + k -+ 1/2)).

Thus, the signal at that point can be increased by the inverse G = 1/x(n0) without exceeding 1 and the peak between the samples will also be increased by the inverse exceeding 1 being 1/x(n0).

In order for n0 to be an integer phi has to have the correct value, i.e. (1 - k -+ 1/2 - phi/pi)/(2k) = m where m is an integer. Thus, 1 - k -+ 1/2 - phi/pi = 2*k*m and thus

phi/pi = 1 - k -+ 1/2 - 2*k*m = 1 - k*(1-2*m) -+ 1/2.

Thus, the phase has to be

phi = (1 - k*(1+2*m) -+ 1/2)*pi.

For k = 1/4, taking the positive maximum, n0 = 0 if phi = pi/4 and n0 = 1 if phi = -pi/4. The sample values adjacent to the maximum are sin(pi/4) = sqrt(1/2). Thus, the signal can be increased by sqrt(2) without exceeding 1 giving intersample peaks of sqrt(2) or +3.01 dBFS. In the limit at k = 1/2, n0 = -phi/pi which is 0 of phi = 0 and 1 if phi = -pi. The sample values adjacent to the maximum are sin(0) = 0 with the inverse being infinitely large. For a 20 kHz signal sampled at 44.1 kHz, for the maximum, n0 = 0 if

phi = (1 - 20/44.1 - 1/2)*pi = (1/2 - 20/44.1)*pi = (44.1-2*20)/(2*44.1)*pi = 4.1/88.2*pi.

The sample values adjacent to the maximum are sin(pi*4.1/88.2) = 0.1455 which is -16.74 dBFS. The next adjacent sample values are sin(n0+2) = sin((1 + (2*2-1)*20/44.1 - 1/2)*pi) = -0.4242 which is -7.45 dBFS, sin(n0+3) = sin((1 + (2*3-1)*20/44.1 - 1/2)*pi) = 0.6670 which is -3.52 dBFS, sin(n0+4) = sin((1 + (2*4-1)*20/44.1 - 1/2)*pi) = -0.8533 which is -1.38 dBFS, sin(n0+5) = sin((1 + (2*5-1)*20/44.1 - 1/2)*pi) = 0.9673 which is -2.89 dBFS and sin(n0+6) = sin((1 + (2*6-1)*20/44.1 - 1/2)*pi) = -0.9994 which is -0.0055 dBFS. Thus, if the amplitude is ramped up the right way, very high intersample overs may be produced.
 
Hmm, I'm pretty sure the whole point of the 44.1kHz sample rate is that you can recreate any waveform with a frequency less than half the sample rate from two sample points. So the NOS DAC can recreate the peaks - otherwise it wouldn't be able to recreate peaks that don't even reach 1 or -1

It does not recreate peaks below 0 dBFS accurately either because it does not bandlimit the digital signal to below half the sample rate.
 
Hmm, I'm pretty sure the whole point of the 44.1kHz sample rate is that you can recreate any waveform with a frequency less than half the sample rate from two sample points. So the NOS DAC can recreate the peaks - otherwise it wouldn't be able to recreate peaks that don't even reach 1 or -1
I (and the whole thread) was referring to the shape of the waveform, not it's frequency.
 
I'm not sure I follow your answer. At the risk of putting words into @VientoB 's mouth, here's my take on it. I expect I'm misunderstanding something, an explanation would be most welcome:

It seems to me that NOS DACs also have distortion at the points where there would be an ISO, it's just that by being incapable oversampling they don't even "know" that those peaks should be there. i.e.

NOS: "I don't know there's a peak"
Oversampling: "I know there's a peak but cannot represent it"

Similar distortion(?), but different underlying cause, and thus different names?

You are correct. A NOS DAC using Sample & Hold will “clip” the top of the wave at 0 dBFS, much like an OS DAC does. But it doesn’t stop there. It will also slightly “clip” every peak of the wave, even if it’s below 0 dBFS! In fact, we could even say that it “clips” not only the top of each wave but also every step of the wave leading up to and following the peak.

Now, this sounds terrible—and it is—but it’s only true if we leave the analog, “stair-stepped” output of the conversion unfiltered or only minimally filtered. This unfiltered or lightly filtered output is often what we find in cheaper NOS DACs, which some people say sound more “analog” :facepalm:. In order to get a smooth, accurate representation of the original analog signal, you need to add a steep analog low-pass filter at the end of the chain. Ideally, this filter will remove most of the “stair-stepping” effect. (See post #509)

The challenge with this approach, as @AnalogSteph pointed out, is that building a well-implemented analog filter is both difficult and very expensive.

This is where oversampling DACs come into play. Oversampling moves most of the filtering process into the digital realm, where it’s cheaper and easier to implement. With this digital filtering approach, the analog filter at the end of the chain can be less steep and, therefore, less expensive to produce. However, this also means we need to be very careful to avoid clipping the digital oversampling filter (hence the focus of this thread). Once the wave is clipped digitally—meaning the samples are “flattened”—there’s no steep analog filter at the end of the chain to “save” us from producing a clipped analog output. A digitally clipped wave becomes an analog clipped wave.

But, as @JIW correctly pointed out, once the wave is clipped digitally, even a steep analog filter can only do so much to “unclip” it. Distortion components in the passband will remain, especially for frequencies farther from the Nyquist frequency. Although, as a side note, ISOs also become less significant as we move farther from the Nyquist frequency, but this gets into technical details I don’t fully understand, so I’ll leave it there.

What I do understand, though, is that digital clipping is actually the “best” outcome once samples attempt to exceed 0 dBFS. Overloading a digital filter can have far worse consequences. I highly recommend watching @John_Siau ’s presentation on this topic and reading this thread from the beginning for a clearer picture.
 
Hence, I wrote "but you wont hear the harmonics "

or maybe you can hear the 2nd at 22k?

//
If it clips, it will be the 3rd harmonic.
With IS at 5512.50Hz as I showed before, third is at 16535.5Hz.
Not only harmonic distortion, but other distortion can arise due to overload, as I showed here.
 
You are correct. A NOS DAC using Sample & Hold will “clip” the top of the wave at 0 dBFS, much like an OS DAC does..
I understand what you mean with the Zero-Hold function of the DAC, and I actually like the comparison.
But it might be confusing to some. The zero hold creates the famous stair steps which, if unfiltered, will generate a lot of unwanted aliases out of audio band.

1731656501914.png


Source
 
Last edited:
If it clips, it will be the 3rd harmonic.
With IS at 5512.50Hz as I showed before, third is at 16535.5Hz.
Not only harmonic distortion, but other distortion can arise due to overload, as I showed here.
When clipping occurs, much else of IMD may be triggered. I only discussed my example of a 11kHz event as it is the most prevalent one as I understand it.

//
 
I understand what you mean with the Zero-Hold function of the DAC, and I actually like the comparison.
But it might be confusing to some. The zero hold creates the famous stair steps which, if unfiltered, will generate a lot of unwanted aliases out of audio band.

View attachment 406649

Source

Right. I'm focusing mainly on the time domain because of my limited understanding of the topic, but it's important to keep in mind that any change in the shape of a wave form in the time domain also means a change in harmonic content in the frequency domain. So even though you might see clipped peaks in both the NOS and OS outputs, it doesn't mean the reconstructed waves share the same harmonic characteristics or sound.
 
That’s only for a NOS converter that wouldn’t have an analogue filter at the output.
Another example of this in-band distortion out of John Siau's video:
J_Siau_ISP_demo.png
 
Another example of this in-band distortion out of John Siau's video:
View attachment 406689
Just to be precise and to prevent potential confusion from the readers:
  • The above is ISO testing, generating a very different type of distortion, in this case, in audio band.
  • What you quoted from me is not related, and was only to mention the out of band noise and distortion generated by a non-filtered digital nor analogue DAC. So that is a different story.
Cheers
 
And maybe, let me show some more examples from four CD Players, and three different DACs, with three different inter-sample over test files.

The CD Players:
  • Yamaha CD-1 (1982) : Non-oversampling, DAC Sony CX890, Analog filter only
  • Onkyo C-733 (2005) : DAC Cirrus Logic CS4396-KS (integrated oversampling filter)
  • Teac VRDS-25X (1999) : ASRC AD1890, Oversampling Filter SM5843A, DAC AD1862N-J
  • Denon DCD-900NE (2024) : Denon AL32 Advanced plus Processing filter, DAC ESS9018S
The three tests:
  • 5512.50Hz for a peak of +0.69dBFS
  • 7350Hz for a peak of +1.25dBFS
  • 11025Hz for a peak of +3.0dBFS
The results when THD+N is calculated up to 96kHz:

Intersample-overs tests
Bandwidth of the THD+N measurements is 20Hz - 96kHz
5512.5 Hz sine,
Peak = +0.69dBFS
7350 Hz sine,
Peak = +1.25dBFS
11025 Hz sine,
Peak = +3.0dBFS
Teac VRDS-25X-30.2dB-24.2dB-27.9dB
Yamaha CD-1 (Non-Oversampling CD Player)-86.4dB-84.9dB-78.3dB
Onkyo C-733-88.3dB-40.4dB-21.2dB
Denon DCD-900NE-34.3dB-27.1dB-19.1dB

Now in frequency domain (FFT view up to 96kHz, in log scale), dashboard of measurements shown for each

5512.50Hz Yamaha CD-1 (showing standard distortion components with H2 dominating):

1731680540965.png


5512.50Hz Onkyo C-733 (happy here, because enough headroom, only standard distorsion with H2 dominating):

1731680581359.png


5512.50Hz Teac VRDS-25X (probable overload of the ASRC, clipping with H3 dominating and tons of harmonic and non-harmonic distortion):

1731680699784.png


5512.50Hz Denon DCD-900NE (starting to clip with high odd harmonics):

1731683972926.png


7350Hz Yamaha CD-1 (still showing standard distortion components with H2 dominating):

1731681048591.png


7350Hz Onkyo C-733 (beginning to clip, with odd harmonics showing at high level):

1731680798584.png


7350Hz Teac VRDS-25X (overload again):

1731680931993.png


7350Hz Denon DCD-900NE (more clipping than in previous test with higher odd harmonics):

1731684060620.png


11025Hz Yamaha CD-1 (Distortion increased but still H2 dominated, no clipping):

1731681078280.png


11025Hz Onkyo C-733 (more clipping seen from increased odd harmonics):

1731681153047.png


11025Hz Teac VRDS-25X (near same overload, poor thing):

1731681197686.png


11025Hz Denon DCD-900NE (again higher clipping than in previous test tone):

1731684108911.png



I hope these make things a little more illustrative with real cases.
 
Last edited:
And maybe, let me show some more examples from three CD Players, and three different DACs, with three different inter-sample over test files.

The CD Players:
  • Yamaha CD-1 (1982) : Non-oversampling, DAC Sony CX890, Analog filter only
  • Onkyo C-733 (2005) : DAC Cirrus Logic CS4396-KS (integrated oversampling filter)
  • Teac VRDS-25X (1999) : ASRC AD1890, Oversampling Filter SM5843A, DAC AD1862N-J
The three tests:
  • 5512.50Hz for a peak of +0.69dBFS
  • 7350Hz for a peak of +1.25dBFS
  • 11025Hz for a peak of +3.0dBFS

The results when THD+N is calculated over 16 harmonics and up to 96kHz:

Intersample-overs tests
Bandwidth of the THD+N measurements is 20Hz - 96kHz
5512.5 Hz sine,
Peak = +0.69dBFS
7350 Hz sine,
Peak = +1.25dBFS
11025 Hz sine,
Peak = +3.0dBFS
Teac VRDS-25X-30.2dB-24.2dB-27.9dB
Yamaha CD-1 (Non-Oversampling CD Player)-86.4dB-84.9dB-78.3dB
Onkyo C-733-88.3dB-40.4dB-21.2dB

Now in frequency domain (FFT view up to 96kHz, in log scale), dashboard of measurements shown for each

5512.50Hz Yamaha CD-1 (showing standard distortion components with H2 dominating):

View attachment 406746

5512.50Hz Onkyo C-733 (happy here, because enough headroom, only standard distorsion with H2 dominating):

View attachment 406747

5512.50Hz Teac VRDS-25X (probable overload of the ASRC, clipping with H3 dominating and tons of harmonic and non-harmonic distortion):

View attachment 406748

7350Hz Yamaha CD-1 (still showing standard distortion components with H2 dominating):

View attachment 406752

7350Hz Onkyo C-733 (beginning to clip, with odd harmonics showing at high level):

View attachment 406750

7350Hz Teac VRDS-25X (overload again):

View attachment 406751

11025Hz Yamaha CD-1 (Distortion increased but still H2 dominated, no clipping):

View attachment 406753

11025Hz Onkyo C-733 (more clipping seen from increased odd harmonics):

View attachment 406754

11025Hz Teac VRDS-25X (near same overload, poor thing):

View attachment 406755


I hope these make things a little more illustrative with real cases.

Wow. Thank you for taking the time to post these FFTs.

There's a lot of info that can be derived form these graphs.

For example, you can see how the Yamaha (NOS with analog filter) doesn't introduce any clipping but it does let aliasing components back into the audible range, and it also has an IMD spike below the fundamental.

The Onkyo (OS with headroom) is the opposite. We have crazy clipping but the aliased components stay out of the audible band due to oversampling, and there's no IMD spike.

The Taec (OS without headroom)... is just a mess.
 
That’s only for a NOS converter that wouldn’t have an analogue filter at the output.

If it did have an analog filter that would bandlimit the output to below half the sample rate, that would be producing the intersample overs in the analog domain and might overload the following components. The ringing from the filters is entirely a function of the filtering not whether it is done digitally or using analog components due to the Gibbs phenomenon.

The only way for a NOS DAC to avoid intersample overs is to do zero-order hold without analog filter. Then it does not produce any peaks accurately except for the Goldilocks peaks that fall on the sample values. But for the latter there are no intersample overs of course.
 
If it did have an analog filter that would bandlimit the output to below half the sample rate, that would be producing the intersample overs in the analog domain and might overload the following components. The ringing from the filters is entirely a function of the filtering not whether it is done digitally or using analog components due to the Gibbs phenomenon.

The only way for a NOS DAC to avoid intersample overs is to do zero-order hold without analog filter. Then it does not produce any peaks accurately except for the Goldilocks peaks that fall on the sample values. But for the latter there are no intersample overs of course.

Yes... But isn't the whole point that we want those ISOs to be reproduced?

Obviously a filtered NOS DAC would be able do it but the output voltage would have to go above 1, so that's not ideal. An OS DAC without headroom either clips the wave or overloads the filter so that's arguably worse in terms of accuracy.

The only option left is to have headroom before the oversampling stage.
 
Back
Top Bottom