Hi Rogan,<br><br>&gt; Here&#39;s a question I have -- if they are both based on the same system<br>&gt; clock, will the two instances of chuck stay in sync, time-wise?<br><br>i think this becomes an OS dependent question, but the answer should theoretically be yes. since each instance will stay in sync with itself, and they both stay in sync to a reference sample rate, there shouldn&#39;t be any drift. if each instance is playing a loop of the same length at the same sample rate, the loops should stay in the same phase relation.<br>
<br>but, interrupts happen, processors time slice, and sometimes you have to wait for i/o (depending on your application in ChucK). it&#39;d be a really fun experiment to collect the sample stream in real time for each and measure the drift on samples and then look at the drift it has on seconds..<br>
<br>
since we&#39;re on the topic of parallel, has any effort or thought gone
into porting the back end of ChucK to a GPGPU like CUDA? The high end
ones are expensive, but have 240 cores. fortunately, they made the
coding style scalable so that the same code will compile for both a GPU
with 24 cores and a GPU with 240 cores (and every available number of
cores in between). getting the data to the soundcard shouldn&#39;t be too
difficult, but probably not trivial.<br><br>best,<br>kevin<br><br><br><div class="gmail_quote">On Sat, Feb 7, 2009 at 9:34 AM, Rogan Carr <span dir="ltr">&lt;<a href="mailto:rogan.carr@gmail.com" target="_blank">rogan.carr@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;">
Hi Graham,<br>
<br>
The only drawback that I can see is that the OS will need to use one<br>
of the cores from time to time, so you shouldn&#39;t be able to max out<br>
both 100% of the time. &nbsp;But if you&#39;re not doing much communication<br>
with the outside world other than through your soundcard, you<br>
shouldn&#39;t really see a performance hit, I don&#39;t think. &nbsp;I&#39;ve seen in<br>
some multicore supercomputers that you can only run on like 7 of 8<br>
cores per node, because you need the last core to manage system calls<br>
and inter-node communications. &nbsp;That said, I don&#39;t think that there&#39;s<br>
such a heavy demand on communications on a two-core stand-alone box<br>
that you would see an effect.<br>
<br>
<br>
<br>
Cheers,<br>
<font color="#888888">Rogan<br>
</font><div><div></div><div><br>
On Sat, Feb 7, 2009 at 5:39 AM, Graham Percival<br>
&lt;<a href="mailto:graham@percival-music.ca" target="_blank">graham@percival-music.ca</a>&gt; wrote:<br>
&gt; Hi all,<br>
&gt;<br>
&gt; We&#39;re using ChucK as a cheap synthesizer for a bunch of new<br>
&gt; electronic instruments. &nbsp;To make best use of the dual-core CPU,<br>
&gt; we&#39;re launching ChucK in two separate threads:<br>
&gt;<br>
&gt; $ chuck <a href="http://first-server.ck" target="_blank">first-server.ck</a> &amp;<br>
&gt; $ chuck <a href="http://second-server.ck" target="_blank">second-server.ck</a><br>
&gt;<br>
&gt; This works great (it almost maxes out both cores on a mac mini),<br>
&gt; although the second instance of chuck complains that it can&#39;t bind<br>
&gt; to port 8888.<br>
&gt;<br>
&gt; Are there any potential pitfalls to this method? &nbsp;I know that we<br>
&gt; can&#39;t (easily[1]) get any communication between these two chuck<br>
&gt; instances, but in this case we don&#39;t need it -- each instrument&#39;s<br>
&gt; synthesis is completely independant of the other one. &nbsp;In CS<br>
&gt; terms, this problem is &quot;embarrasingly parallel&quot;. &nbsp;:)<br>
&gt;<br>
&gt;<br>
&gt; [1] we could add code to our OSC servers to send messages back and<br>
&gt; forth via loopback, which isn&#39;t precisely &quot;hard&quot;, but it&#39;s not as<br>
&gt; easy as everything else we do in ChucK -- this language is<br>
&gt; awesome. &nbsp;:)<br>
&gt;<br>
&gt; Cheers,<br>
&gt; - Graham Percival<br>
&gt; _______________________________________________<br>
&gt; chuck-users mailing list<br>
&gt; <a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
&gt; <a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
&gt;<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>