Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Xiph's Episode 2: _Digital Show & Tell_ is out (Read 40204 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Xiph's Episode 2: _Digital Show & Tell_ is out

Xiph Episode 2: Digital Show & Tell is out!

"The second video from Xiph.Org explores multiple facets of digital audio signals and how they really behave in the real world. Sampling, quantization, dither, band-limiting, and vintage bench equipment all in one video!"

It's a followup in a sense to the 24/192 article of last year. Other videos: http://xiph.org/video/

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #1
Congratulations to Monty and the rest of the team on an extremely slick and well-put-together presentation.

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #2
Excellent presentation, tackling miss-conceptions can only be a good thing.

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #3
Is anybody else having issue with the sound stuttering on the video? I have tried it in 360p and 720p. No other issues on the laptop.

Chrome Version 25.0.1364.97m on Windows 8 with Core 2 Duo T9300 (2.5GHz) and 4GB RAM.

Still an interesting video though

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #4
Is anybody else having issue with the sound stuttering on the video? I have tried it in 360p and 720p. No other issues on the laptop.
Chrome Version 25.0.1364.97m on Windows 8 with Core 2 Duo T9300 (2.5GHz) and 4GB RAM.


Have you tried perhaps installing Gentoo?  *ahem* Sorry, couldn't resist.

Are you trying the WebM or the Ogg?  Chrome can unfortunately be a strange beast about both formats, but I can ask if it's a known bug in that version.

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #5
ha  My gentoo days are over, the other system is FreeBSD, but I needed to get too grips with this windows 8 so i can fix others and make some pocket money.

It was the WebM that was skipping. The Ogg plays perfectly having just tried it.

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #6
ha  My gentoo days are over, the other system is FreeBSD, but I needed to get too grips with this windows 8 so i can fix others and make some pocket money.

It was with the WebM that was causing the skipping. The Ogg plays perfectly.


I have noted that irony in several versions.  I'll go look into it (though I have no idea if I'll find anything).  At least once it turned out the maxing tool was busted, so I'll check.

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #7
Beautifully done. It should be required viewing/reading.

Quote
no one ever ruined a great recording by not dithering the final master
You'd "ruin" any digital fade-outs for anyone who chose to turn up the volume to hear them better.

Cheers,
David.

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #8
I have updated the the latest beta Chrome Version 26.0.1410.12 beta-m, same issue. They are only minor audio stutters however. CPU usage is not above 25%

The downloaded 720p WebM plays fine in MPC-HC with no issue at all.

I loaded Firefox 19 .... played perfectly at 720p. CPU usage again about 25%.

I loaded Opera ...... Unwatchable at 720p...massive lagging and skipping and maxing out a CPU core is the cause of this problem.

Sorry if I am taking this thread off topic.

//edit watching http://www.youtube.com/watch?v=XSGBVzeBUbk on HTML5 enabled youtube highlights the problem greatly in 1080p.....chrome is frame laggy but watchable, firefox is perfect, and opera is again totally unwatchable. It must be my system is not powerful enough, and partly to do with the browser implimentation.

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #9
Beautifully done. It should be required viewing/reading.

Quote
no one ever ruined a great recording by not dithering the final master
You'd "ruin" any digital fade-outs for anyone who chose to turn up the volume to hear them better.

Cheers,
David.


I thought it was HA (perhaps another objectivist site) that ran a listening test that found some folks _preferred_ the undithered fades-- they liked that the fade went to black instead of noise.  I could be misremembering badly, since I went back to try to find that test and found no hint of it.  Does anyone else remember this?  It was from several years ago at least.

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #10
I thought it was HA (perhaps another objectivist site) that ran a listening test that found some folks _preferred_ the undithered fades-- they liked that the fade went to black instead of noise.  I could be misremembering badly, since I went back to try to find that test and found no hint of it.  Does anyone else remember this?  It was from several years ago at least.
I think you're correct, but like you, I can't find it. I seem to recall many people could ABX at 14-bits, a few 15-bits, and maybe one or two 16-bits.

