• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required as is 20 years of participation in forums (not all true). Come here to have fun, be ready to be teased and not take online life too seriously. We now measure and review equipment for free! Click here for details.

Time resolution of Redbook (16/44) PCM

j_j

Major Contributor
Audio Luminary
Technical Expert
Joined
Oct 10, 2017
Messages
1,054
Likes
2,016
Location
My dining room.
#1
Ok, that old BS about "only one sample time resolution" came up again elsewhere. I made the following demonstration to put the screws to that.

I generated a 10kHz sine wave at 44.1 kHz sampling rate. The matlab file is attached. I generated 128 discrete phases uniformly split over one cycle, so each new phase shift is equal to 4.41/128 sample delay, or about .7 microseconds. The routine plots the first 8, making the very obvious point that they are different. Q. (obscenity) E. D.

Note, I had to add a .txt to the filename to get ASR to load it, apparently we don't like .m files. If you want to run it under matlab or octave, you'll have to strip the .txt from the end.

the resulting plot:
evenless.jpg
 

Attachments

PaulD

Senior Member
Joined
Jul 22, 2018
Messages
449
Likes
1,251
Location
Other
#2
Ok, that old BS about "only one sample time resolution" came up again elsewhere. I made the following demonstration to put the screws to that.

I generated a 10kHz sine wave at 44.1 kHz sampling rate. The matlab file is attached. I generated 128 discrete phases uniformly split over one cycle, so each new phase shift is equal to 4.41/128 sample delay, or about .7 microseconds. The routine plots the first 8, making the very obvious point that they are different. Q. (obscenity) E. D.
Nice! :D
I'm lazier... (and not as good with Matlab!) When I hear that nonsense I point people to the 20min mark of the Monty video where he shows experimentally and in the digital and analogue domains that the rising edge of a square wave is perfectly aligned when it is between the sample points.
 

danadam

Senior Member
Joined
Jan 20, 2017
Messages
323
Likes
455
#6
I've used SoX to generate a 16/44 file with 33 impulses, where the impulse in the left channel is being shifted by about 1.4µs relative to the right channel (flac in attachment).

A bit of scripting and some imagemagick magic later you get something like below. The grey waveform is this file upsampled 16x. The highlighted area centers on zero-crossing of the right, "stationary" channel.

output.loop.gif
 

Attachments

OP
j_j

j_j

Major Contributor
Audio Luminary
Technical Expert
Joined
Oct 10, 2017
Messages
1,054
Likes
2,016
Location
My dining room.
Thread Starter #7
He's showing that a 44.1 kHz sampling rate can distinguish the same signal that is shifted in time by 0.7 microseconds, much less than the sample period, which is about 227 microseconds.
22.7, not 227!

And, I picked the number of phases to push the difference well below the ITD limits.
 

Daverz

Addicted to Fun and Learning
Joined
Mar 17, 2019
Messages
936
Likes
932
#8
22.7, not 227!
Oops, I must have computed 1/44100 * 10e6 while thinking 10**6.

And, I picked the number of phases to push the difference well below the ITD limits.
ITD = interaural time differences? In other words, RBCD can represent time differences below what humans can perceive?
 

KSTR

Major Contributor
Joined
Sep 6, 2018
Messages
1,319
Likes
2,760
Location
Berlin, Germany
#11
@j_j please put this in non engineer language.
Even though the samples are placed 22.7us apart, the reconstruction filter allows for quasi-infinite timing resolution with full preservation of the (bandlimited) waveform.

The timing resolution scales with bit depth of a signal. If you take the tiniest possible signal, one single sample with value 1 in a stream of zeros, this signal can obviously only be shifted in sample intervals but as soon as you have some reasonable signal strength the timing resolution quickly exceeds 1us.
 

audio2design

Senior Member
Joined
Nov 29, 2020
Messages
438
Likes
379
#13
When I read these articles claiming 1 sample timing accuracy it is totally infuriating! The one making the rounds last year was written by a person with their PhD, even in a somewhat science field. It was of course not peer reviewed, but being a pop scientists at some level, it got a lot of internet press, and of course the usual suspects blast it all over the non technical audio sites. Always an uphill battle and it does not need to be!


Channel to channel timing accuracy is really the measurement we want to define. That is a bit more rigorous than simple single channel timing resolution. It's a function of sample rate (bandwidth) and cross-channel SNR which is a function of the single channel and cross channel jitter on the A/D, SNR of the system, and the final bit depth and correspondingly the same on playback, all assuming the anti-alias and reconstruction filters doing not introduce channel-channel phase shift. Going totally off memory the practical accuracy is low 10's of nanoseconds. My gut feel is it should be less (relates to jitter/SNR), but there are practical implementation issues. Not just way below ITD threshold, but would represent a minuscule angle difference in sound placement.
 

Ata

Member
Joined
May 6, 2021
Messages
95
Likes
55
Location
Adelaide, Australia
#14
Thank you all for the time and effort to demonstrate the timing accuracy achievable with RBCD. I am humbled despite my Engineering and CS degrees, the theory of signals course I took at Uni has faded after 30 odd years...

With the risk of sounding like a "non-believer" subjectivist (which I am not), I would like to point out that the examples shared in this thread are somewhat simplified as compared to real music and sound, as the examples are using:

