4 ms·
Up to the Nyquist limit, a digital signal will completely recreate the original signal, with no square wave steps. Digitisation does not result in square wave o
by pja 4y ago
Up to the Nyquist limit, a digital signal will completely recreate the original signal, with no square wave steps. Digitisation does not result in square wave output anywhere in the output chain.
Chris Montgomery (of Ogg / Speech / xiph.org & RedHat) did a series of videos going into this in considerable depth. I encourage you to watch them.
https://xiph.org/video/ https://xiph.org/video/
- ChrisLomont 4y agoI am fully aware of those videos and claims. Did you read my posts or the links? What I posted goes vastly beyond what Chris Montgomery wrote, and far beyond his claims. Again, in different words: Nyquist assumes infinitely precise samples. It's math, not computer sampling. This never happens, since samples are quantized. Having samples at the proper number of Hz is useless unless enough precision is there, and non-infinite precision implies the original signal is never reconstructable. We're dealing with computers, not the real numbers. Take a pure sine wave. Sample it mathematically. Quantize those values. Now what sin value reproduces those quantized values? None. Never. They are rational numbers - it is mathematically impossible to fit a single sine wave to them, since sine is a transcendental function. End of story. Sine is a transcendental function, so rational inputs (other than 0 in the case of sin) do not (except for input 0 for sin) give rational output. So you cannot sample it to perfection with a digital device. You can approximate it. That approximation matters. Digital sampling takes rational input deltas (sampling rate) and necessarily obtains imperfect samples, since you quantized the actual value of a sine wave. So Nyquist fails. Yes, for a bandlimited signal of a given frequency, Nyquist lets you reconstruct that frequency given infinite precision. This NEVER happens in practice, since it assumes infinitely precise samples. Montgomery ignores this (and a host of other issues - he's at level 2 of a 100 level tower. People at level 0 see his videos and assume there are only 2 levels to the tower). Bitdepth matters. Nyquist does nothing about amplitude quantization, which is needed. It ignores the path to reconstruction - Nyquist only applies to a perfect (not floating point or integer) reconstruction of the signal. Nyquist does not deal with the fact that the quantized values, when pushed to any physical device used to reconstruct audio, is more like stairsteps than pure sine waves. Most physical devices performing playback are more stairstep than smooth sine values, so they are not reconstructing the input signal - another issue that matters. Input signals are (nearly, up to quantum level) infinitely precise in amplitudes - output devices tend to be more quantized. Please read the thread I wrote and think through it. I posted a link to a good discussion, I posted a simple experiment or two you can do, I posted (here) a simple mathematical exercise showing that Nyquist fails for this.
- aaaaaaaaaaab 4y ago1. Montgomery talks about quantization noise. He doesn’t assume infinite precision. 2. DAC output is not stairstep. There’s an analog reconstruction filter that filters out the ultrasonic components, thereby getting back the original smooth waveform. You should read up on DAC design.
- ChrisLomont 4y ago>Montgomery talks about quantization noise. He doesn’t assume infinite precision. In [0], at time 23:50, he states that there is only one band limited signal that passes through each sample point - this requires infinite precision for reasons I explained elsewhere. It's a theoretical idealization that makes math easier, just like frictionless physics, using the ideal gas law, approximating sin(x) by x for small x, and so on. It's nice, but it's not what happens in practice. > DAC output is not stairstep. There’s an analog reconstruction filter that filters out the ultrasonic components, thereby getting back the original smooth waveform. You should read up on DAC design. I wrote that the physical playback device, such as a speaker, adds ultrasonic noise due to simple physics. If this were not the case, there'd be very little need for such variety in speaker costs - they'd all just magically reproduce the perfect waveform. But they don't. As to DACs, they most certainly do not work as you claim - and it's demonstrably impossible as I explained since sine is a transcendental function, and you lost information needed since you don't have infinite precision samples. Let's pick a common DAC, say an Analog Devices AD5780, datasheet here [1]. Page 18 has the circuit diagram for - a resistor bank. That's a stairstep (minus some physical noise at the transitions). If you look over the previous pages (Vout is the out signal you want to look at), it clearly outputs a fixed, discrete voltage for a fixed input. Every common chip does this. Care to point to a chip that guarantees "getting back the original smooth waveform"? I'd love to see the datasheet on such a device. One can design or buy DACs for $500, $1000, and more, but these are not what most people use. And even these exist in such variety because, as you guessed it, they cannot reproduce perfectly original waveforms, otherwise there'd be no need for such cost or variety. They all make tradeoffs and assumptions to cater to specific needs. Sure, they are very good, but they don't reproduce "the original smooth waveform". As to analog filters providing magic, they too are not what you think - they're making assumptions and deviate from perfection with tradeoffs. I'd guess Analog Devices engineers can say it better than I : "A reconstruction filter is used at the output of the DAC to attenuate image frequencies. However, a physical filter cannot be implemented with ideal stop band rejection extending out to infinite frequency. This is due to component parasitic effects as well as the physical limitations of printed circuit board layout" [2]. The perfect filter for the output is a sinc (yes, with a 'c'). Anything else simply is not the output you desire. But the problem with sinc is it has infinite support, so is not usable in practice. Filtering on a DAC is therefore a finite support approximation to the sinc filter, and introduces error. Read here [3] for more, or look at a textbook on it. [3] also explains quite clearly that in reality none of this ends up exact as you claim. Your claims are idealizations that are not met in reality. "You should read up on DAC design". Indeed. So, have the spec sheet for this perfect reconstruction DAC you claim exists? I'd like to see one. [0] https://www.youtube.com/watch?v=cIQ9IXSUzuM https://www.youtube.com/watch?v=cIQ9IXSUzuM [1] https://www.analog.com/media/en/technical-documentation/data-sheets/ad5780.pdf https://www.analog.com/media/en/technical-documentation/data... [2] https://www.analog.com/media/en/technical-documentation/application-notes/351016224an_837.pdf https://www.analog.com/media/en/technical-documentation/appl... [3] https://en.wikipedia.org/wiki/Reconstruction_filter https://en.wikipedia.org/wiki/Reconstruction_filter