Author Topic: Excellent description of digital audio data handling  (Read 867 times)

Brad Johnson

  • friend
  • Senior Member
  • ***
  • Posts: 18,030
  • Witty, charming, handsome, and completely insane.
Excellent description of digital audio data handling
« on: December 01, 2020, 12:54:51 PM »
*Edited to use the link Nick1911 posted below.*

https://www.youtube.com/watch?v=pWjdWCePgvA

Brad
« Last Edit: December 02, 2020, 04:08:42 PM by Brad Johnson »
It's all about the pancakes, people.
"And he thought cops wouldn't chase... a STOLEN DONUT TRUCK???? That would be like Willie Nelson ignoring a pickup full of weed."
-HankB

zahc

  • friend
  • Senior Member
  • ***
  • Posts: 5,791
Re: Excellent description of digital audio data handling
« Reply #1 on: December 01, 2020, 02:17:11 PM »
It's good on explaining how PCM audio works, but completely wrong (as usual) about the Shannon-Nyquist theorem.

I checked out technically as soon as he said "all we have to know is how high of a frequency humans can hear, and then we can determine how high of a frequency we need to sample". This is the standard fallacy, and it's so wrong it's not even wrong. Really, sometimes I wish they never formulated the Shannon-Nyquist theorem, because I think it causes more damage by people who think they know what it means, than it does actually help.
Maybe a rare occurence, but then you only have to get murdered once to ruin your whole day.
--Tallpine

Nick1911

  • Administrator
  • Senior Member
  • *****
  • Posts: 8,486
Re: Excellent description of digital audio data handling
« Reply #2 on: December 01, 2020, 02:41:15 PM »
What do you think of Technology Connections take on Shannon-Nyquist?  https://www.youtube.com/watch?v=pWjdWCePgvA

Brad Johnson

  • friend
  • Senior Member
  • ***
  • Posts: 18,030
  • Witty, charming, handsome, and completely insane.
Re: Excellent description of digital audio data handling
« Reply #3 on: December 01, 2020, 02:48:23 PM »
It's good on explaining how PCM audio works, but completely wrong (as usual) about the Shannon-Nyquist theorem.

I checked out technically as soon as he said "all we have to know is how high of a frequency humans can hear, and then we can determine how high of a frequency we need to sample". This is the standard fallacy, and it's so wrong it's not even wrong. Really, sometimes I wish they never formulated the Shannon-Nyquist theorem, because I think it causes more damage by people who think they know what it means, than it does actually help.

Okay, so it was inaccurately referred to as the Shannon-Nyquist theorem rather than the correct Nyquist Interval (or Nyquist rate). Big deal. Yes, it's over-simplified and he used the wrong reference, but it serves the presentation's purpose of a layperson-friendly explanation of critical sampling intervals and their place in the audio data process.

Brad
« Last Edit: December 01, 2020, 03:16:00 PM by Brad Johnson »
It's all about the pancakes, people.
"And he thought cops wouldn't chase... a STOLEN DONUT TRUCK???? That would be like Willie Nelson ignoring a pickup full of weed."
-HankB

Nick1911

  • Administrator
  • Senior Member
  • *****
  • Posts: 8,486
Re: Excellent description of digital audio data handling
« Reply #4 on: December 01, 2020, 03:37:50 PM »
Okay, so it was inaccurately referred to as the Shannon-Nyquist theorem rather than the correct Nyquist Interval (or Nyquist rate). Big deal. Yes, it's over-simplified and he used the wrong reference, but it serves the presentation's purpose of a layperson-friendly explanation of critical sampling intervals and their place in the audio data process.

Brad

Counterpoint: If you're getting information from a source, and they say something incorrect about a topic you know in some depth - you should be immediately skeptical about anything else they say which you don't know much about.

Good advice for listening to anyone - news, politicians, blogs, youtube, whatever.  Hear them talk about something you know a lot about to judge their credibility.

zahc

  • friend
  • Senior Member
  • ***
  • Posts: 5,791
Re: Excellent description of digital audio data handling
« Reply #5 on: December 01, 2020, 03:40:21 PM »
Okay, so it was inaccurately referred to as the Shannon-Nyquist theorem rather than the correct Nyquist Interval (or Nyquist rate). Big deal. Aside from the incorrect reference, the info is sound and serves the presentation's purpose of explaining how critical sampling intervals are integral to the audio data process.

Brad

No, actually I was wrong about the name. The video was actually just totally wrong about everything except the basic description of how PCM audio is encoded. All the electrical engineering parts and perceptual audio parts were beyond wrong. I wish he had posted a description of delta-sigma encoding to go along with it, that would have been cool.

Parts that were wrong: everything basically, but where to start...

The idea that our ability to hear up to a certain frequency is directly related to determining the ideal or acceptable audio sampling rate, in the first place, but also that the Shannon interval has anything to do with it if it were. That very idea is not-even-wrong and you can safely ignore anyone who starts out with that argument. In reality, a playback system needs to produce frequencies up to no more than 20kHz, this much is true, but that has very little to do with determining the sampling rate for recording or storage or processing of the digital audio signal for many reasons, not least of which leads directly to...

Considering sampling rate and bit depth independently, when actually they are completely dependent on each other when it comes to signal sampling and reproduction. So you can't talk about how much bit depth or sampling rate is "enough" by itself. In practice most consumer DACs (and probably most DACs period) are 1-bit DACs running at several MHz. That's because 1 bit is enough, if you have enough sampling rate. But 400kHz is NOT enough frequency at 1 bit, even though 400kHz is 20 times the "nyquist" rate, hopefully illustrating how wrong the idea is of basing the sampling rate on the frequency to be played back using some nyquist interval argument. In reality, this is not a valid application of the nyquist rate, and the supposed nyquist rate may be drastic overkill, or drastic underkill, or anywhere in between, based on other components of the system. Phillips engineers chose 44.1kHz just because they repurposed cheap video hardware.

The idea that the bandwidth of a signal has some relationship to the maximum frequency of the signal--wrong. Radio literally wouldn't work if this were true. Also, this is approximately why mp3-type compression works...the information bandwidth of a signal has only an indirect relationship to the frequencies contained in the signal. That's how come mp3's can be 1/10 the file size while sounding the same.

That the maximum frequency of audio is 20kHz and frequencies above that don't matter because they are ultrasound--totally wrong on an engineering level. There are sound synthesizers that work entirely on ultrasound sources. All of the audible output consists of mixtures of the ultrasound sources. Filtering out ultrasound in this case would result in total silence! Oops.

Also he is FOS about being able to tell that FLAC sounds better. Mp3 and other lossy codecs are tested for audio transparency, and have healthy margins. Most people really can't tell 64kbps...really they can't, they do blind testing all the time. But the standard is 256kbps just for gratuitous overkill, and you can always go higher if you want even more overkill, while still saving a ton of storage space.

The author thinks you are an "audio fool" for using 24bit PCM because "nobody can hear the difference" (whatever that means) but in the same breath he thinks you are smart for encoding your music collection in FLAC and dragging around 590% more data that you literally cannot hear, and we are supposed to believe both things at the same time.




« Last Edit: December 01, 2020, 03:55:50 PM by zahc »
Maybe a rare occurence, but then you only have to get murdered once to ruin your whole day.
--Tallpine

Brad Johnson

  • friend
  • Senior Member
  • ***
  • Posts: 18,030
  • Witty, charming, handsome, and completely insane.
Re: Excellent description of digital audio data handling
« Reply #6 on: December 02, 2020, 04:08:01 PM »
No need to go nuclear. Jeez...

20k hz is the accepted general upper limit for human hearing. That's basic audiology. The Shannon interval is one of the foundational elements of Shannon-Nyquist which established baselines for sampling standards which allow audio reproduction indistinguishable (in terms of human perception) from the source material. That's science history. Combine the two and you get the guy's statement of how maximum sampling needs are determined. Is it absolutely, infallibly correct to the Nth degree? No. But it's sufficiently accurate to allow the technology which allows us humans to enjoy a quiet sonata or the latest cochlear assault from Slayer. It was also the basis used to develop the Red Book CD standards. If you feel it's been misused, misconstrued, or improperly interpreted, take it up with Kees Immick from Philips and Toshi Doi from Sony. It's their fault.

I get it. The guy's description rubs you wrong because it's way oversimplified, takes significant liberties where you feel absolute Nth-degree technical correctness is absolutely necessary, and jumps on the audiophile/audiophool bandwagon. Okay, no problem. Ignore it. I'll even edit the OP to get rid of the link. Besides, most people would enjoy the Technology Connection link that Nick posted, anyway. More a simple backgrounding with examples, and which is geared to general audiences and doesn't delve into the audiophile debate.

Brad
It's all about the pancakes, people.
"And he thought cops wouldn't chase... a STOLEN DONUT TRUCK???? That would be like Willie Nelson ignoring a pickup full of weed."
-HankB

zahc

  • friend
  • Senior Member
  • ***
  • Posts: 5,791
Re: Excellent description of digital audio data handling
« Reply #7 on: December 02, 2020, 04:52:20 PM »
The Shannon interval is one of the foundational elements of Shannon-Nyquist which established baselines for sampling standards which allow audio reproduction indistinguishable (in terms of human perception) from the source material.

Hate to break it but the Shannon interval is not being used to set the sampling rate of audio systems. Sampling rates are chosen by a bunch of other engineering considerations and Shannon interval is an afterthought, because Shannon interval is only weakly applicable in real sampling systems.

The Shannon interval is an important mathematical observation that is correct for band-limited signals. Real signals and audio in particular are never band-limited. It's ok though because IF you want to actually apply the Shannon interval concept to audio, and use it as a starting point for your design, you can make an engineering approximation of audio as a band-limited signal, and to do that you would define your frequency band such that there is "practically no" signal outside of your band. If you did that for real audio, that would be something very close to DC (maybe 5Hz) on one end. On the other end, you would consider a 1st or second order frequency filter, which attenuates at -20dB or -40dB per decade, and you would make an approximation that maybe after 100dB, then you consider there's "no" signal anymore for practical purposes, and you would use that as your upper frequency band limit. And THEN you would apply the Nyquist limit, and you would probably come up with a sampling rate of like 250kHz-500kHz. And then you would get fired because you can't make a CD player that way. You choose 44.1kHz because you have a warehouse full of video hardware that runs at 44.1kHz. That's all. The Shannon limit is really not involved in the decision.
Maybe a rare occurence, but then you only have to get murdered once to ruin your whole day.
--Tallpine

Brad Johnson

  • friend
  • Senior Member
  • ***
  • Posts: 18,030
  • Witty, charming, handsome, and completely insane.
Re: Excellent description of digital audio data handling
« Reply #8 on: September 07, 2021, 11:52:57 AM »
I'll just leave these here.

What is the Optimal Sampling Rate for Audio? (Filmmaker IQ, John Hess)
https://youtu.be/bg6bOVShU-w

D/A and A/D: Digital Show and Tell (Monty Montgomery)
https://youtu.be/cIQ9IXSUzuM

Brad

*clicks Post and ducks for cover...*
« Last Edit: September 07, 2021, 12:41:51 PM by Brad Johnson »
It's all about the pancakes, people.
"And he thought cops wouldn't chase... a STOLEN DONUT TRUCK???? That would be like Willie Nelson ignoring a pickup full of weed."
-HankB

Doggy Daddy

  • Poobah
  • friend
  • Senior Member
  • ***
  • Posts: 5,330
  • From the saner side of Las Vegas
Re: Excellent description of digital audio data handling
« Reply #9 on: September 07, 2021, 12:37:32 PM »

I'll just leave these here.

Filmmaker IQ (John Hess)
https://youtu.be/bg6bOVShU-w

D/A and A/D: Digital Show and Tell (Monty Montgomery)
https://youtu.be/cIQ9IXSUzuM

Brad

*clicks Post and ducks for cover...*
And down the rabbit hole we go!  (Thanks!)
Would you exchange
a walk-on part in a war
for a lead role in a cage?
-P.F.