- Single sine wave, as opposed to multiple sine waves of different frequency and phase mixed up;
- Static sine wave, instead of changing frequency and phase over time;
- Large/unlimited number of samples, instead of potentially short lived sine waves (2-3 samples).

The tinkerer in me is asking what would happen if the example above is modified with the above complexities, would it still be able to retrieve the phase of each sine wave within a microsecond or so?

Furthermore, if we construct and sample such a complex signal at 44.1KHz, reconstruct and measure distortion

- What would be the level of distortion (assume inaudible);
- How would that distortion be different if sampling the same signal at higher bitrates, 2x, 4x, etc. (assume still inaudible).

Hope that makes sense from an experimentation/demonstration point of view. I would have tried myself if I knew how to.
 
Last edited:

restorer-john

Major Contributor
Joined
Mar 1, 2018
Messages
6,675
Likes
16,738
Location
Gold Coast, Queensland, Australia
#15
Thank you all for the time and effort to demonstrate the timing accuracy achievable with RBCD. I am humbled despite my Engineering and CS degrees, the theory of signals course I took at Uni has faded after 30 odd years...

With the risk of sounding like a "non-believer" subjectivist (which I am not), I would like to point out that the examples shared in this thread are somewhat simplified as compared to real music and sound, as the examples are using:

- Single sine wave, as opposed to multiple sine waves of different frequency and phase mixed up;
- Static sine wave, instead of every changing frequency and phase;
- Large/unlimited number of samples, instead of potentially short lived sine waves (2-3 samples).

The tinkerer in me is asking what would happen if the example above is modified with the above complexities, would it still be able to retrieve the phase of each sine wave within a microsecond or so?

Furthermore, if we construct and sample such a complex signal at 44.1KHz, reconstruct and measure distortion

- What would be the level of distortion (assume inaudible);
- How would that distortion be different if sampling the same signal at higher bitrates, 2x, 4x, etc. (assume still inaudible).

Hope that makes sense from an experimentation/demonstration point of view. I would have tried myself if I knew how to.
Has your post changed? I was about to reply and it seems to have shrunk somewhat...
 

Ata

Member
Joined
May 6, 2021
Messages
95
Likes
55
Location
Adelaide, Australia
#16
Has your post changed? I was about to reply and it seems to have shrunk somewhat...
It should have expanded, I hit the wrong button mid-way while typing, sorry...
 
OP
j_j

j_j

Major Contributor
Audio Luminary
Technical Expert
Joined
Oct 10, 2017
Messages
1,054
Likes
2,016
Location
My dining room.
Thread Starter #18
Remember, any real signal can be composed of a variety of sine waves, and the actual calculation of time resolution uses ***BANDWIDTH*** and not a single sine wave.

Furthermore, remember that a sine wave is only a single frequency if it's infinitely long. A single cycle of a sine wave is anything BUT one frequency.

So, a single cycle is a great example of a transient, and no, there is no assumption of infinite signals. Raising sample rate has no effect on anything UNTIL you widen the bandwidth of a signal. Furthermore, a complex signal is just a bunch of sine waves. There's no real difference here.

This is a plot of the spectrum of a single cycle of a sine wave. The middle of the first peak is the frequency defined in that cycle, however, this is one cycle of sine wave followed by many, many zeros.

Note that this single, as required by my point about bandwidth, does in fact have a truly enormous bandwidth, so capturing the phase of that single cycle is really not a problem. In other words, bandwidth, not frequency, is the issue, and one cycle of a sine wave, followed by zeros, has a truly gigantic bandwidth.

There is no problem. You need to digest a bit of fourier analysis and linear superposition is all.

onecycle.jpg
 

restorer-john

Major Contributor
Joined
Mar 1, 2018
Messages
6,675
Likes
16,738
Location
Gold Coast, Queensland, Australia
#19
A single sample at 0dBFS (Denon test disc) looks like this played on a CD player (FIR digital filtering) and captured on a DSO:

1mS per division
RIGOL Print Screen23-02-2018 10_49_37 AM.948.jpeg


100uS per division
RIGOL Print Screen23-02-2018 10_49_58 AM.403.jpeg


10uS per division
1620635487064.jpeg
 

Ata

Member
Joined
May 6, 2021
Messages
95
Likes
55
Location
Adelaide, Australia
#20
I am reasonably familiar with the case of single impulse, effects of minimum vs linear phase filtering while reconstructing, etc. My question involves a more complex scenario, let me try to formulate it a bit better.

- Let sampling frequency be Fs=44.1KHz and sampling depth be D=16 bits;
- Let there be a signal generator consisting of a large number (say, 2^12=4096) sine wave generators, with a constantly changing frequency (between, say Fs/4 and Fs/2, to make it a bit more difficult), amplitude (0 to (D/12)^2), and phase (between 0 and 360). All the sine waves are added and there is no clipping;
- We sample the output of the signal generator at Fs and apply reconstruction filter, then FFT to extract the original values of Frequency, Amplitude, and Phase, for each of the 4096 sine waves.

In the process, we end up with sequences of (frequency, amplitude, phase) at the generator input and (frequency, amplitude, phase) at the output of FFT.

Clearly there will be a difference between the input values of the signal generator and the output values after reconstruction and FFT, as there are only 16 bits of information emitted per sample, right? Will the difference reduce if we sample at 24 bits? Will the difference further reduce if we sample at 2*Fs, 4*Fs, etc.?
 

Similar threads

Top Bottom