Skip to main content

Topic: Sampling/Time Resolution - In search of sources (Read 9417 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
Sampling/Time Resolution - In search of sources
Greetings all,

I've been lurking on these forums for about the last year, and I finally signed up today to pick the brains of some of the more knowledgeable individuals here.

On Saturday, I'm giving an 8 minute informative speech on the essential elements of digital audio (PCM to be exact, leaving DSD out given the time limit), why it was a logical progression from analog recording and storage technology, and a brief sketch of lossy/lossless implementations of it.

My primary objective at this point is to get a rock solid source, stating that (and why) any sampling rate is able to capture a given bandlimited source with perfect time resolution (ignoring frequency response and filtering in this case, dealing only with time).  I was encouraged to touch upon this point in particular because of a presentation I found on YouTube a few months back, whose essential message was "Digital is bad because you hear the music as packets rather than as an analog waveform" and was advocating that everyone dispense with their digital media and go get a turntable and vinyls.  My intent is to disprove the "packets" notion, and this source is the closest I have seen to doing that as of now:

http://www.tonmeister.ca/main/textbook/node639.html

If anyone could supply further documentation (or their own findings/conclusions on the matter), that would be most appreciated.  Thanks! 
FLAC -2 w/ lossyWAV 1.3.0i -q X -i

  • saratoga
  • [*][*][*][*][*]
Sampling/Time Resolution - In search of sources
Reply #1
My primary objective at this point is to get a rock solid source, stating that (and why) any sampling rate is able to capture a given bandlimited source with perfect time resolution (ignoring frequency response and filtering in this case, dealing only with time).


Stop by the library, pick up any introductory DSP textbook.

  • benski
  • [*][*][*][*][*]
  • Developer
Sampling/Time Resolution - In search of sources
Reply #2
http://www.dspguide.com/ch3/3.htm

Another good topic to start looking at is "intersample overs".  Basically, that since digital audio is able to reliably reproduce data points in between samples (up to the bandwidth limit, of course), it is possible to have analog output values over 0dBFS because the inter-sample data is preserved.  This is a product of the anti-aliasing filter (ADC) and the reconstruction filter (DAC).
  • Last Edit: 04 October, 2011, 04:48:31 PM by benski

Sampling/Time Resolution - In search of sources
Reply #3
Wow, you guys are quick on the draw!  Thoroughly appreciate the swift replies, the library is actually less than a 2 mile walk from me and it's gorgeous out today so that's a great idea.

Thanks for the link, benski.  Reading through it presently.
FLAC -2 w/ lossyWAV 1.3.0i -q X -i

  • C.R.Helmrich
  • [*][*][*][*][*]
  • Developer
Sampling/Time Resolution - In search of sources
Reply #4
Was about to post the link that benski already posted  That book managed to explain to me how a DFT works.

People saying things like "Digital is bad because you hear the music as packets rather than as an analog waveform" obviously don't have a clue about digital sampling, especially about sinc interpolation. I just stumbled across the following page. Haven't tried it, but maybe it can help you visualize that, when listening to digital audio, we don't listen to packets.

demonstrations.wolfram.com/SincInterpolationForSignalReconstruction/

Chris
If I don't reply to your reply, it means I agree with you.

  • xnor
  • [*][*][*][*][*]
  • Developer
Sampling/Time Resolution - In search of sources
Reply #5
  • Last Edit: 04 October, 2011, 05:42:16 PM by xnor
"I hear it when I see it."

  • Speedskater
  • [*][*][*]
Sampling/Time Resolution - In search of sources
Reply #6
You might look through member "woodinville"  (aka j.j.) 1100 posts, as he sometimes touches on the subject.

http://www.hydrogenaudio.org/forums/index.php?showuser=18957

Some of his Power Point presentations.

http://www.aes.org/sections/pnw/ppt.htm
  • Last Edit: 04 October, 2011, 06:23:02 PM by Speedskater
Kevin Graf :: aka Speedskater

  • knutinh
  • [*][*][*][*][*]
Sampling/Time Resolution - In search of sources
Reply #7
It is called Shannon-Nyquist sampling theoreme, and says that any analog signal of bandwidth <B can be discretely recorded and recreated using a discrete-time sampler/playback device combined with hypothetically perfect (typically lowpass) filters.

Some transient, and the same transient delayed by 1e-9 seconds clearly can both be "any analog signal of bandwidth <B" if B is chosen large enough.

The sampling theoreme does not cover how to design those filters in practice, nor the effects of finite number of bits. Therefore, real-world ADC and DAC systems are only an approximation to the sampling theoreme, but measurements and listening tests indicate that they can be _really good_ approximations.

Assuming 16 perfect bits and a sin(x)/x filter, there is a finite number of "positions" that a pulse can have in-between t1=0 and t2=1/44100 seconds, but that is a large number that I dont feel like worrying about. (if it was not finite, one could "encode" an infinite amount of information - bits - into the placement of an impulse sampled by only 2 16-bit integers. Clearly that violates a bunch of information-theoretical theoremes). Then again, a sin(x)/x filter sort of assumes an infinite signal in the first place so perhaps I am just talking nonsense.

You should probably ask you audience about the effects of finite particle size in vinyl records, quantum effects in (analog) electronics, and whether they want to go down the slippery slope of "I am going to dizz technology X not based on its practical merits, but on some flawed, silly model that I developed myself because I was too lazy to spend 2 minutes on wikipedia" :-)

-k
  • Last Edit: 04 October, 2011, 08:54:37 PM by knutinh

  • Axon
  • [*][*][*][*][*]
  • Members (Donating)
Sampling/Time Resolution - In search of sources
Reply #8
All I can suggest is to read this section from the wikipedia page on the Shannon-Nyquist Theorem, and come back and ask us if you have any questions. I don't think you can make a truly ironclad argument for the theorem without essentially restating that information: understanding the Fourier transform (and convolution) is crucial, and provides a clear roadmap for how to analyze the various nonlinearities of sampling.

Note, I'm not seriously suggesting your audience would have a grasp of convolution -- what I'm saying is that, if you are considering making an ironclad proof here, you might want to consider presenting this by describing the proof by analogy, instead of discussing individual examples. (I'm worried that you'll run into some audiophile who will try to outwit you in a game of "anecdotal claims of sound quality which prove Nyquist was wrong".)

Sampling/Time Resolution - In search of sources
Reply #9
Again, many thanks for all the replies, extremely informative stuff.  The number of hits this has gotten in the time it's been up absolutely makes my jaw drop.  This doesn't happen on any other forum I actively participate in.

In light of the last two replies concerning my audience, it'd probably be prudent to note at this point that this is a basic college Public Speaking course.  My main objective is going to be capturing and holding the audience's attention on my topic; they will not (generally) have a clue about any of the technical details I'm going to be getting into, which is why I'm going for brevity and for concise information that is most effective to my end.  I may have one or two classmates ask me for further information on something (if I get massively lucky), but I highly doubt that any of them will have the expertise (or the desire) to challenge me on anything in particular.  This request for sources on this specific issue is mainly for preparedness, in case someone down the line tries to say "Well, CD isn't good enough because you only get 22.7 µs of resolution per sample; there must be information missing there."  I've seen this stuff on various audiophilia-centered forums, with other arguments coming in such as "Some instruments have rise times as low as 10 µs", yadda yadda...I'm sure you're all quite well aware of the type, so I won't go on.  ;)

All an attempt to arm myself with knowledge, especially when it is so readily available in this age.
  • Last Edit: 04 October, 2011, 10:30:46 PM by FreaqyFrequency
FLAC -2 w/ lossyWAV 1.3.0i -q X -i

  • dhromed
  • [*][*][*][*][*]
Sampling/Time Resolution - In search of sources
Reply #10
The number of hits this has gotten in the time it's been up absolutely makes my jaw drop.  This doesn't happen on any other forum I actively participate in.


HA is especially invested in providing extra cups to those mules/horses/whathaveyou who have led themselves to water and are obviously willing to drink.

  • drewfx
  • [*][*][*]
