• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

The Truth About HiFi Network Devices

venquessa

Member
Joined
Feb 6, 2023
Messages
59
Likes
66
These samples are somewhere 'inbetween' the samples of the receiver sample clock.

No. They aren't "in between". You are moving the reference clock remember. You get to decide where "now" is.

If I record a 48K wave file and give it to you and you play it at 48.001kHz. It will sound slightly higher pitched, but a tiny fraction of a percent and far beyond any tuning tolerances of any instrument.... and it will play in a slightly shorter time. 0.00000.... whatever %.

All the samples are the same. Nothing is interpolated.

If you are going UP in sample rate, you can interpolate with a LPF. If you want going DOWN sample rate you can anti-alias. But like for like, there is no "in between".

EDIT: What I think you may be confusing is a full Digital to Analog back to Digital resample, which to be honest is just ... why would you go through the two most lossful and distortion/noise inducing steps when you don't have to?

An analogue.

A composer sets a challenge of writing music with a 120bpm tempo. He gives it to an orchestra and asks them to play it for him at 120bpm. Now because the conductor is human and not totally precise the orchestra may be playing at 121bpm sometimes and 119 other times. Over the full performance the length of the composition might change by a few seconds or a few minutes. It does not detract from the performance and it's unlikely even the composer noticed.

If however you took two orchestras and gave them the same music, the same rate, 120bpm and put them in two concert halls beside each other. The two orchestra's would not stay in sync. Their timing would drift forward and back or one might play the whole set slightly faster and finish 5 minutes early.

If the composer was feeding the conductor sheets of music at exactly 120bpm and the orchestra played at 121bpm, the conductor would run out of music.

If you want the two orchestras to play in sync, you need to do other things to bring them into sync. Either artificially in post (like in the real world), or by using synchroniser lights of even hand signals. There are examples of VERY large multi band drum offs and the science behind how the syncing actually works is pretty amazing.
 

Hayabusa

Addicted to Fun and Learning
Joined
Oct 12, 2019
Messages
787
Likes
518
Location
Abu Dhabi
No. They aren't "in between". You are moving the reference clock remember. You get to decide where "now" is.
Your sound cards sample clock is determining where your now is.
 

Hayabusa

Addicted to Fun and Learning
Joined
Oct 12, 2019
Messages
787
Likes
518
Location
Abu Dhabi
1675869901038.png


This is how a 11.25 KHz sinewave looks like if you skip 4 samples per second.
Amir is using such signals to make these nice jitter plots..
 

venquessa

Member
Joined
Feb 6, 2023
Messages
59
Likes
66
Also we keep talking about sample rate. It doesn't really work like that. Nothing actually 'triggers' on a 'sample rate'. Well, you could argue the LRCLK line or frame strobe.

My point is. The exact moment a sample appears on the output is NOT determined directly from the sample rate clock. It's determined from the system clock of the digital hardware IC. That clock can be anything up to and including the CPU clock speed. Usually, for various reasons it is specifically choosen value like 24.576Mhz.

So when you are debating as to when "now" is, it's in terms of that clock, not the 48k clock. 50ppm on a 24.576Mhz clock is what you are dealing with.
 

Hayabusa

Addicted to Fun and Learning
Joined
Oct 12, 2019
Messages
787
Likes
518
Location
Abu Dhabi
Yes. It lives at 0x8000FF25 it's stereo counter-part is at that +2.

There is no sample at 0x8000FF25.5
its at +2.x where x can be any number...
 

venquessa

Member
Joined
Feb 6, 2023
Messages
59
Likes
66
This is how a 11.25 KHz looks like if you skip 4 samples per second.
Amir is using such signals to make these nice jitter plots..
I can make a graph like that too which shows whatever I want.

Doesn't mean it makes the slightest difference or that it actually applied to reality.

To make it at all useful you would need quite a lot of information to go along with it. Like the full set up of the experiment. My suspicions looking at it, is it's a fabricated DSP stream designed to show the worst possible case of 4 samples ZEROED not skipped.

its at +2.x where x can be any number...

Sorry, we are at the wrong level for that. We are in DIGITAL. There is no .5, there is no .1, memory is at interger addresses. There are no inbetweens. You can calculate an inbetween but... what would be the point in that? Why would you loop through an array of samples, lift two adjacent samples and play the average? In what world is that sane? In fact, that approach is exactly equivalent to a N+N-1 low pass filter.
 

Hayabusa

Addicted to Fun and Learning
Joined
Oct 12, 2019
Messages
787
Likes
518
Location
Abu Dhabi
I can make a graph like that too which shows whatever I want.

Doesn't mean it makes the slightest difference or that it actually applied to reality.

To make it at all useful you would need quite a lot of information to go along with it. Like the full set up of the experiment. My suspicions looking at it, is it's a fabricated DSP stream designed to show the worst possible case of 4 samples ZEROED not skipped.



Sorry, we are at the wrong level for that. We are in DIGITAL. There is no .5, there is no .1, memory is at interger addresses. There are no inbetweens. You can calculate an inbetween but... what would be the point in that? Why would you loop through an array of samples, lift two adjacent samples and play the average? In what world is that sane? In fact, that approach is exactly equivalent to a N+N-1 low pass filter.

I give up to get your knowledge up to date... Please do research ...
 

venquessa

Member
Joined
Feb 6, 2023
Messages
59
Likes
66
The reality of this... DSPs, ADCs, DACs today is that they work in some far more academic ways. Ladder dacs are way out of date. Today they do some really, really weird stuff like generate PWM duty cycles off the incoming voltage at a massively higher rate (like class D amps), then pass the PWM through a set of sigma filters decimation or convolution and stuff way outside my field of study. But most of the theory out there is from text books written in the 1970s and 80s. Things aren't done that way in modern DACs.
 

venquessa

Member
Joined
Feb 6, 2023
Messages
59
Likes
66
I give up to get your knowledge up to date... Please do research ...
Thats not how it work. You presented data. It's meaningless unless you explain what you think it shows.

Even before you go to those lengths. Post the same analysis for the control.
 

Hayabusa

Addicted to Fun and Learning
Joined
Oct 12, 2019
Messages
787
Likes
518
Location
Abu Dhabi
Thats not how it work. You presented data. It's meaningless unless you explain what you think it shows.

Even before you go to those lengths. Post the same analysis for the control.
I will make something well defined tomorrow
 

MaxwellsEq

Major Contributor
Joined
Aug 18, 2020
Messages
1,628
Likes
2,426
No. Not quite. The only difference in "live" versus "not live" is completely subjective and just a discussion about how long the buffers are.

When you start the audio hardware and give it it's bucket of bits it starts clocking out samples and reading the next ones from the bucket.

All "internet radio" is, is an HTTP web connection transferring an mp3 file. Nothing more. The "file" may be virtual, ie, another buffer, but it's just a application/octet-stream aka raw binary as far as the network is concerned. The vast majority of "Internet Radio" is just an MPA playlist file and a 200 line python or similar script to pay it out a network pipe. Literally something someone could write in an afternoon in Uni.

So the server end writes audio into a buffer at a normal audio rate. That buffer is probably several megabytes in size. At the same time, web clients are consuming from that buffer. They can all be listening at various points in the same buffer or many buffers.

When you connect to the stream the HTTP connection will start receiving data at FAR, FAR faster rate than audio and your copy of the buffer will be download a 30 seconds of audio in a few milliseconds... then it will start to play from the buffer.

The connection remains open. There are no push/pull mechanics, you already requested the file, it's already being transfered its just the rate at which packets arrive to keep filling your bucket of bits keeps occasionally popping another packet in the bucket. If the bucket runs out the audio stops and you get a "Buffering..." warning.
This is correct
 

FrantzM

Major Contributor
Forum Donor
Joined
Mar 12, 2016
Messages
4,337
Likes
7,730
No. Not quite. The only difference in "live" versus "not live" is completely subjective and just a discussion about how long the buffers are.

When you start the audio hardware and give it it's bucket of bits it starts clocking out samples and reading the next ones from the bucket.

All "internet radio" is, is an HTTP web connection transferring an mp3 file. Nothing more. The "file" may be virtual, ie, another buffer, but it's just a application/octet-stream aka raw binary as far as the network is concerned. The vast majority of "Internet Radio" is just an MPA playlist file and a 200 line python or similar script to pay it out a network pipe. Literally something someone could write in an afternoon in Uni.

So the server end writes audio into a buffer at a normal audio rate. That buffer is probably several megabytes in size. At the same time, web clients are consuming from that buffer. They can all be listening at various points in the same buffer or many buffers.

