[PD] chronometer + metronome that syncs multiple Android/iOS devices over network?

Chris McCormick chris at mccormick.cx
Wed Mar 6 04:13:59 CET 2019


Hello Enrike,

On 6/3/19 12:18 am, enrike wrote:
> We need a chronometer that runs in sync in multiple devices at the same 
> time.

SyncJams might work for you:

https://github.com/chr15m/SyncJams

The algorithm it uses is tolerant of adverse network conditions. All 
devices run their own internal clock and the clocks converge on a 
consensus "current tick".

The algorithm is very simple: every device broadcasts its current tick 
over the network. If a device receives a tick which is higher & earlier 
than it expected it immediately resets its own clock to that new timing.

What this means in practice is the smallest (i.e. best) point-to-point 
ping time between any two participating patches is the closest that the 
clocks will get in sync. On a WiFi LAN this is generally on the order of 
1 to 3 milliseconds which is close enough for most musical applications. 
In my experience devices converge on that value quite quickly after 
joining the network.

Here's a video of Chris Rice aggressively changing the BPM from which 
the devices manage to recover after a second or two:

https://www.youtube.com/watch?v=yNvD-KQhR9k

Here are two Android devices syncing:

https://www.youtube.com/watch?v=Z5tlEZwttBM

I've been planning to revisit the project to simplify it and port to 
Supercollider etc. for some time but who knows if I'll ever get around 
to that.

Cheers,

Chris.

-- 
https://mccormick.cx/

Sign up to my newsletter to hear about tech I'm building.
https://mccormick.cx/subscribe





More information about the Pd-list mailing list