Sampling/Time Resolution - In search of sources
Reply #11
The critical piece of information to stress to "civilians" (where any mathematical explanation is likely to go either over their head, or in one ear and out the other) is this:

When the digital signal is converted back to a continuous analog wave, the stuff between the samples isn't "lost" or "averaged" or "guestimated"; it's calculated.

  • benski
  • [*][*][*][*][*]
  • Developer
Sampling/Time Resolution - In search of sources
Reply #12
The critical piece of information to stress to "civilians" (where any mathematical explanation is likely to go either over their head, or in one ear and out the other) is this:

When the digital signal is converted back to a continuous analog wave, the stuff between the samples isn't "lost" or "averaged" or "guestimated"; it's calculated.


One analogy I like to use, although it's not 100% scientifically correct.  Instead of thinking about the digital samples as "speaker position versus time", think of it as a series of pegs on a pegboard through which we will thread an analog "rope" through.  If there are nuances to the analog signal in between sample points, the pegs will be placed in positions that will force the rope to bend in such a way as to recreate that original waveform.

Sampling/Time Resolution - In search of sources
Reply #13
That is a great analogy, and analogies will be a source of reliance for me in this context.  The important thing will be to rid them of any notion that what we hear from a digital source is "pictures" or "frames" of the audio multiple times a second.  I will be stressing the function of the reconstruction filter in the DAC, to be sure.

I'm now confident that I have trustworthy sources to pull from for this issue, so the rest will be a straight shot of explaining the advantages and an abbreviated explanation of implementations of PCM today (taking mp3, AAC, WAV, FLAC and splitting those into Redbook CD, iTunes, YouTube, Spotify, Pandora, etc.), and how the coding mechanisms for the lossy codecs work.  Hopefully I have time to touch briefly on dither and noise shaping as well, as a further argument that the accuracy and precision of PCM greatly exceeds that of any analog storage medium today.

I just realized that I never included this in this thread.  This is the video which inspired me to select this topic for the class.

http://www.youtube.com/watch?v=E-0D8784zGA
  • Last Edit: 05 October, 2011, 02:04:08 PM by FreaqyFrequency
FLAC -2 w/ lossyWAV 1.3.0i -q X -i

  • db1989
  • [*][*][*][*][*]
  • Global Moderator
Sampling/Time Resolution - In search of sources
Reply #14
I, too, like that analogy—and dhromed’s!

This sounds like an interesting presentation that will clarify the issue and/or dispel myths for the audience, so I’m glad HA has helped you to find good sources, and I hope it goes well for you! recording or it didn’t happen
  • Last Edit: 05 October, 2011, 02:57:36 PM by db1989

  • DVDdoug
  • [*][*][*][*][*]
Sampling/Time Resolution - In search of sources
Reply #15
Quote
When the digital signal is converted back to a continuous analog wave, the stuff between the samples isn't "lost" or "averaged" or "guestimated"; it's calculated.
And because of the required band-limiting before sampling, there isn't much happening between samples.

  • krabapple
  • [*][*][*][*][*]
Sampling/Time Resolution - In search of sources
Reply #16
If you want to see the sorts of trainwrecks that happen when 'audiophiles' try to wrap their heads around this (and the valiant HA member we know as Axon tries to
educate them), see this:

http://www.stevehoffman.tv/forums/showthread.php?t=85436

