Jump to content
IGNORED

Time resolution of digital sampling


Don Hills

Recommended Posts

1 hour ago, manueljenkin said:

One isolated instance of a 10us pause is different from a train of 10us separated ups and downs. I understand the math and I do know transients cannot be analysed the same way. Most of the math is considering steady state analysis for a train of repeating signals. If they don't repeat you enter a trade off depending upon the window methods, the widow sizes and overlaps. You don't need to hear higher order "harmonics" to hear a pause. It is just a pause.

I'm not sure we can do a conclusive comparison "through audacity", unless we set it up to asio/wasapi bit perfect and also make sure that it doesn't impart deviations in usb noise (I don't want to delve into that gremlin again lol). So that would either mean something like Wtfplay or playpcmwin or if you can afford a license or hardware, something like Peter's xxhighend, or a regenerator. We tend to hear the weakest link in the chain. And then we need to think about the reconstruction that we have been discussing about so far and preferably send a pre oversampled data to a fairly transparent dac and chain.

 

However we can certainly construct the delay in audacity or matlab or any other tool. Playback chain is what I'd be concerned about. My present gear would automatically be disqualified, but I think Peter could do it.

 

Edit: oops wrong quote. I was meaning to quote @Jud

Link to comment
57 minutes ago, PeterSt said:

@jabbr, Jonathan, think of a random (complex) wave form which can be made subject to PWM. Give it a 50% duty cycle and the sound is "off" half of the time. Any duty cycle can be applied. Also, any "depth" can be applied (the wave may not drop back to a complete zero V).

I think you're trying to mean the fact that a low passing reconstruction filter would give it a delay before dropping down to zero, and the leak is noticeably worse for transients (less during steady state, it'll just trace Gibbs phenomenon, but then music isn't steady state).

 

57 minutes ago, PeterSt said:

True, "each going back to the normal level" implies infinite frequency if the code of the synth makes the transient as how we could to it ourselves with a test signal, but the point is: that infinite rise can just be captured by analogue means (I mean, the D/A process can do it, as I showed it).

I suppose I can correct this sentence for you.  True, "each instance of going back to the normal level (each toggle from off postion, to on position)" implies infinite frequency. Is this what you meant.

 

I don't think an ideal Nyquist sampling can capture this infinite rise during steady state, since it'll low pass it anyway. However the signal we capture has transients and it does have deviations from steady state. Also we don't have an ideal sinc low pass filter during our ADC. I am guessing both these, while being a non ideal artefact wrt ideal Nyquist Shannon sampling, might have left out traces/manifolds through which you can re-work back what the original signal could have been (especially transients and pauses), if you have enough references of how they should generally be like. Will be a hectic task though. You're manually analysing and tweaking your oversampler/interpolator by using references (be it high sample rate music, or just listening and comparing with how real things sound) right?

57 minutes ago, PeterSt said:

Maybe more simplified:

Suppose I have a normal song of a couple of minutes; now each other second I silence (manipulate the file) one sample (16/44.1). Would we readily hear that ? I don't think so. Would a real time FFT show it ? Yes.

Next I silence one sample 2 times per second. Then 10 times. And so on.

 

The story about frequencies and Shannon et all won't apply, I think. But *first* apply a reconstruction like I do it. Apply a sinc filter and you probably won't see a thing of it in that real time FFT. At least not in that once per second silence of one sample (it will me smeared out of the way).

 

I am pretty sure that wave forms of a synth can be composed of PWM like modulation.

I am 100% sure that my "ambient" type and other types (hip-hop) of music applies it the other way around - inject the vinyl like ticks. Often a few per second randomized (e.g. De La Soul), most often more "scratch like" (a train of such pulses).

All what's frequency in it, is the on/off rate, and further the technical sinus frequency of the steep rise and drop. Filter out the latter, and it's just gone (re-appears in your pro-rock flute which now behaves as a sax - haha).

 

 

 

 

 

You are likely trying to change the length of pause in these instances moving from 1/44100 samples. This would cause a delay of about integral multiples of 22us on the samples (not sure how much on the reconstructed waveform using sinc since things will again leak into one another during decay/attack patterns). Also the delay is in sync with sampling instant which may not cover all real world scenarios. I would suggest another method. Create a sample at 1Mhz or so with a specific pause of 10us, down sample to 44.1 and to 192. Then from these oversample back to 1Mhz and visualize the delta. Keep a count of number of pulses that we have used in the original sample. It'll get closer and closer to the real delay when the number of samples/sine pulses get higher and we use a sinc of infinite window length (limit tends to infinity, it'll match exactly).

