Jump to content
IGNORED

Time resolution of digital sampling


Don Hills

Recommended Posts

Hi Don - Can you put "intersample overs" in this context?

One never knows, do one? - Fats Waller

The fairest thing we can experience is the mysterious. It is the fundamental emotion which stands at the cradle of true art and true science. - Einstein

Computer, Audirvana -> optical Ethernet to Fitlet3 -> Fibbr Alpha Optical USB -> iFi NEO iDSD DAC -> Apollon Audio 1ET400A Mini (Purifi based) -> Vandersteen 3A Signature.

Link to comment

I'll try.

In the following, assume that the input to be digitised is valid, that is, contains no frequencies equal to or greater than half of the sampling frequency.

If a peak that would sample to a value greater than "digital full scale" occurs between samples, the value of that peak is accurately captured in the samples before and after that peak. To reach that peak and also be valid, the input signal before and after the peak must have a finite slope. The reconstruction filter performs the calculations to recreate that slope and there's only one correct curve that joins the slopes before and after the peak. There's a very good Benchmark paper on the subject:

https://benchmarkmedia.com/blogs/application_notes/intersample-overs-in-cd-recordings

"People hear what they see." - Doris Day

The forum would be a much better place if everyone were less convinced of how right they were.

Link to comment

There wouldn't be a problem with "intersample overs" if the people mastering the track did their job properly - trivially easy to test whether it could occur, and then just attenuate the level enough so that at the time of the reconstruction of the analogue, it's guaranteed that the maximum level is never exceeded.

 

A 'smarter' DAC could use a sledgehammer approach, and just digitally attenuate the signal by say 3dB before converting, to ensure there is never a problem ... it's a silly issue, which can be undone - but someone has to do it.

Link to comment
4 hours ago, Don Hills said:

there's only one correct curve that joins the slopes before and after the peak.

 

That's really the conceptual key to me. If you think of it in terms of the Shannon-Nyquist proof, when you've got two points (sampling at just twice or less the highest frequency of interest), there are an infinite number of curves that could include them. As soon as you add a third point (more than twice the highest frequency), there's only one curve. And that's a continuous curve, no "steps."

One never knows, do one? - Fats Waller

The fairest thing we can experience is the mysterious. It is the fundamental emotion which stands at the cradle of true art and true science. - Einstein

Computer, Audirvana -> optical Ethernet to Fitlet3 -> Fibbr Alpha Optical USB -> iFi NEO iDSD DAC -> Apollon Audio 1ET400A Mini (Purifi based) -> Vandersteen 3A Signature.

Link to comment
  • 7 months later...

It's been a long while, I almost forgot this thread existed.

 

Just wanted to get back on the concept. Nyquist Shannon theorem is a limit to infinity concept where all of your time, number of samples, bit depth etc are known to infinity. You can have it work out perfectly fine only if

 

1. You have a perfect low pass

 

2. And infinite samples, because the very fact of low passing will cause an output signal having real values for infinite time. It's the very reason sinc filter is infinite time and has both pre ring and post ring. If a signal has reached a sample value x assuming infinite bit depth at time instant t after low passing, it should have begin at -infinity slowly building up to t and then after reaching maxima it shall decay. If I take a 20khz wave and low pass it, I'll have pre and post ring at the beginning and end and somewhere at the center I'll have my maxima. Only when I have this in infinite samples and low pass, I tend to see everything in infinity, so the center where it goes to maxima also happens to have infinite time so you don't visualize the pre and post ring that happens at time = -infinity and + infinity. The actual sample at an instant is related to the samples before and after it because of this reason, and hence we convolve the sinc filter.

 

3. Infinite bit depth.

 

For point 2, we don't have infinite samples, so we need to "window" it. And windowing by itself is a compromise, and it would depend on what window you choose what compromise of spectral leakage you'll be getting.

 

Point 3, quantization issues can be somewhat mitigated by dither, if you could find the proper underlying pattern and apply proper dither. You're basically decorrelating quantization noise from the signal by making it another type of noise. (And of course you can do a second dither at dac side to try to nullify this effect if you knew what particular dither was used during sampling).

 

