PDA

View Full Version : Automating Player Synchronization



nathan_h
2011-05-16, 09:09
I've got hardware and software players around the house.

I have iPeng and Squeezepad.

I have a heck of a time keeping everything in sync, even with all the manual adjustments one can make on the server side.

Are there any iOS apps that will make use of the device's mic, and listen to the output of all the out of sync players -- and send correction data to the server and get them all in sync?

This would be a killer app!

tcutting
2011-05-16, 09:19
There shouldn't be a need for your hardware players- they should remain synchronized without any external intervention. The software players are a different matter, however. There are likely too many variables in play to make this practical.

nathan_h
2011-05-16, 09:36
I'm not sure what "too many variables" means, but I count two adjustments that should be able to compensate for all the variables at a given point in time:

Player Start Delay (ms)
Player Audio Delay (ms)

It would be great for an iOS device to measure the actual output of all the devices, and adjust the two variables based on current actual conditions (ie, taking into account the end result of "too many variables").

That is, other variables can likely be compensated for with these two adjustments -- and as those other environmental factors change, if the system isn't smart enough with the settings listed below to self-correct, the user could walk around among the different zones/devices and use the iOS app again, to get things back in sync.

It wouldn't be a set-and-forget operation, but it would be much faster than typing in numbers into the web interface, hoping to dial things in.

---------------

Separately, there are two user-adjustable preferences about how often to address sync issues that the server detects:

Minimum Synchronization Adjustment (ms)
Network Packet Latency (ms)

For extra credit, the iOS device could allow adjustment of these -- either recommended values or something fancier.

pippin
2011-05-16, 10:18
at a given point in time:


That's true but of no use.
The playback timing on most computers is not deterministic so if you find the correct compensation parameter at any given point in time it can be wrong at any other point in time and that may even be a second later.

If you play audio e.g. on Windows and you find that it will come out of your speaker with half a second delay that delay may be completely different for the next frame yout are playing.

nathan_h
2011-05-16, 11:02
That's true but of no use.
The playback timing on most computers is not deterministic so if you find the correct compensation parameter at any given point in time it can be wrong at any other point in time and that may even be a second later.

If you play audio e.g. on Windows and you find that it will come out of your speaker with half a second delay that delay may be completely different for the next frame yout are playing.

"next frame"? How long is a frame? Even if I had to run the app every time I start up whole house audio (as opposed to listening in a single room) it would save me loads of time and frustration.

pippin
2011-05-16, 11:22
"next frame"? How long is a frame?

a few ms, depending on your sample rate.
The problem is that most computer audio drivers keep internal buffers from which they play and you can't know how long it will actually take from the moment you queue something up til the moment it's being played.

aubuti
2011-05-16, 11:30
Even if I had to run the app every time I start up whole house audio (as opposed to listening in a single room) it would save me loads of time and frustration.
A much simpler way to save your time and frustration would be to replace your software players with hardware SBs. It costs something up front, but then you're all set.

nathan_h
2011-05-16, 11:40
a few ms, depending on your sample rate.
The problem is that most computer audio drivers keep internal buffers from which they play and you can't know how long it will actually take from the moment you queue something up til the moment it's being played.

This is why I was thinking at app that actually listens to what is being played would be ideal: The buffer, latency, etc, would all be present in that real life measurement. Kind of like how our ears can hear it -- but can't tell me whether is 7rms or 750 ms. :)

nathan_h
2011-05-16, 11:48
A much simpler way to save your time and frustration would be to replace your software players with hardware SBs. It costs something up front, but then you're all set.

Yep, I agree. I thought: Hey cool, if there isn't such a utility yet, I could create one. And then I thought: How many other people would want such a thing? And if I'm just creating it for myself, isn't it much cheaper to buy hardware than to try to chase an app solution....

So I totally agree.

Looks like that extra SB Receiver I was going to sell may get hooked into my computer speakers aux port....

And I'll have to find a good deal on a Radio+battery, for carrying around the house to places I haven't wired, instead of using the built in client in Squeezepad.

pippin
2011-05-16, 13:09
This is why I was thinking at app that actually listens to what is being played would be ideal: The buffer, latency, etc, would all be present in that real life measurement. Kind of like how our ears can hear it -- but can't tell me whether is 7rms or 750 ms. :)

Umm... not so easy:
1. You have different time bases between your iOS device, server and players.
2. You've got some transmission and processing time, which is also non-deterministic
3. You have some delay due to the different range to the speakers, for a 10m distance this is 1/30th of a second, so indeed significant.
4. You still don't know which one of your players is in front and which one is behind.

Judging from the Inguz plugin, which does this for room correction but only for a single room, static environment and the processing requirements it has I don't believe all of this is feasible.

nathan_h
2011-05-16, 13:11
Fair enough. :)

bluegaspode
2011-05-16, 13:25
Squeezeboxes and iOS playback shouldn't be getting out of sync.

These devices know fairly exact where they are in the playback stream and report that to the server. The server also measures the network latency so can accomodate for that as well.

So the only real delays (in my opinion) can come from the software players like SoftSqueeze/SqueezePlay/SqueezeSlave who don't know the audio latency of their own playback chain.
Also if you have some extra gear on the audio outs of your Squeezebox there might be an extra delay, but this should be fairly constant (at least when using analog outs) for any extra device?

nathan_h
2011-05-16, 13:30
That's good to know. Maybe I need to do a one time adjustment to the settings on the server related to the Squeezepad? Is that usually necessary?

bluegaspode
2011-05-16, 14:06
That's good to know. Maybe I need to do a one time adjustment to the settings on the server related to the Squeezepad? Is that usually necessary?

Not in my experience.
Due to it's large audio buffer SqueezePad needs a bit longer until it gets into sync though, so songs might be off in the first 30 seconds of the first song of a playlist.

nathan_h
2011-05-16, 14:44
Okay, I'll give it another shot and let it play for a while :)

nathan_h
2011-05-16, 14:55
Alas: After two songs, still not synced.

Should we move this to the squeezepad thread?

bluegaspode
2011-05-16, 16:01
How many boxes do you try to sync? What kind of Squeezeboxes? What server version?
Did you try in pairs first to see who does sync and who not?
You try to sync local music and not internet streams?

My iPad syncs fine against Receiver or Radio, but I never tried three at once.

nathan_h
2011-05-16, 16:22
Hi, it is:

One (sometimes two but that is rare) squeezebox receiver, and
One squeezebox classic, and
One Boom

The Boom and Classic are close enough I can hear both at once.

To simplify I am comparing the ipad and the boom.

Maybe i should turn everything off except the ipad and boom? That's not a real world uae for me but might be good data?

bluegaspode
2011-05-16, 20:56
Yep, always start small then grow big. :-)

nathan_h
2011-05-16, 21:46
I will try. Thanks.

nathan_h
2011-05-17, 06:34
Okay, success!

I started playing JUST on the Boom. Then started streaming on the iPad.

Got in sync very quickly. Added the SB Classic. Still in sync with the Boom.

Excellent. Thanks for the help.

I guess I won't be using Softsqueeze but everything else can stay in sync which is great.