<div dir="ltr">Hey! <div><br></div><div>Been a long time since I posted here. In the spirit of doing things the &quot;wrong&quot; way (which is what we&#39;re all about, right? ;) You _might_ consider architecting your app using two (or more) concurrent instances of ChucK; one with your synthesis stuff, and one doing your heavy computation. The one doing the math could be set up to have a local OSC API for sending the parameters in and your other code could just wait on the response (advancing time in the main chuck instance, while the calculations are being done elsewhere). You would have to have some structure around the communications, but there are ways to make that easier with functors (paging Michael Heuer).</div><div><br></div><div>The good thing about this is that you get to take advantage of your computer&#39;s multiple processors, since Chuck is single-threaded (last I checked). Besides, if your calculations are that intense, what&#39;s another couple of milliseconds for OSC communication? Plus, your calculations might run faster this way... maybe.<div><br></div><div>Or don&#39;t consider that because it&#39;s crazy. ;)  Fwiw, I&#39;ve definitely run into applications that required multiple Chuck instances talking to each other, although usually I&#39;m trying to use multiple sound cards simultaneously. I&#39;ve also abused named pipes in service of inter-application communications, although I really don&#39;t recommend that.</div><div><br></div><div>Best,</div><div>Mike</div><div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><span style="color:rgb(117,117,117);font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:13px;line-height:19.5px">--</span></div><div><span style="color:rgb(117,117,117);font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:13px;line-height:19.5px">Michael Clemow</span></div><div><span style="color:rgb(117,117,117);font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:13px;line-height:19.5px">he/him/his</span></div><div><div style="color:rgb(117,117,117);font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:13px;line-height:19.5px"><span>Artist</span>/Composer/<span>Sound</span> Designer</div><div style="color:rgb(117,117,117);font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:13px;line-height:19.5px"><a href="http://michaelclemow.com/" style="color:rgb(126,87,194)" target="_blank">http://michaelclemow.com</a></div><br></div></div></div></div></div></div></div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 15, 2018 at 7:39 PM Gonzalo &lt;<a href="mailto:gonzalo@dense13.com">gonzalo@dense13.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I just did a quick test putting 1::samp all over the place :), but so <br>
far no joy. But this is interesting, I&#39;ll explore it properly when I <br>
have a bit more time. If I can locate where most of the time gets used, <br>
I can focus on that. Thanks!<br>
<br>
Gonzalo<br>
<br>
On 16.08.18 01:36, Jack Atherton wrote:<br>
&gt; Hi!<br>
&gt; <br>
&gt; Shreds block when you don’t advance time. If you don’t advance time, <br>
&gt; then ChucK assumes you need all the current computation for the next <br>
&gt; audio sample. Is there a place during your long computation where you <br>
&gt; could wait one sample every so often (1::samp =&gt; now;)? For example, in <br>
&gt; the body of a loop.<br>
&gt; <br>
&gt; Jack<br>
&gt; <br>
&gt; On Wed, Aug 15, 2018 at 3:38 AM Gonzalo &lt;<a href="mailto:gonzalo@dense13.com" target="_blank">gonzalo@dense13.com</a> <br>
&gt; &lt;mailto:<a href="mailto:gonzalo@dense13.com" target="_blank">gonzalo@dense13.com</a>&gt;&gt; wrote:<br>
&gt; <br>
&gt;     Hi,<br>
&gt; <br>
&gt;     I&#39;m working on a big project (<a href="http://www.whole-play.com" rel="noreferrer" target="_blank">www.whole-play.com</a><br>
&gt;     &lt;<a href="http://www.whole-play.com" rel="noreferrer" target="_blank">http://www.whole-play.com</a>&gt;), tons of classes, tons<br>
&gt;     of calculations happening at various points. My problem is that some of<br>
&gt;     these calculations take too long, up to a few seconds. I thought if I<br>
&gt;     run them in their own shred, the main shred would be unaffected, but<br>
&gt;     it&#39;s not the case, and the music stops during those processes. Maybe<br>
&gt;     I&#39;m<br>
&gt;     doing something wrong. I can&#39;t post sample code because it&#39;s many<br>
&gt;     classes interacting, but I thought maybe someone has ideas on how to<br>
&gt;     tackle this issue?<br>
&gt; <br>
&gt;     Thanks!<br>
&gt;     Gonzalo<br>
&gt; <br>
&gt; <br>
&gt;     -- <br>
&gt;     <a href="http://dense13.com" rel="noreferrer" target="_blank">http://dense13.com</a><br>
&gt;     <a href="http://www.whole-play.com" rel="noreferrer" target="_blank">http://www.whole-play.com</a><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;     &lt;mailto:<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a>&gt;<br>
&gt;     <a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" rel="noreferrer" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <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" rel="noreferrer" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
&gt; <br>
<br>
-- <br>
<a href="http://dense13.com" rel="noreferrer" target="_blank">http://dense13.com</a><br>
<a href="http://www.whole-play.com" rel="noreferrer" target="_blank">http://www.whole-play.com</a><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" rel="noreferrer" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</blockquote></div>