Now let's get into the formula, 1/(2*Pi*quantization_level*fc). Can you please tell me where exactly you got this formula from because I've searched enough and I am not able to find it. I need to see the derivation. It doesn't seem like the formula for worst case temporal resolution. I certainly don't see how an echo signal beginning 10us after original signal would be captured without modulations by Nyquist Shannon sampling at 44.1khz with finite samples.

 

Now let's assume I have a perfect low pass, infinite samples, a perfect reconstruction filter and infinite bit depth. Wouldn't the very act of low passing at 20khz during adc have stage destroyed/modulated a major chunk of this very information of echo vs orignal signal pattern. Yes you'll be able to get the time delta between the maxima points echo and original signal but the signal itself would have changed noticeably with pre/post rings.

Link to comment

Also do note in the above scenario, I haven't yet considered signals with dynamically changing amplitudes or complex wave structures. I've assumed a simple sine for my main signal, say 500hz and another sine of same frequency of lower amplitude say (1/5 of original), and delayed by about 10us. If I were to consider dynamically changing amplitudes and changing shapes, the analysis with limited number of samples would get more complicated - it would actually start to behave multi tonish, and more complicated.

Link to comment

Well if you want to capture and retrieve data through Nyquist sampling, ringing is inevitable, because you'll have to low pass anyway. Might be at 22khz, might be at 48khz, might be at 96khz for 44,96 and 192khz sample rates. But we'll have to low pass it for it to be within the bounds of the theorem. And of course, in reality we have to window the function so we can never approach the true Nyquist reconstruction but rather have different trade offs of approximations. No filter is right or wrong in this case, however I tend to love the sinc filters in ESS DACs a lot.

 

https://www.stereophile.com/content/apogee-electronics-groove-da-headphone-amplifier-measurement

This is the dac I use, of course after reducing noise on the pc lines and proper data, which does improve the sound imo (no clue how to measure though). I use Wtfplay. Notice how it tries to trace the sinc function as good as possible. Also the bandwidth is at over 50khz which I like seeing too (less potential modulation/aliasing at higher sample rate data). It sounds for the most part very natural and effortless - right things at the right place maybe not as detailed as the higher end DACs, but I've never tried those. It definitely is a huge step up from both my geek out and nx4dsd.

 

Also notice how sharp the pass/stop band transition is. That's another indication of a reconstruction filter approaching closely to Nyquist condition.

 

I have a geek out 450 gen1 which has a filter mode that has no pre ring. Just an initial shoot and then a decay. It sounds constantly slammy/loud at the expense of subtleties which I miss a lot. Needless to say, as a person who is into natural sound, I don't really enjoy it, despite it being clean otherwise. I can't enjoy the microtonal gradations of a violin, or chorus in natural form with that kind of a filter. I wouldn't even say I enjoy it for edm either since even in processed music, I tend to reach for the last inch of natural manifold that exists even after processing.

 

If I were to use something that's NOS at 44khz without any low pass filters, that would be a <<sledgehammer>>. On the other hand a NOS dac with 44.1khz with a random capacitor low pass will most likely be extremely deviated from the data sampled on the other end of errors. Heavily aliased on the other side, soft and spongy without any attack.

 

All of this is wrt data sampled through existing methods based on Nyquist Shannon theorem. If we can exit Nyquist stuff for a better predictive coding that could also be reconstructed well I'll be all over it. Till then I'll be happy with high sample rate Nyquist. The higher sample rate with a cut off at 100khz or so would have less much less pre/post ringing (it will still go to infinity,but the amplitude of the ringing will be much lower and of higher frequency).

 

Again this is ignoring the tap count, the precision of the sinc filter wrt bit depth etc. All of those could have impact in different ways, since all are potential sources of error (audible or not). I am still trying to wrap my mind around how they designed the filter for chord stuff, they seem to have taken into account something they call noise floor modulation. The filter and analog circuits basically decouple noise from intensity of signal, so it doesn't vary in intensity when the signal intensity varies. Signal correlated noise tends to be more distracting than random constant background noise imo.

 

Even if my sampled data is 16 bit, oversampling using 32 or 64bit precise sinc filter and then dithering is likely to have benefits. The theory again is limit tends to infinity. Or if you can really do a dither that completely models things without facing additional modulation during adc stage and can be inverted dac stage, then these may not be necessary.

 

