I think this video has been beautifully and thoughtfully put together to address and explain the principles of digital reconstruction with no room for questioning any part of the methodology. The choice of all-analogue highly reputable test gear is a particularly smart way of proving the 'analogueness' of signals sampled and quantized into digital then reconstructed into the analogue domain with no chance of Nyquist-Shannon deniers to make an accusation that it's all an artifact of some flawed digital approximation to reality. To provide the software tools so that anyone can repeat the experiments independently to prove it for themselves is also in the best traditions of open scientific procedures.
It's probably worth summarizing the key points demonstrated in text, so that a search can lead people to the video:Digital Show And Tell from xiph.org - with optional subtitles in various languages
Video duration 23:52
Any titles in bold underline
are available as Chapter marks in the pull-down menu of the video.
This post has been edited by Dynamic: Mar 5 2013, 14:48
- 00:00 title and Introduction - digital stairsteps are not real and not a justified representation. This created a lot of comment in the last video, so we're going to demonstrate its truth in this video.
- 00:49 veritas ex machina - an all-analog demonstration using high grade analogue laboratory instruments
HP3325A analog signal generator (1978 era) set to generate 1000.0 Hz (1 kHz) sine wave at 1.0 volt rms (=2*sqrt(2)*1.0 volt peak to peak = 2.83 V p-p). Expressed in decibels, relative to 1 volt, that's 0 dBV.
Measured on Tektronix 2246 analogue oscilloscope (mid 1990s era) to show expected period of 0.001s = 1/(1000 Hz) and thus frequency of 1kHz. (Another of these oscilloscopes is used to display different signals later)
Measured on HP3585A Spectrum Analyzer it shows 0 dBV peak at 1.0 kHz (0.5 of a division at 2 kHz per division) a DC offset (0 kHz) at about -30 dBV and harmonic distortion from the signal generator at various integer multiples of 1kHz, each below -71.5 dBV. The resolution bandwidth and video bandwidth of the analyzer are set to 10 Hz.
- 02:43 - Add digital sampling into the signal path
A consumer-grade eMagic emi 2|6 USB1 audio device from around the year 2000 is inserted to convert analog into digital (ADC), transfer it to the ThinkPad computer then receive the digital data straight back and reconstruct it (DAC) to analog. Current equipment is about an order of magnitude (10 times or so) better in flatness, linearity, jitter, noise etc.
The Thinkpad can also displays the digital representation's signal waveform, spectrum etc and the digital-to-analog output is sent on to the Oscilloscope and Spectrum Analyzer as before.
- 03:38 - stairsteps - Let's see if the myth is true...
1.0 kHz sinusoid, 1.0 V rms straight to digital (16 bit PCM sampled at 44.1kHz like a mono CD), straight back to analog, no other steps... and compare signal that came via the digital domain and direct analog signal side by side.
Digital and analog spectrum analysis looks the same.
The digital waveform display seems to show a stairstep pattern.
And the analog output signal it exactly like the original sine wave - no stairsteps.
Hmm, maybe it's luck or too low a frequency to see. How about a high frequency nearer the Nyquist limit? Try 15 kHz (timestamp: 04:40), less than three samples per cycle.
Digital waveform now looks awful with rising and falling amplitude and nasty stairsteps. But the analog output shows a nice clean 15kHz sine wave at 1.0 Vrms
Keep going up 16, 17, 18, 19, 20 kHz. Still fine all the way to the upper limit of human hearing.
- 05:53 - no stairsteps - the analog output waveform is still perfect all the way up to 20 kHz.
No jagged edges, no amplitude dropoff, no stairsteps.
So where did the stairsteps on the ThinkPad waveform view go to?
Trick question! They were never there. Drawing a digital waveform as stairsteps was wrong to begin with. The value of a sampled function is undefined between sample points. The continuous analog counterpart of the sampled signal is the only function that continuously passes through each sample point.
The interesting bit that isn't at all obvious, it that it's a unique solution, the only curve that fits exactly, while remaining band-limited to the Nyquist frequency. So long as the original input is bandlimited, the original input is also the only possible output. If your fit curve differs even minutely from the original input, it has to contain frequency content at or beyond the Nyquist limit, thus breaking the bandlimit and isn't a valid solution.
- 07:28 - so how did everyone get confused and think there are stairsteps?
It's easy to draw, maybe - it's called a zero-order hold - and it's how some digital-to-analog converters work, especially simple ones in multimeters etc., so anyone who looks up DAC in Wikipedia will see a staircase graph pretty soon. It's also an easy-to-implement representation like fat pixels in an image editor, which really should represent point samples.
- 08:42 - bit-depth - how is the analog result still smooth, what is different?
Answer - the noise floor. Nothing else. Shows 8-bit quantized with dither alone then varying between 8 and 16 bits on the ThinkPad with the noise floor of the spectrum varying accordingly.
- 10:00 - What does this dithered quantization noise sound like?
Like analog hiss. If we use gaussian dither, then it is exactly like tape hiss. We can express analog tape hiss by the equivalent gaussian-dithered bit-depth. Compact cassettes - 9 bits in perfect conditions (5 to 6 bits more typically). Professional studio open reel tapes - at best about 13 bits with advanced noise reduction.
- 11:37 - dither
What is it, and what does it do?
Simply rounding the values to the nearest valid value would mean that the quantization noise depends partly on the input signal, so it may be inconsistent in level or cause distortion or undesired frequency peaks.
Dither is specially constructed noise that ensures the quantization error is independent of the input signal.
Example of perfect sinewave with dither at 8 bits generated on ThinkPad, seen on analog oscilloscope and spectrum analyzer, shows pure 1.0 kHz tone with uniform noise floor.
Turn off dither and quantization noise appears in sharp harmonic distortion frequency peaks higher than the dithering noise floor.
At 16 bits undithered, however, harmonic distortion is so low as to be completely inaudible. Still we can use dither (also inaudible) to eliminate it completely.
With dither off, note that that quantization noise is constant even as the signal level is decreases. Then when the signal amplitude drops below half a bit, everything suddenly quantizes to zero. In a sense, quantizing to zero is 100% distortion!
Dither eliminates this distortion too, allowing signals well below the least significant bit to still show up above our nice flat noise floor. (example 1/4 bit amplitude reappears with dither enabled).
- 14:10 - noise shaping
The noise floor doesn't have to be flat, we can choose its spectrum and redistribute the power to higher frequency areas where the ear is less sensitive. Even though dither at 16-bit is inaudible, we can boost the gain to demonstrate the difference.
- 15:07 - reduced dither amplitude
Instead of on or off, we can reduce dither power a little, trading it for a little more distortion and variability in quantization noise.
Demonstration using greatly varying (modulated) signal sine wave amplitude with modest variation in noise floor evident and distortion peaks showing through at low dither power (time 16:00). Full power dither eliminates this variation in quantization noise entirely.
Shaped dither can be used at somewhat lower power before the effects of low dither become very obvious.
- 16:49 - but for 16-bits, lack of dither shows up 100 dB below full scale. Maybe it CDs had been 14 bits, dither would be more important. At 16-bits is rarely more than an insurance policy to give considerably more dynamic range just in case.
"No one ever ruined a great recording by not dithering the final master."
- 17:20 - bandlimitation and timing
What does bandlimiting do to a square wave?
Does this match the analog output?
How is a square wave made up as a Fourier Series (a sum of sine waves)?
Demonstrating the Gibbs Effect (ripple on a bandlimited signal) and showing it matches the analog response.
Does the ripple change if you pass through the sharp cut-off lowpass filter a second time? (No - a second pass can't remove frequencies already removed).
Ripples are NOT an artifact left by anti-aliasing or anti-imaging filters that gets worse each time you pass through those filters. The ripples are just part of what a bandlimited signal is and must be.
- 20:19 - synthetically constructed square waves - still sit on the rippled reconstruction curve just directly between the ripples until you adjust the timing - a lovely graphical demonstration.
- 20:53 - timing precision
You've probably heard that the timing precision of a digital signal is the same as the sample period and can't represent anything falling between the samples, implying that impulses or fast attacks have to align with sampling times or the timing either gets mangled or the impulse just disappear.
This is false precisely because our input in bandlimited. Demonstrated by moving a bandlimited rising edge with sub-sample precision, visible on the analog oscilloscope.
- 21:57 - epilogue
All the source code for the demo tools is on xiph.org, and Wikipedia is a great source of further information and citations for relevant papers. For serious learning online courseware such as MIT Open Courseware 6.003 and 6.007