Link to comment
44 minutes ago, manueljenkin said:

I'm not sure we can do a conclusive comparison "through audacity", unless we set it up to asio/wasapi bit perfect and also make sure that it doesn't impart deviations in usb noise (I don't want to delve into that gremlin again lol). So that would either mean something like Wtfplay or playpcmwin or if you can afford a license or hardware, something like Peter's xxhighend, or a regenerator. We tend to hear the weakest link in the chain. And then we need to think about the reconstruction that we have been discussing about so far and preferably send a pre oversampled data to a fairly transparent dac and chain.

 

However we can certainly construct the delay in audacity or matlab or any other tool. Playback chain is what I'd be concerned about. My present gear would automatically be disqualified, but I think Peter could do it.

 

Edit: oops wrong quote. I was meaning to quote @Jud

Or in simple words, you need to ensure that this pause remains a pause at the output of the dac/amp and also make sure there isn't any significant psychoacoustically competing/distracting noise in which case you're likely to focus more on that and have a false negative (masking).

Link to comment

This was all a bit hard to follow for me. I may need more coffee first. A few small remarks though;

 

1 hour ago, manueljenkin said:

However the signal we capture has transients and it does have deviations from steady state. Also we don't have an ideal sinc low pass filter during our ADC.

 

I think this relates to this (for me) confusing correction:

 

1 hour ago, manueljenkin said:
2 hours ago, PeterSt said:

True, "each going back to the normal level" implies infinite frequency if the code of the synth makes the transient as how we could to it ourselves with a test signal, but the point is: that infinite rise can just be captured by analogue means (I mean, the D/A process can do it, as I showed it).

I suppose I can correct this sentence for you.

 

You can't include any ADC here, because already there the filtering will have been applied. This is how I said "how we could do it ourselves" because music won't do it - hence, create a test signal which would be illegal for music, UNLESS ... the music comes from a synth which didn't go through DAWs etc.

So to be clear: there is nothing in my mind which thinks that any transient from e.g. a castagnette, could be improved by another means of reconstruction. It is only about synthesizers with direct transfer to the audio file.

This should not be confused with a SDM means of (D/A) reproduction which might add another step of "smear". I mean, without discussing this separately, it requires a genuine PCM DAC (as in R2R) in the first place and without any filtering means (the good old NOS/Filterless). ... Which is obviously what I use very explicitly. ... Envision that right along with the design of the DAC, the reconstruction means emerged, that to be executed in-PC so it would be manageable easily.

 

FWIW, do not forget that per reconstruction, which always comprises of upsampling, the whatever spaces go smaller. Per my means this is just like that. With an averaging kind of means (sinc) no space will remain right from the start (the original level will remain, apart from one bit value or so).

 

Something else:

Somewhere the 10us emerged, possibly from my own plots, which were analogue captures as seen through a 20Msps ADC. Silencing one sample would imply a silence of 22us if you'd ask me (44.1KHz). This will never ever remain silent after even one step of upsampling (the silent sample will have broadened to 3 samples).

So this should not be confused with the one sample of (Dirac) pulse, which occurs 10000 times per second, in my example. This gives "infinite" space* for letting the pulse remain, as long as the original has space around it for the sampling rate of the time (44.1Khz). Notice that at the broadening of the pulse, the sampling rate increases with it.

*): I feel I am wrong at this and that the width grows faster than the sampling rate increase. But it is not important.

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

I now got what you mean. What you're talking is relating to manually generated synths without much processing, but the delay levels within audible limits. And your interpolation algorithm reproduces it as intended with the right pauses.

 

I understand why you feel "recordings" could not be fixed this way. But I do think if we could record and sample the natural sounds at higher rates and not too much filtering/low passing/smearing, we could likely be able to preserve content to retrieve back realistic pauses and transients. Or maybe approach from the non uniform sampling techniques like the article I linked earlier. They seem promising. The low pass/filter would be the main bottleneck imo. I need to read a bit more there. Reconstruction of that wave can still be hard, and I doubt a Nyquist sinc low pass would work so effectively unless it's got a very high pass band in the highs in which case the transient smearing will be lower. Even then I'm not sure it could get rid of these false sinusoids. But there's tonnes more challenges in keeping electronic noise out of this sampling band on the other hand, and I doubt it'll be all to easy to realize such a system.

