[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] osc bundle timestamps



Scott wrote:
The lang doesn't know the time on the server. If the server is on a
separate machine, clock sync issues can be pretty critical, because
the assumption is that absolute time is the same on both. (Try
setting the time on the server to 1s later than the the client -
you'll get tons of late messages, until you set the latency to about
1s - then it works perfectly).

I see. Isn't there more than one clock in todays machines? In my sequencer I use clock_gettime(CLOCK_REALTIME,&result), and I see scsynth uses gettimeofday(), is this guaranteed to be the same? According to http://juliusdavies.ca/posix_clocks/clock_realtime_linux_faq.html that seems to be the case...

This seems like somewhat of an outstanding problem for SC when
working with multiple machines... the easiest empirical solution is
to make sure the time on the server machine is => the time on the
lang machine - then, generate a huge stream of events (simulate high
osc message load) and lower the latency until you start to get late
messages. Obviously, that's going to be the lowest possible latency,
regardless of differences in clock time. This doesn't solve keeping
clocks synced over time, or syncing between more than two machines.

I guess this is a common problem with OSC between machines. Someone should make a really smart app that periodically sync the machines, correcting for network lag, etc.. :)


- Scott


On Dec 14, 2009, at 12:34 PM, Jonatan Liljedahl wrote:

Hi, I'm new on the lists and new to supercollider as well, and I
have a question regarding timestamping of OSC bundles.

Is the timestamp in absolute time, according to the OSC spec? If
so, how does the sclang know the current time in the server? For
example, s.makeBundle(0.5,...) makes a timestamp 0.5 seconds from
"now", but how does sclang know when "now" is for the server?

I'm interested to understand how this works both for a local server
running on the same machine (where one solution might be to use the
same clock-mechanism in the machine) and a remote server on another
machine.

The reason I'm asking this is because I want to create my own SC
client that talks to the server directly (an algorithmic graphical
score editor), and I need accurate timing.

/Jonatan http://kymatica.com

_______________________________________________ sc-dev mailing list


info (subscription, etc.):
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml archive: https://listarc.bham.ac.uk/marchives/sc-dev/ search:
https://listarc.bham.ac.uk/lists/sc-dev/search/



_______________________________________________ sc-dev mailing list

info (subscription, etc.):
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml archive:
https://listarc.bham.ac.uk/marchives/sc-dev/ search:
https://listarc.bham.ac.uk/lists/sc-dev/search/


_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/