I think it was TPDF without noise shaping. With noise shaping, I don't know if there would have been any preference, or if it would have been reversed.

Cheers,
David.

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #11
Beautifully done. It should be required viewing/reading.

Quote
no one ever ruined a great recording by not dithering the final master
You'd "ruin" any digital fade-outs for anyone who chose to turn up the volume to hear them better.

Cheers,
David.



This turning up fades to hear them better, is this a common thing to do? 


Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #13
You might miss out on hearing people giggle in the studio.


My favorite part of the second Muppets CD was hearing the studio folks in the background lose it at Sam The Eagle's performance of Titwillow.

[It ends with Sam asking, "Why are they laughing?", but they cut that part off the CD release for some reason! :-]

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #14
Is anybody else having issue with the sound stuttering on the video? I have tried it in 360p and 720p. No other issues on the laptop.

Chrome Version 25.0.1364.97m on Windows 8 with Core 2 Duo T9300 (2.5GHz) and 4GB RAM.

Still an interesting video though


FWIW no stuttering on audio or video playing 720p on movie player with a P4 ubuntu and deprecated (gnome ignores any acceleration features) video card.

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #15
This turning up fades to hear them better, is this a common thing to do? 
When I was 14, yes.  I wanted my favourite songs to last longer. It didn't work with cassettes of course (far too hissy), but it worked amazingly well with some CDs, not so well with others. You had to turn the volume back down very quickly before the next track started though, otherwise OUCH!


I cannot believe I have just admitted to this in a public forum.


On a more practical level, I do not think 16-bits is perfect if you are going to deliver full dynamic range audio, and then compress it for playback. Even then, it will rarely if ever be the limit on the noise floor. I buy the arguments for sticking with 16/44.1 - but if you were designing the system from scratch today, I don't think many would say that 20/48 was wasteful for lossless audio. It gets you properly to the limits of human hearing in all circumstances.