Link to comment
6 hours ago, PeterSt said:

Silencing one sample would imply a silence of 22us if you'd ask me (44.1KHz). This will never ever remain silent after even one step of upsampling (the silent sample will have broadened to 3 samples).

 

Thought about that, but recall we are told any Gibbs effect ringing will be silent also, so all should be quiet as a mouse, eh?

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

Ah gotcha. Finally found why I often hear mouse squeaking in my songs. Bad'ol puddy Gibbs effect.

 

images.jpeg

 

Btw, yet again we are running into steady state analysis. https://en.m.wikipedia.org/wiki/Gibbs_phenomenon

 

The very first sentence "continuously differentiable periodic function" let's you know where it's being analysed. The deviation shall be higher during transients. Bandlimiting which generally implies low passing will smear the transients more.

Link to comment
15 hours ago, Jud said:

Compare two files, one with a steady tone, the other the same but with a single missing sample at 44.1kHz sample rate. As I understand it volume may need to be reasonably high.

Like this?

sine1missing.thumb.png.97c465bd8b3f515ba5a2d45792419495.png

 

15 hours ago, PeterSt said:

Suppose I have a normal song of a couple of minutes; now each other second I silence (manipulate the file) one sample (16/44.1).

Like this?

musiclongmissing.thumb.png.122ae03398781e84cbb1232853994352.png

 

If yes then:

15 hours ago, Jud said:

Can you tell which file contains the missing sample?

Yes, listen sine0missing.flac vs sine1missing.flac

 

15 hours ago, PeterSt said:

Would we readily hear that ?

Depending on the definition of "readily", but yes, listen musiclong.flac vs musiclongmissing.flac (it is 15 seconds long instead of minutes, but should be enough for an example)

 

Assuming that is what you both wanted, what is this test supposed to illustrate?

Link to comment
16 hours ago, PeterSt said:

@jabbr, Jonathan, think of a random (complex) wave form which can be made subject to PWM. Give it a 50% duty cycle and the sound is "off" half of the time. Any duty cycle can be applied. Also, any "depth" can be applied (the wave may not drop back to a complete zero V).

 

Peter it is a mathematical fact that *any* time dependent signal of arbitrary complexity can be represented in frequency space. The transform between time and frequency domain is of course known as the Fourier transform. 

 

Dirac knew this ;)

 

So obviously any impulse response may also be represented in the frequency domain. 

 

This is math.

Custom room treatments for headphone users.

Link to comment
24 minutes ago, jabbr said:

 

Peter it is a mathematical fact that *any* time dependent signal of arbitrary complexity can be represented in frequency space. The transform between time and frequency domain is of course known as the Fourier transform. 

 

Dirac knew this ;)

 

So obviously any impulse response may also be represented in the frequency domain. 

 

This is math.

 

But it isn't necessarily how the ear-brain does signal processing, is that correct?

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
4 minutes ago, Jud said:

 

But it isn't necessarily how the ear-brain does signal processing, is that correct?

Of course not. 

 

My point, simply is that if gaps of 10 usec are audible, then it implies that frequencies > 22 Khz are audible.

 

You simply cannot reasonably state that human hearing is bandlimited to 22 kHz (or whatever) and also maintain that samples "between" 44 kHz have any effect on audibility.

 

Nyquist is so misunderstood. It is simply math.

Custom room treatments for headphone users.

Link to comment
3 minutes ago, jabbr said:

Of course not. 

 

My point, simply is that if gaps of 10 usec are audible, then it implies that frequencies > 22 Khz are audible.

 

You simply cannot reasonably state that human hearing is bandlimited to 22 kHz (or whatever) and also maintain that samples "between" 44 kHz have any effect on audibility.

 

Nyquist is so misunderstood. It is simply math.

 

I've done some reading that seems to indicate reasonably reliable sources (a Handbook of Acoustics was mentioned - doesn't sound radical, though of course it doesn't have to be correct) state a missing sample would be audible as a "tic."

 

Recall also that a single sample impulse is said to contain all frequencies.

 

So we have to be a little careful about translating between the two.

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
5 minutes ago, Jud said:

 

