i think the term &quot;sample accurate&quot; threw me off...<br><br>i was responding to it as &quot;sample accurate for every single sample&quot;<br><br>sample accurate every couple of measures or every couple of beats changes things a lot (making it easier)<br>
<br>-kevin<br><br><div class="gmail_quote">On Tue, Jan 27, 2009 at 6:00 PM, Robert Poor <span dir="ltr">&lt;<a href="mailto:rdpoor@gmail.com">rdpoor@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
James:<br>
<br>
I&#39;m a little confused. &nbsp;You asked if you could get sample accurate ChucK sync between two laptops. &nbsp;Yet it appears that everyone is trying to tell you how you can (or can&#39;t) pass synchronized performance data among laptops, how bandwidth and latency will get in the way, etc. &nbsp;The two problems are very different.<br>

<br>
I&#39;m assuming that you really just want to synch multiple ChucK VMs, not pass massive amounts of data.<br>
<br>
I am not a ChucK expert, but IF it is possible to slave a ChucK VM to the system clock on its local machine, then each ChucK VM will then be as closely sync&#39;d as its respective host&#39;s system clock. &nbsp; &nbsp;For sake of argument, let&#39;s assume this is true. &nbsp;[Could a ChucK expert weigh in here and say if this is possible or not?]<br>

<br>
So the problem reduces to sync&#39;ing system clocks on multiple laptops. &nbsp;In your case, you only need to synch TWO laptops, and I infer from your comment that there&#39;s a WiFi link between your laptops. &nbsp;The most prevalent synchronization protocol, NTP, ships with every machine and will get you within 1mS synchronization on a local area network.<br>

<br>
But the question on my mind: do you REALLY need sample accurate synch? &nbsp;Sound travels 34 centimeters in 1 millisecond -- you incur that kind of timing error just by moving your speaker by a foot. &nbsp;The only case where I could imagine that sample accurate synch is really important is when you are trying to divvy up a four channel sound file among two machines in which case the phase relationship among the channels is important.<br>

<br>
But in any other situation, I&#39;d invest the time in getting ChucK to slave to the system clock and simply let NTP synch multiple machines -- that part is already done.<br>
<br>
Let me know what you find.<br>
<br>
- Rob<div><div></div><div class="Wj3C7c"><br>
<br>
On 27 Jan 2009, at 17:04, Stephen Sinclair wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I don&#39;t know about ChucK&#39;s support for OSC bundles, but if you send a<br>
clock signal with explicitly timestamped OSC bundles it should be<br>
possible to find a constant delay for each receiving computer and get<br>
pretty good synchronization. &nbsp;I haven&#39;t tried this myself however. &nbsp;It<br>
would definitely be an interesting exercise.<br>
<br>
Steve<br>
<br>
<br>
On Tue, Jan 27, 2009 at 7:39 PM, kevin &lt;<a href="mailto:vacillates@gmail.com" target="_blank">vacillates@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
nobody in plork or slork is synced, which is, in my opinion, one of its<br>
stronger points. the music sounds more attached to the performers and less<br>
attached to a computer, if that makes any sense.<br>
<br>
intra-computer sample-accurate syncing over a network is difficult because<br>
neither TCP nor UDP are suited to such things. TCP guarantees packet<br>
delivery by requiring a call-back (sometimes called a handshake). if the<br>
sender does not receive a call back, it assumes that the packet was dropped<br>
and then resends info. this works for things like websites, where the<br>
request is not time-sensitive.<br>
<br>
UDP on the other hand, does NOT guarantee packet delivery, and thus expects<br>
no call back. when packets get dropped over UDP, the sender is not notified,<br>
so the sender will not resend. this is better in situations like VoIP, where<br>
a single dropped packet will not ruin the audio stream (sure, there&#39;ll be a<br>
noticeable glitch). the idea is that if you&#39;re talking to someone, you&#39;d<br>
rather hear a glitch than hear that packet arrive 5 seconds later.<br>
<br>
without modification, neither are sufficient for real-time synchronization.<br>
<br>
and even if they are, wifi bandwidth will definitely get in your way. i<br>
haven&#39;t looked at any numbers, but i&#39;d intuitively guess that wifi drops<br>
more packets than wired.<br>
<br>
<br>
<br>
On Tue, Jan 27, 2009 at 4:15 PM, &lt;<a href="mailto:james.hurlbut@utoronto.ca" target="_blank">james.hurlbut@utoronto.ca</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I see. so none of the Plork pieces are dependant on precise<br>
synchronization? I guess because I am coming from a dance music background<br>
its more critical for me that the music is running off a master clock. I was<br>
thinking that Chucks strongly timed quirkiness would enable me to send<br>
sample accurate osc messages albeit at a very high speed cost. I suppose I<br>
can try midi but was hoping for a wifi solution.<br>
<br>
Quoting dan trueman &lt;<a href="mailto:dtrueman@princeton.edu" target="_blank">dtrueman@princeton.edu</a>&gt;:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
i don&#39;t think there is any way to get sample-accurate sync via<br>
conventional networking...<br>
<br>
dt<br>
<br>
On Jan 27, 2009, at 6:51 PM, <a href="mailto:james.hurlbut@utoronto.ca" target="_blank">james.hurlbut@utoronto.ca</a> wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi, chuck newbie here. I am wondering what the best way to get sample<br>
accurate sync between two laptops. I have tried using<br>
<a href="http://music.princeton.edu/%7Edan/plork/autosocket_chuck.zip" target="_blank">http://music.princeton.edu/~dan/plork/autosocket_chuck.zip</a> but the two<br>
computers receive the 16th beats at slightly off times. I also have<br>
tried sending an osc message every sample or 100 samples but that<br>
completely bogs down the machine. Is the solution to have one machine do<br>
all the audio and another just send program changes? Thanks,<br>
<br>
James<br>
<br>
<br>
<br>
_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</blockquote>
<br>
_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</blockquote>
<br>
<br>
<br>
_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</blockquote>
<br>
<br>
_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
<br>
<br>
</blockquote>
_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</blockquote>
<br>
_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</div></div></blockquote></div><br>