Cheers,
David.

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #16
Interesting to see the "not stairstep" illustrations. I was a sound engineer in toy design field and needed to compose/arrange music, sound effects and record voice dialogs for several kinds of low-end MCUs. Our customers often complained the sound quality (they don't know what is aliasing, they described the distortion as "metallic noise") but we just explained to them that the speakers (usually about 25 to 40mm diameter) were to blame. We won't tell them the truth.

I generated a sine sweep and digitized the analog output of those MCUs and found that the waveform is even worse than zero order hold, it looks like sawtooth.

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #17
Monty, that was a great video. I thoroughly enjoyed it and I really would like to see more. Normally watching all of a 20-minute Internet video feels like a chore to me, but this was really good and even my not-really-techie girlfriend liked it. You should make these more often.

Interesting to see the "not stairstep" illustrations. I was a sound engineer in toy design field and needed to compose/arrange music, sound effects and record voice dialogs for several kinds of low-end MCUs...

Sorry for the off-topic, but this is interesting to me to finally hear. I've long suspected the speakers were not really the primary reason children's toys sound so terrible, since it sounded more like very low quality digital and, weirdly enough, I'd like to hear more about the mechanics of it. It seems the sound quality hasn't gotten much better since the '90s and I've wondered why when you'd think it wouldn't be prohibitively expensive to put a decent chip in.

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #18
Thanks for your time and the excellent presentation, Monty. I've had some misconceptions about digital audio as well (especially the significance of bit-rates.) A member here recently tried to refer me to your stuff and I had no idea who you were. That video helped me out a lot.

For an engineer with your technical knowledge you certainly know how to teach people in easy-to-understand laymen's terms. I wish I had seen this video sooner. It would have saved me from some headaches due to my lack of knowledge while trying to relate to others my concerns. Sometimes others, while far more knowledgeable on such topics, are far less patient and even confrontational in their approach to helping those that are ignorant of a technical subject. I look forward to seeing more videos like this. This was a valuable video to me and I sincerely appreciate it.
The Loudness War is over. Now it's a hopeless occupation.

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #19
I'd like to hear more about the mechanics of it. It seems the sound quality hasn't gotten much better since the '90s and I've wondered why when you'd think it wouldn't be prohibitively expensive to put a decent chip in.


OK I can reveal more facts as I am not working in the toy field anymore and it is not totally off-topic. Those chips use some sorts of DPCM formats and their compression efficiency is extremely low. In order to save space we need to use multiple sample rates manually to store audio data. For example when storing the phrase "It is an apple", consonants with more high frequencies like "t" and "s" are stored in 12khz and other parts are in 8khz. When saying "It is an orange", "It is an" will be reused. When there are any silence parts more than 200ms between the phrases we need to measure then delete the silences in the wave files to save space and manually add the silences back in the MCU's IDE with some sorts of scripting languages. As you can see, I was doing what a modern lossy audio codec can do MANUALLY.

The toy field is affected by the loudness war as well. Because louder sound components are more expensive and need more battery power, we are required to compress and hard-limit the sounds to insane level, of course it will introduce more artifacts but yes, the speakers were to blame. We can also say the cabinet of the product is not acoustic-friendly (train-shaped, hamster-shaped...) therefore they produced odd-sounding harmonics...

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #20
I thought it was HA (perhaps another objectivist site) that ran a listening test that found some folks _preferred_ the undithered fades-- they liked that the fade went to black instead of noise.
Sounds like an interesting test. Did they include the third option "dithered fade back to digital black" ? A non-dithered fade can sound grainy since the distortion products are all over the spectrum. My first DAW (1990 Sonic Solutions) had an option to automatically switch off dither after the input signal stopped. The adjustable switch-off delay range was quite large, from 1 ms up to many seconds IIRC. Now you mention this, I haven't seen this option in modern DAW's.

@krabapple
Quote
This turning up fades to hear them better, is this a common thing to do?
Well, as an audio pro I have a +20dB button on my monitoring amp to make sure there are no indiscreet comments of artists left in the master
Also don't underestimate the effect of radio-style compressors (Orban Optimod e.g.). Low level signals can become much louder than intended by the mastering engineer.

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #21
To Monty and co.: I echo the earlier praise about this. I haven’t sat down to watch it yet, but the supporting materials make it look excellent, so I’m looking forward to it. I think it’ll be another valuable resource for people new to the tech and for people who know more but want a good reference to refer themselves or others to.

I'd like to hear more about the mechanics of it. It seems the sound quality hasn't gotten much better since the '90s and I've wondered why when you'd think it wouldn't be prohibitively expensive to put a decent chip in.
OK I can reveal more facts as I am not working in the toy field anymore and it is not totally off-topic. Those chips use […]
This is very interesting, so thanks for the descriptions!

Quote
The toy field is affected by the loudness war as well. […]
Oh wow!  “Will someone please think of the children!” Now we can literally use that as an argument against the LW.

 

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #22
... As you can see, I was doing what a modern lossy audio codec can do MANUALLY...

Thanks for that info. I was right, it is interesting! Manual lossy compression work and loudness wars in children's toys, I did not expect to hear that. Is it wrong to think an extra few pennies invested in hardware could have saved you quite a lot of work and ended the customer complaints? I suppose I don't actually know how much more storage would have cost, but it seems like just a little bit more would have gone a long way.

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #23
That was AWESOME. Hope to see more, can't wait to pass this along to a certain 'higher res makes more accurate waveform' friend of mine. BTW, webm streamed flawlessly to android w/chrome browser. Does this mean that horrific mess known as flash is going to die a quick, painful death?

Xiph's Episode 2: _Digital Show & Tell_ is out

Reply #24
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.

  • 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
Dynamic – the artist formerly known as DickD