I've done some reading that seems to indicate reasonably reliable sources (a Handbook of Acoustics was mentioned - doesn't sound radical, though of course it doesn't have to be correct) state a missing sample would be audible as a "tic."

 

Recall also that a single sample impulse is said to contain all frequencies.

 

Right! The signal isn't bandwidth limited!!!

 

What do you think happens to the impulse when the low-pass filter is applied?

 

5 minutes ago, Jud said:

 

So we have to be a little careful about translating between the two.

 

No, really folks have to understand Nyquist. Its not wrong. Its math.

Custom room treatments for headphone users.

Link to comment
44 minutes ago, jabbr said:

 

Right! The signal isn't bandwidth limited!!!

 

What do you think happens to the impulse when the low-pass filter is applied?

 

https://src.infinitewave.ca

 

What happens when a low-pass filter is applied to a file with a sample missing?

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
1 hour ago, Jud said:

've done some reading that seems to indicate reasonably reliable sources (a Handbook of Acoustics was mentioned - doesn't sound radical, though of course it doesn't have to be correct) state a missing sample would be audible as a "tic."

 

Recall also that a single sample impulse is said to contain all frequencies.

11 minutes ago, Jud said:

 

https://src.infinitewave.ca

 

What happens when a low-pass filter is applied to a file with a sample missing?

 

Right!

 

Let me try a better angle to explain this.

 

In the case of a "missing sample", this isn't a sampled signal anymore, the digitized signal has been digitally modified. It now contains new frequencies. So let's stick to signals that have been properly digitized...

 

The Dirac impulse contains an infinite number of frequencies. 

 

An actual impulse will be low pass filtered prior to digitization .... the impulse of course gets "blurred". It is a mathematical fact that the "sharpness" of the impulse depends on the bandwidth of the low pass filter.

 

***If this filtered impulse sounds different to you than an unfiltered impulse either one of two things:

 

1) the filter is affecting the audible frequencies

2) the low pass filter is removing frequencies which are audible

 

***

 

You can't maintain that the impulse isn't sharp enough and also maintain that your hearing is bandwidth limited. The only way you can sharpen the impulse is by adding back higher frequency harmonics.

 

Custom room treatments for headphone users.

Link to comment
4 hours ago, jabbr said:

 

Peter it is a mathematical fact that *any* time dependent signal of arbitrary complexity can be represented in frequency space. The transform between time and frequency domain is of course known as the Fourier transform. 

 

Dirac knew this ;)

 

So obviously any impulse response may also be represented in the frequency domain. 

 

This is math.

Accusing people of misunderstanding math when you're looking at a wrong window isn't helping anyone. It really depends on who you think is misunderstanding Nyquist. Yes human hearing is not Bandlimited to 22khz, and I never said that sentence considering the fact that we can hear 10us pauses. I only was arguing on definition of "ultrasonics". Those 10us pauses themselves don't correspond to any particular frequency on their own i.e. I can't assign a single pause some arbitrary frequency. It is not periodic, it is one instance. I certainly can't hear a 30khz sine, let alone a 50khz. Pause is different, it relates to how your mind works with the math of the signal it received. This is why I want you to come out of thinking everything as "frequency" decomposable.


When a function is not periodic we try to chop it and visualize how it would have behaved if it were periodic that's all. And chopping can never be perfect (unless limit tends to infinity) and overlap, windowing, etc will play a role in how the visualization looks. It's simply futile in our cases of pauses or transients.

 

You forgot another "fact". "Functions that are localized in the time domain have Fourier transforms that are spread out across the frequency domain and vice versa, a phenomenon known as the uncertainty principle". Look further on it/Gabor uncertainty. For a transient or non periodic signal, if you change the window period, the fft spectrum will change. You cannot assign a particular frequency to the points inside this window period. If you need to do that you'll need to get the window down to limit tends to 0 condition where you'll no longer be able to discriminate frequency of it. The overlaps in window give how smooth the transitions of the signal is. For steady state sinusoids you can reliably estimate the frequency once you have atleast the minimum required samples and either align the sampling points properly or have proper window functions. The variation/uncertainty in frequency at different configurations will be minimal. Not so for transients and non periodic signals.


And people misunderstand Nyquist Shannon and extend everything said about steady state analysis to transient analysis. <<Sigh>>

Link to comment
2 hours ago, jabbr said:

 

Right!

 

Let me try a better angle to explain this.

 