and concurrently, an HA thread on the topic, from the same era...with some of the same players (including the guy who thinks he's improved on Shannon/Nyquist)..plus Woodinville:

http://www.hydrogenaudio.org/forums/index....showtopic=49043
  • Last Edit: 05 October, 2011, 08:45:24 PM by krabapple

  • dhromed
  • [*][*][*][*][*]
Sampling/Time Resolution - In search of sources
Reply #17
When the digital signal is converted back to a continuous analog wave, the stuff between the samples isn't "lost" or "averaged" or "guestimated"; it's calculated.


Averaging and lerping are also calculations, but no sane reconstruction filter uses them.

What must be shown, I think, is that there are advanced mathematics and calculations that can easily obtain results beyond human perception. That it's not as simple as people think, but not as magical or subjective either.

You can attempt to explain complex idea, but as long as the person think it's gibberish rather than a internally consistent but complex thing that the person doesn't yet know about, you're not really educating him. In other words, first you have to make them understand that they don't understand, then make them understand that they could understand given time, and then explain it all.

If someone comes in saying "I know nothing!", that's your cue.

  • 2Bdecided
  • [*][*][*][*][*]
  • Developer
Sampling/Time Resolution - In search of sources
Reply #18
If you want to see the sorts of trainwrecks that happen when 'audiophiles' try to wrap their heads around this (and the valiant HA member we know as Axon tries to
educate them), see this:

http://www.stevehoffman.tv/forums/showthread.php?t=85436

and concurrently, an HA thread on the topic, from the same era...with some of the same players (including the guy who thinks he's improved on Shannon/Nyquist)..plus Woodinville:

http://www.hydrogenaudio.org/forums/index....showtopic=49043
Yeah, thanks for reminding me about that thread!

  • Woodinville
  • [*][*][*][*][*]
Sampling/Time Resolution - In search of sources
Reply #19
The time resolution of a PROPERLY reconstructed PCM signal (note, if you take away the antiimaging filter the time resolution GETS WORSE!!) is approximately

1/ (2 pi fs nlevels)

for CD that is 1/( 2 pi 44100 65536).

Time reconstruction can not be perfect, because noise from quantization (by the way, also look up dithering, it's the level issue that also gets abused phenominally stupidly) creates a slight phase jitter.

This is, however, very small, i.e. on the order of 6 picoseconds give or take.

You'll also see the idea that "the sound is turned into stairsteps". This mistake comes from the fallacy that one can look at the signal before the antimaging filter and have it make sense.  Somewhere out there I have a set of graphs to reply to that. Now let me see if I can find them.



This, of course, takes some explanation. The first (top) is the sine wave that results when you have ONLY the output from the DAC taht is below FS/2.

The next line adds either 2 or 4 images, I forget which (the squiggly line) and adds them to the sine wave, giving the rather odd lookign waveform.
Third line adds more.
The last line adds the first 1000 images. Notice that the result when it is added to the original signal, is the "stairstep" people whine about.

Every bit of that 'stairstep' except the original sine wave, however, results from frequencies above half the sampling rate, showing, once again, that Shannon was right.

You are welcome to grab the plot if you like.
-----
J. D. (jj) Johnston

Sampling/Time Resolution - In search of sources
Reply #20
Thank you very much JJ, I've been following your work in particular for some time, between the thread at Skeptic back in 2005 and the Audio Myths Workshop at AES 2009.  Your level of expertise is invaluable, and I thoroughly appreciate your chiming in here.    In fact, I read the link which krabapple posted as I was making final preparations to my Powerpoint yesterday, and considered adding in the "accurate to 346 picoseconds" blurb, but as you're about to see below, it's rather lucky that I didn't attempt to do so.

I gave the speech today, and the result...well, I had to trim the fat significantly and STILL ended up four minutes over the time budget, which means that I only got to mention CD and PCM in passing, while I did still cover the fact that, in CD form, PCM represents frequencies beyond the range of human hearing, and that its dynamic range can be as high as 130 dB (I had to bend this one for the sake of leaving out technicalities; this is of course when dither and noise shaping are used properly, and only in certain bands).  My approach ended up being one focusing on the evolution of this technology (recording, manipulation, storage and playback that is) from the phonograph to PCM today.  My teacher and even a couple classmates commented that they were very impressed by my level of confidence in discussing the material, so that (kinda sorta?) made up for going over time.

No recording, sadly, but I will tell you that a good amount of the speech was based directly on the first 8 minutes or so of this video here.

http://xiph.org/video/vid1.shtml

Monty is a far more eloquent/prepared speaker than I am, so if you haven't already seen this video, it's definitely worth it.  No new information, only the fact that he summarizes so much, so neatly.

Thank you all again for your participation in this thread, I look forward to my stay here.  I'm prepared to learn a whole lot more, since I know the end of the rabbit hole is a long way down from here. 

*Edit: I had missed the 2pi function in 1/(2pi*quant. levels*fs), so I guess that figure would actually be closer to 55 picoseconds.  Either way, pretty far below the ability of any human being to distinguish a timing difference.
  • Last Edit: 08 October, 2011, 12:58:42 PM by FreaqyFrequency
FLAC -2 w/ lossyWAV 1.3.0i -q X -i

  • Woodinville
  • [*][*][*][*][*]
Sampling/Time Resolution - In search of sources
Reply #21
The time resolution of a PROPERLY reconstructed PCM signal (note, if you take away the antiimaging filter the time resolution GETS WORSE!!) is approximately

1/ (2 pi fs nlevels)

for CD that is 1/( 2 pi 44100 65536).

Time reconstruction can not be perfect, because noise from quantization (by the way, also look up dithering, it's the level issue that also gets abused phenominally stupidly) creates a slight phase jitter.

This is, however, very small, i.e. on the order of 6 picoseconds give or take.

You'll also see the idea that "the sound is turned into stairsteps". This mistake comes from the fallacy that one can look at the signal before the antimaging filter and have it make sense.  Somewhere out there I have a set of graphs to reply to that. Now let me see if I can find them.



This, of course, takes some explanation. The first (top) is the sine wave that results when you have ONLY the output from the DAC taht is below FS/2.

The next line adds either 2 or 4 images, I forget which (the squiggly line) and adds them to the sine wave, giving the rather odd lookign waveform.
Third line adds more.
The last line adds the first 1000 images. Notice that the result when it is added to the original signal, is the "stairstep" people whine about.

Every bit of that 'stairstep' except the original sine wave, however, results from frequencies above half the sampling rate, showing, once again, that Shannon was right.

You are welcome to grab the plot if you like.

Ugh, that's 6x10^-11, not 12 so it's circa 60 picoseconds.  I do math better than arithmetic, apparently.
-----
J. D. (jj) Johnston

  • Northpack
  • [*][*][*][*]
Sampling/Time Resolution - In search of sources
Reply #22
The time resolution of a PROPERLY reconstructed PCM signal (note, if you take away the antiimaging filter the time resolution GETS WORSE!!) is approximately

1/ (2 pi fs nlevels)

for CD that is 1/( 2 pi 44100 65536).

Time reconstruction can not be perfect, because noise from quantization (by the way, also look up dithering, it's the level issue that also gets abused phenominally stupidly) creates a slight phase jitter.

That's very interesting. I never realized that it actually can't be infinite as some textbooks say oversimplifying - but of course you would run into the paradox described by knutinh if it were. Another example that everything in nature and thus in our means to represent nature has to be quantized at some level.
Quote
I had missed the 2pi function in 1/(2pi*quant. levels*fs), so I guess that figure would actually be closer to 55 picoseconds. Either way, pretty far below the ability of any human being to distinguish a timing difference.

That's what you think. I bet there are some audiophiles living on a quantum time scale... oh, wait, then they couldn't claim that digital is bad because it's discrete
  • Last Edit: 09 October, 2011, 06:46:09 AM by Northpack

  • Woodinville
  • [*][*][*][*][*]
Sampling/Time Resolution - In search of sources
Reply #23
That's very interesting. I never realized that it actually can't be infinite as some textbooks say oversimplifying.


Well, consider, there is always noise, and the signal slope is not infinite, there has to be some error. Not much, maybe, but some.

Having infinite slope means having infinite frequency, and that last quantum that takes up the mass-energy of the entire universe kinda gets to be a problem, and that's still not infinite.

So, in the real world, nothing is perfect, including "nothing".
-----
J. D. (jj) Johnston

Sampling/Time Resolution - In search of sources
Reply #24
So I was flipping through some of my documents as I was working on another assignment today, and I realized that I had saved the original outline from this speech.  For anyone who is interested, here it is:

https://docs.google.com/document/d/1QmlxQ-L...jJGk6-ocak/edit

I didn't get to cover all of the points in it for the aforementioned reason that I was grossly overtime by the time I got to the end, but that was my blueprint for it.
FLAC -2 w/ lossyWAV 1.3.0i -q X -i