Tldr: pre/post ring is inevitable for proper Nyquist reconstruction. But can be minimised, especially if you sample at higher rates (or you can try to keep it at 44khz and trade off something else). I would be happy to participate if anyone would like to propose a non-nyquist approach to audio recording, some kind of pattern capture technique. Nyquist reconstruction is just one particular way of curve fitting.

Link to comment

Hi @manueljenkin

 

I'm glad you're trying to understand this stuff again. I hesitate to spend a lot of time helping you, since the last time I tried (early April on head-fi), you disappeared to work through the Amidror paper, and never came back. Did you see that his sub Nyquest artefacts don't relate to this discussion? Did you ever fully understand the signal data I created for you, and why it answers (in an empirical way) many of your questions? 

 

A couple of quick tips:
- there are many options between perfect (= infinite correctness/zero error) and false. An interesting one is: good enough for [whatever criteria of "goodness" you set]. Infinite samples for a signal generated on earth is impossible: the signal couldn't have existed before earth existed and cannot continue after the sun goes supernova and incinerates earth. Lacking the ability to integrate from negative infinity time to positive infinity time does not render Fourier transforms useless on earth.

- Keep track of which "time" you are talking about and make sure it relates to the topic of this thread. The delta time between 2 signals (a signal and its time-delayed echo) becomes meaningless once you add the 2 signals into 1 sum, unless you retain information about the original 2. The sum alone has no delta time.

- If you vary the amplitude of a signal, you add spectral content, that doesn't exist in the original signal. If that additional spectrum lies beyond the Nyquist frequency, it is lost, but depending on the sampling rate, so is your ability to detect (hear) it.

 

A derivation of the equation is given in @Archimago 's post above.

On 2/21/2020 at 2:18 AM, Archimago said:

Don't forget Man's Troll Audio post on this:

https://troll-audio.com/articles/time-resolution-of-digital-audio/

 

 

 

Cheers, SAM

Link to comment

Thanks. I apologise for not getting back at headfi, I took my sweet time to learn quite a bit more (also I wasn't feeling good in that place for reasons people here would already know). I still don't see this particular formula covering the transient period, but rather assuming two infinitely long time signals separated by a time delta and visualizing the reconstructed data in steady state condition. If it were done in the transient period, I should be seeing pre ringings or post ringings on both the signals if it were sampled properly.

 

Yes real signals cannot have components from time -infinity to +infinity since almost all natural processes will have non linear decay at the lowest amplitudes (due to friction or viscosity effects or deeper causes) and possibly a natural windowing. Another reason why we can't rely completely on Nyquist approximation to retrieve back information of how the original wave was like. I never said fft was useless, I said it has limitations. I still use fft tools to check what has been done in the songs I'm playing and as a safety warning.

 

Varying amplitude of signal, etc are things that happen in real world scenarios. I'm merely stating why just a simple sine wave doesn't match up to a real world scenario. If I want to simulate real world sound waves, which is necessary to analyse how things perform wrt audible parameters, I am supposed to evaluate with dynamically varying amplitude.

 

Edit: Just in case you couldn't get what I mentioned as transient analysis. Say I have a sine wave X of frequency F1 and amplitude H1. And I have a sampling frequency 2*F2 with a perfect low pass at F2. F2>F1.

 

If I pass X over the low pass, it won't reach H1 instantly at time 0. It will have a few stages of finite time before it can build up to H1 amplitude. (Basically convolving sinc filter over X means pre/post ring). The article above ignores the entire transient time, which is what is most relevant to music. Music is constantly varying signal. (Unless you can restrict yourself to just constant amplitude sines, and wait till it reaches steady state. I can't).

Link to comment
12 minutes ago, manueljenkin said:

If I want to simulate real world sound waves I am supposed to try with dynamically varying amplitude.

 

I use Dirac pulses to tune (make) my filters.

Obviously Dirac does not exist in real life, but it represents the highest transients. Upsample that 16x (which is what I do - 44.1 to 705.6) and it is no Dirac any more. It becomes a more realistic transient.

 

Not sure how this would bring you further, but for me it is the base.

Lush^3-e      Lush^2      Blaxius^2.5      Ethernet^3     HDMI^2     XLR^2

XXHighEnd (developer)

Phasure NOS1 24/768 Async USB DAC (manufacturer)

Phasure Mach III Audio PC with Linear PSU (manufacturer)

Orelino & Orelo MKII Speakers (designer/supplier)