When you connect to the stream the HTTP connection will start receiving data at FAR, FAR faster rate than audio and your copy of the buffer will be download a 30 seconds of audio in a few milliseconds... then it will start to play from the buffer.

The connection remains open. There are no push/pull mechanics, you already requested the file, it's already being transfered its just the rate at which packets arrive to keep filling your bucket of bits keeps occasionally popping another packet in the bucket. If the bucket runs out the audio stops and you get a "Buffering..." warning.

This is correct
+1

Peace.
 

MaxwellsEq

Major Contributor
Joined
Aug 18, 2020
Messages
1,628
Likes
2,426
Nope! The radio station has at some point a digital stream of its audio at a certain sample rate. Lets say say 48000 Hz with a accuracy of lets say 50ppm, so the actual sample rate could be 48002 Hz.. Lets take your example: encode in mp3 frames at 192kbit/sec 1152 samples per frame 23.999 msec. If someone at the other end receives this at this rate and plays it for instance at 48000Hz minus 50 ppm -> 47998Hz, at some point in time your buffer will run over with samples. You have to do the sample rate conversion from 48002 to 47998 Hz. Its even worse: the sending side can slowly change its clock at its not perfectly stable. Indeed you can play a long time at the wrong rate if your buffer is large enough, but at some point in time you have to take action. A 1024 sample buffer would overflow in 256 seconds in the example above.
Edit: In this case I mean a real live radio station...
This isn't how it works. I've been involved in several generations of massively popular live radio services over the Internet.
 

Hayabusa

Addicted to Fun and Learning
Joined
Oct 12, 2019
Messages
787
Likes
518
Location
Abu Dhabi
This isn't how it works. I've been involved in several generations of massively popular live radio services over the Internet.
I did not say this is how it works in the bad implementations that skip/zero samples to get away with it.
I just say that a correct implementation should have SRC when it's a true live stream.
 

Hayabusa

Addicted to Fun and Learning
Joined
Oct 12, 2019
Messages
787
Likes
518
Location
Abu Dhabi
Ditto. It’s not even close. At all.
I had higher expectations it seems? So no-one does internet radio correctly?
 

Hayabusa

Addicted to Fun and Learning
Joined
Oct 12, 2019
Messages
787
Likes
518
Location
Abu Dhabi
I can make a graph like that too which shows whatever I want.

Doesn't mean it makes the slightest difference or that it actually applied to reality.

To make it at all useful you would need quite a lot of information to go along with it. Like the full set up of the experiment. My suspicions looking at it, is it's a fabricated DSP stream designed to show the worst possible case of 4 samples ZEROED not skipped.



Sorry, we are at the wrong level for that. We are in DIGITAL. There is no .5, there is no .1, memory is at interger addresses. There are no inbetweens. You can calculate an inbetween but... what would be the point in that? Why would you loop through an array of samples, lift two adjacent samples and play the average? In what world is that sane? In fact, that approach is exactly equivalent to a N+N-1 low pass filter.
the .5 is with reference to the input sample clock.
>>lift two adjacent samples and play the average?
no its over many more samples to get correct 'sinc' filtering for the in between samples you want to interpolate.
 

JP

Major Contributor
Joined
Jul 4, 2018
Messages
2,274
Likes
2,449
Location
Brookfield, CT
I had higher expectations it seems? So no-one does internet radio correctly?

Your misunderstanding of the fundamentals is so vast I wouldn‘t even know where to start.
 

Hayabusa

Addicted to Fun and Learning
Joined
Oct 12, 2019
Messages
787
Likes
518
Location
Abu Dhabi
Your misunderstanding of the fundamentals is so vast I wouldn‘t even know where to start.
What fundamentals am I misunderstanding?
Lets try to be constructive, do you want to get to right answer here or are you giving up?

Lets be clear: its not about the transport of the data.
The fundamental problem is in the fixed data rate of a live radio station playing out a digital version of its program.
This rate is equal for ALL listeners..
The listeners are all listening at a slightly different rate ( their local D/A clock)
Then there are two choices:
1: Sample rate conversion to bridge the difference
2: buffer/sample management that once in a while inserts zeros/skips samples/buffers.

Whats wrong with this reasoning?
 
Top Bottom