In the case of a "missing sample", this isn't a sampled signal anymore, the digitized signal has been digitally modified. It now contains new frequencies. So let's stick to signals that have been properly digitized...

 

The Dirac impulse contains an infinite number of frequencies. 

 

An actual impulse will be low pass filtered prior to digitization .... the impulse of course gets "blurred". It is a mathematical fact that the "sharpness" of the impulse depends on the bandwidth of the low pass filter.

 

***If this filtered impulse sounds different to you than an unfiltered impulse either one of two things:

 

1) the filter is affecting the audible frequencies

2) the low pass filter is removing frequencies which are audible

 

***

 

You can't maintain that the impulse isn't sharp enough and also maintain that your hearing is bandwidth limited. The only way you can sharpen the impulse is by adding back higher frequency harmonics.

 

Please add point 3

 

3. It is smearing transient behavior in an audible way.

Link to comment
35 minutes ago, manueljenkin said:

You forgot another "fact". "Functions that are localized in the time domain have Fourier transforms that are spread out across the frequency domain and vice versa, a phenomenon known as the uncertainty principle". Look further on it/Gabor uncertainty

I provided a link to that article a couple of posts back.

 

How a Digital Audio file sounds, or a Digital Video file looks, is governed to a large extent by the Power Supply area. All that Identical Checksums gives is the possibility of REGENERATING the file to close to that of the original file.

PROFILE UPDATED 13-11-2020

Link to comment
2 hours ago, sandyk said:

Not sure if this is the same test, I'm adding here for reference. : https://physicsworld.com/a/human-hearing-is-highly-nonlinear/

 

And since this thread began with the context of 10us timing precision, I guess I should link a reference for that too : https://web.mit.edu/2.972/www/reports/ear/ear.html . Should be able to find full papers on the same, but I'm not sure if all of them are open, some claiming upto 5us precision. Dr. Milind N. Kunchur has a paper.

Link to comment
49 minutes ago, manueljenkin said:

Please add point 3

 

3. It is smearing transient behavior in an audible way.


This is the same thing as saying that humans can hear signals which are comprised on frequencies >22kHz. 
 

Do you get that?

Custom room treatments for headphone users.

Link to comment
27 minutes ago, jabbr said:


This is the same thing as saying that humans can hear signals which are comprised on frequencies >22kHz. 
 

Do you get that?

It is not the same. You cannot relate 5khz sine having slowed down transients in its first pulse due to a low pass (sinc is a low pass), to a 22khz+ sinusoid. It is just transients, I'd rather leave it there, and wouldn't think much about binding it to a frequency.

 

This is somewhat of a semantics issue, arising from trying to evaluate human hearing limits only in terms of frequency bounds, without considering the non linearities in hearing that tend to also have noticeably better time precision performance than our general 20khz sines would tell us. Humans cannot hear 30khz+ steady state sines. Humans can hear timing precision of orders exceeding the time period of 20khz sines.

 

This is partly relating to the inherent nature of frequency vs time compromises. With transients I'll stick to analysing it's waveform over time with its asdr envelope. Frequency decomposition doesn't seem all that well defined for these scenarios.

Link to comment

Jonathan, I really wonder weather you're reading all the posts. 🤪

 

8 hours ago, jabbr said:

 

In the case of a "missing sample", this isn't a sampled signal anymore, the digitized signal has been digitally modified.

 

This testifies of a Not, IMHO. The whole thing is about how synthesizers operate, were it about real-life examples. And this is not about real-life sampling. Haha.

It is explicitly NOT about a sampled signal hence no ADC is in order.

OK ?

 

The deeper subject at hand is not about Shannon/Nyquist being right or wong; it is about when it exactly applies and when it can't (and not even when it shouldn't - in all your given poses it should !).

 

Quote

So let's stick to signals that have been properly digitized...

 

So we already did.

However, we were talking about how such a thing as On/Off would look like. Now I could make you a file from one of my synths, but we can also manipulate an existing file in the same fashion (this is a controlled virtual test).

 

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
8 hours ago, jabbr said:

 

You can't maintain that the impulse isn't sharp enough and also maintain that your hearing is bandwidth limited. The only way you can sharpen the impulse is by adding back higher frequency harmonics.

 

Let's not care about our bandwidth limited hearing (I started that myself). Let's care about your explanation of the plots I showed (again, it looks like you never saw them).

What we perceive of what I showed is an other matter for now.

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

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...