Link to comment
3 minutes ago, PeterSt said:

 

I use Dirac pulses to tune (make) my filters.

Obviously Dirac does not exist in real life, but it represents the highest transients. Upsample that 16x (which is what I do - 44.1 to 705.6) and it is no Dirac any more. It becomes a more realistic transient.

 

Not sure how this would bring you further, but for me it is the base.

Thanks. I'll look into this further. Completely new term to me. I'm still in learning phase with respect to signal processing.

Link to comment
39 minutes ago, manueljenkin said:

Thanks. I apologise for not getting back at headfi, I took my sweet time to learn quite a bit more (also I wasn't feeling good in that place for reasons people here would already know). I still don't see this particular formula covering the transient period, but rather assuming two infinitely long time signals separated by a time delta and visualizing the reconstructed data in steady state condition. If it were done in the transient period, I should be seeing pre ringings or post ringings on both the signals if it were sampled properly.

 

Yes real signals cannot have components from time -infinity to +infinity since almost all natural processes will have non linear decay at the lowest amplitudes (due to friction or viscosity effects or deeper causes) and possibly a natural windowing. Another reason why we can't rely completely on Nyquist approximation to retrieve back information of how the original wave was like. I never said fft was useless, I said it has limitations. I still use fft tools to check what has been done in the songs I'm playing and as a safety warning.

 

Varying amplitude of signal, etc are things that happen in real world scenarios. I'm merely stating why just a simple sine wave doesn't match up to a real world scenario. If I want to simulate real world sound waves, which is necessary to analyse how things perform wrt audible parameters, I am supposed to evaluate with dynamically varying amplitude.

 

Edit: Just in case you couldn't get what I mentioned as transient analysis. Say I have a sine wave X of frequency F1 and amplitude H1. And I have a sampling frequency 2*F2 with a perfect low pass at F2. F2>F1.

 

If I pass X over the low pass, it won't reach H1 instantly at time 0. It will have a few stages of finite time before it can build up to H1 amplitude. (Basically convolving sinc filter over X means pre/post ring). The article above ignores the entire transient time, which is what is most relevant to music. Music is constantly varying signal. (Unless you can restrict yourself to just constant amplitude sines, and wait till it reaches steady state. I can't).

Hmm... you have continued to post at head-fi, including this week... but whatever. No worries.

 

All tools have limitations, but it's best to complain about them only when the limitations impair accomplishing your goal. If you understand Fourier theory and sampling theory (Shannon) and Mans' blog post, you understand everything you need for this thread. I thought you might understand something important when you wrote above:

Quote

 It doesn't seem like the formula for worst case temporal resolution

The best or worst case is reflected in the formula - it is dependent on the frequency content and amplitude (number of quantization levels available) of your signal. So, 110ps is the shortest time resolution for a high(-est) frequency, high(-est) amplitude (all 16 bits) signal, aka "best case". A very low frequency, very low amplitude signal will have a considerably longer time resolution.

 

But do you care? You want to stay within the 5-10µs time accuracy, and RBCD's ability will include pretty much all music. But what about a passage or song section with very low frequency, very low amplitude signals? I guarantee (or at least I'd bet a large amount) that the  5-10µs data won't hold up. Your ability to perceive it will zoom right up also.

 

Although choice of filter, ringing due to choice of filter, and transient analysis (yes I understood what you were saying, did you?) in music are interesting, important related issues, they are not directly part of this thread's topic. This thread was started when you said in another thread:

Quote

... science studies do show humans can discern a time precision way above what a 48khz sampling rate can reliably capture (5micro seconds is what I remember, check some MIT studies and stuff).

which reflects some misunderstanding at best, and is just wrong at worst.

 

Another tip: keep theoretical ideas and real-world practical ideas correctly separated. FFT (a real-world implementation for approximating Fourier transforms) and infinity (a theoretical construct, only real in math) can exist in the same discussion only with great care.

 

...or two: transients are only of concern when they introduce frequency components that cause concern. In music, that would be rare or never.

 

Link to comment

Well I said I was out of that particular place/subthread in headfi where they claim themselves to be "audio guardians", not that I exitted headfi. I got a lot of friends from other threads where we shared information and helped each other.

 

