Skip to content

Working with local timing source #11

@balintlaczko

Description

@balintlaczko

Hi!

First of all, thanks for this great-great project! I am able to synchronize lots of different videos with MCorp.mediaSync and a "cloud-based" shared motion, with acceptable deviation in sync. The project is about synchronizing video scores for musicians (where the video scores contain audio click-tracks with all kinds of cues as well), so when I say "acceptable" it is in the sense of musical synchrony, for less time-sensitive purposes it's perfect.

For the final performance, I need to synchronize those videos with an audio file played back from the host computer (in Max). So the position of that audio file should be the "motion" for all the clients. Here is the way I am doing it:

  • creating a local websocket server in Node (in Max)
  • connecting to that with all my clients
  • each client initializes a local TimingObject to itself
  • I am updating all those client-side TimingObject-s with vectors (f.ex. {position: 12.345, velocity: 1}) from the Node server. The server is embedded in a Max patch, and gets the position values from the playback of the audio file.

This so far seems to work OK, though I still have to test if it adds some latency or any other kind of instability to the mix. What I am a bit concerned about is that the API docs say that the .update() method should not be used too frequently, and I am doing it on a rate of 10Hz or higher... The side effect of this is a constant heavy artifact in some browsers (typically on mobile, desktops seem to be fine) which implement variable playback rate. (If I set the MCorp.mediaSync to mode: 'skip' I get almost constant skipping...)

My hunch tells me that this is not the way I should be doing this (it kinda works, but I don't want those nasty audio artifacts..). Do you have any suggestions how I could improve or change this method?

Thanks a lot!
Balint

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions