Comments (5)
Just poking around @honusz Stagelinq repo and saw this:
https://github.com/honusz/StageLinq/blob/beatinfo/services/TimeSync.ts
Seems to just be a service for getting the uptime of the device?
from go-stagelinq.
Just poking around @honusz Stagelinq repo and saw this:
https://github.com/honusz/StageLinq/blob/beatinfo/services/TimeSync.ts
Seems to just be a service for getting the uptime of the device?
Oh, that was some remnant of some test exploring the service. I think I just copied beatinfo module over and was trying to get a response.
I've actually made a bit of progress with it, just haven't pushed the code up to Github.
I've been meaning to do a write-up about where I've gotten to, maybe if I get a chance tmw.
I think the service has something to do with either syncing clocks between devices, or determining latency.
When I push the proper code it will give a better idea. I'm like one step away from having it figured out, so I'm dying to get some input on it.
from go-stagelinq.
@honusz - Gotcha. Looking forward to seeing what you've discovered thus far!
from go-stagelinq.
@mhite sorry, I haven't forgotten, just been a bit busy.
It seems like the exchange of messages goes something like this:
Device sends a message,
4 bytes - message length
4 bytes - 0x1 (could either be a code for a 'request' or just the number of following 8-byte fields
8 bytes - bigint of the device's clock. Not sure it has any real value, it's just a running clock.
The software (soundswitch or timecode) replies:
4 bytes - message length
4 bytes - 0x2
8 bytes - bigint that the device sent
8 bytes - bigint timestamp that it received the message at (Unix epoch in ms)
That's it really. The software sometimes reverses this by sending a request with its epoch-in-ms time back as the first 8-byte bigint field, and the device responds with the timestamp (using its clock) of when it received the message.
I suppose the simplest utility this has is just letting the players know what latency there is between them.
I need to play around with it a bit more, but I think you can make the clock shift, like, bring the two clocks together. This might be nonsense, and just the result of some mistakes I made in some test replies.
I'm trying to strip down the JS library a bit and make a more performant experimental version, where it'll be a bit easier to experiment with new features and things that require tighter timing.
from go-stagelinq.
@honusz - No problem -- this is great information and certainly enough for me to get started poking at this, too! Thank you!
from go-stagelinq.
Related Issues (13)
- Can not compile library on Linux
- OfflineAnalyzer HOT 11
- StateMap keepalive? HOT 7
- Wiresharking to discover "Lead" track for StateMap? HOT 1
- NewStateMapConnection context support? HOT 3
- Client detects its own announcement
- Can't connect to MCX8000 HOT 1
- Dependency Dashboard
- Didn't work with two SC5000s HOT 1
- Command line interface with JSON output
- FileTransfer HOT 96
- BeatInfo HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-stagelinq.