Re: the time that the message was sent from scsynth
julian.rohrhuber-QYZGCWsIODmAF8UT6DzBU6xOck334EZe@public.gmane.org
| Newsgroups | gmane.comp.audio.supercollider.devel |
|---|---|
| Message-ID | <[email protected]> |
> On 01.03.2018, at 16:32, [email protected] wrote: > > On March 1, 2018 22:05:03 julian.rohrhuber-QYZGCWsIODmAF8UT6DzBU6xOck334EZe@public.gmane.org wrote: > >> The helpfile for OSCFunc says for time: >> >> "the time that the message was sent (plus the latency if the message was in a bundle)” >> >> Is the helpfile wrong or the implementation? > > AFAIK, when receiving an OSC message, you have access to the timestamp (if it's a bundle), and otherwise the message carries no information at all about the sending time. In the latter case, all you have is the time of receipt... which varies according to network jitter etc. > > AFAIK scsynth does not send send bundles back to the client. So the 'time' argument will not be reliable at millisecond scale. > > Nice try in the help file, but there seems to be a misunderstanding in the wording. You can have the time of sending only if that time is encoded in the packet, and (again AFAIK, I guess I could be wrong but I don't think so) a bundling timestamp is the only standard way of encoding the time. No timestamp, no standardized reference to the sending time. I’m still not sure if it is the helpfile. There seems to be no consistent timestamp also in other cases: OSCdef(\x, { |msg, time| [msg[3], time, time - msg[3]].postln }, "/reply"); n = NetAddr("127.0.0.1", NetAddr.langPort); // message fork { loop { 1.wait; n.sendMsg("/reply", 0, 0, thisThread.clock.elapsedBeats) } }; // bundle fork { loop { 1.wait; n.sendBundle(0.2, ["/reply", 0, 0, thisThread.clock.elapsedBeats]) } };
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE2f9AlUAPrk+1WzZZhbzp9aOW3OYFAlqYJ1UACgkQhbzp9aOW 3ObaFQ/9GYIpiMoRtaIUsvT2YYhxtkYMpvhFumd8B7hZWOzLCmVEktZSbszqKYZN YZ4K+wy4Vox4vCkxU1j/bYDMl1EQCA7i2D91AQvf3bOATcMHLYmru2Z5KNmtbEQc H/+Zp5hMMMzUf2c7HCu34ccPJH38GFayIMJSffu3GmrkrEdx0D9B8KyowG7U7MQb fQM7je8MLf6BxC5iNx0Btssp2npZjdGLYxeLIvC3VPWf2MVcjn/0dHMZe3CbKEe5 YwmCTFR4+2UYmH0+qTyYAFX3efCoV9o2FrX2zRNGydk/O0LW1P3SnkkCvlj08tw1 mjrPAKAn66G4vr/vbHLDpp7e/cAU9iVrAED0Oa4yXKZG4mBusDiy2pzg7qztrXOc m4HNEoSdb+mPs3PwdHAU1jKO08XRGhKdQyP5D0o/JAOeXXeTyYKYez07B+OH4CDG Yw0wot4oy44JvOdGPYbZDHwNHZbO1plVgHp2fe52hmdaDKxRFYZaU9ZbY94Jso+Z y2TJml7EjdvgZI1cr3uxrdr+T5YQA2lGDqtjEKbghiyXpO3Xa6HH5THqa9ai+iue QK0NKj8GqN0Pl47qySpF/svvwgx6NpKV8qO9DMWHEDEXyrx/AVM1bqmfouufl8Df 6bfIW14bH8OLqcpG3+YeJMfsOwseOooQfiZ+thd+qTBpi5dO91w= =aR00 -----END PGP SIGNATURE-----