Ooh did I mention you some leak out from that thread was constantly trying to badger me at other threads? You're trying to word yourself flowery trying to show as if I was doing something wrong at headfi, which I'm not. And I took time to reply here, because I wanted to learn it properly. I'm not coming to that one sided echo chamber.

 

The rest of your quotes/claims - you're speaking for yourself. Not for everyone. Pretty much everything I've said is related to this topic. Transients is relating to music. Voices, violins and many other instruments are low frequency content and the echoes produced by them from room reflections could start during these mid sample points, assuming the original sound zero crossed at an integral sampling point.

 

Asking to ignore something is not something I heed to. There's always a chance it can have an impact.

Link to comment
2 minutes ago, manueljenkin said:

Well I said I was out of that particular place/subthread in headfi where they claim themselves to be "audio guardians", not that I exitted headfi. I got a lot of friends from other threads where we shared information and helped each other.

 

Ooh did I mention you some leak out from that thread was constantly trying to badger me at other threads? You're trying to word yourself flowery trying to show as if I was doing something wrong at headfi, which I'm not. And I took time, because I wanted to learn it properly.

 

The rest of your quotes/claims - you're speaking for yourself. Not for everyone. Pretty much everything I've said is related to this topic. Transients is relating to music. Voices, violins and many other instruments are low frequency content and the echoes produced by them from room reflections could start during these mid sample points, assuming the original sound zero crossed at an integral sampling point.

I read your post as meaning "place" and "head-fi" as the same thing, not "particular subthread". My bad.

 

I never said transients aren't related to music... I'm sensing communication problems... I said ... well, you can read it. The topic of this thread is: "Time resolution of digital sampling", not "do transients exist in music" (they do!)

 

I also never claimed to speak for everyone, but stand by everything I said. I sense you would prefer to argue that to understand. Let me know if that changes. We're just talking past each other. I'm out, for now.

Link to comment

It is not mere arguing. It is standing up for what is "complete" or mathematically right. The title and content on the first post is misleading ignoring transient behavior of the system and saying static/steady state behavior is all that is present in a system. If the name of the thread was "time resolution of digital sampling after steady state of sinusoidal signals", I wouldn't have bothered to insert transients in here. The topic is general, so I can include transients here, and in music it makes more sense.

 

I have made comments on the technical inconsistencies on the first post mainly because I understand it, and if someone is excluding or ignoring something I do sense a reason to point it out and correct. This is an open forum and I believe I have the right to do so.

 

Regarding the other parts. It was you who first tried to invoke past conversations at headfi, worded in a way to try to demean my passion or knowledge. I do find offence in that. You could have worded the references in a different way, I wouldn't have been offended, but you chose to use this as an opportunity.

2 hours ago, SoundAndMotion said:

I hesitate to spend a lot of time helping you, since the last time I tried (early April on head-fi), you disappeared to work through the Amidror paper, and never came back. 

This was completely unnecessary.

 

Last but not the least you're trying to push your personal opinions as end all be all wrt how much one should pay attention to transients or not. Even if that wasn't your intention, your wordings just implied that. This is the equivalent of a passive agressive tone.

Link to comment

You are right that it would have been better to express my frustration in a PM, rather than a public post. My problem is that you deny or ignore facts that are inconvenient for you, or you don't understand them. That frustrates me when I try to help, and I'm sorry I express that.

 

Transients. Wow, you are stuck on transients. You think I'm ignoring them, but I'm not(!), because they are included in the Fourier + Shannon treatment of this topic. I'd be very happy to discuss why/how, but I'm not sure our communication styles allow any success. I thought when you mentioned on the other forum that you like deriving things mathematically to help you understand, we were kindred spirits. I do that too. But understanding the relationship between mathematical/theoretical and numerical simulation and real-world circuits is part of my learning journey. It doesn't have to be for everyone.

 

Let me ask a few questions. They are rhetorical; this is not a quiz. Why can/do you use an FFT, if you don't have infinite samples? What assumptions have you made? What limitations are you accepting? What's the difference between a mathematical transient and any real-world transient (e.g. in music)? Do you realize real-world transients always have a finite bandwidth? I have 20 more questions lined up.... but why? As I said, the questions are rhetorical, meant for thought not answers. If you answer these (to yourself), I hope you see I was including transients as built-in to my comments. They need not be separated as violating Fourier + Shannon, and needing special rules.

 

Good luck and have fun with your journey.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...