<div dir="ltr"><div>Hey Michael! It&#39;s been a minute!</div><div><br></div><div>Thanks so much for that suggestion! I took a closer look at this code and I&#39;m actually not doing Machine.add(); four times in a row, but rather spork ~ thingOne(); four times (although I do Machine.remove() four times to remove the shreds by ID). </div><div><br></div><div>I still think the thing that I forgot to do is to add me.yield(); in between each of these (or at least at the end of the four lines) to keep the running audio smooth. I&#39;m going through and trying it out. </div><div><br></div><div>Since each of these functions that are running concurrently are loading large files into SndBuf instances, I&#39;m hesitant to do the normal Chuckian thing and load it all up first and then let it play on demand using, as you suggest, a start() function or similar. Also, because I&#39;m triggering these &quot;cues&quot; from across a network, I&#39;m trying to trade &quot;immediate and real time&quot; for &quot;reliable and low-memory impact.&quot; I&#39;ve definitely built applications like that with Chuck that ate all the memory before! There&#39;s no streaming from disk implemented under the hood, unless I&#39;m mistaken.</div><div><br></div><div>Let me see how this works and I&#39;ll report back!</div><div><br></div><div>Mike</div><div><br></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 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><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><span style="color:rgb(117,117,117);font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:13px">(he/him)</span><br></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 2, 2020 at 5:07 PM Michael Heuer &lt;<a href="mailto:heuermh@gmail.com">heuermh@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Hello Mike,<div><br></div><div>Since Machine.add is hitting the file system and parsing and evaluating the ChucK scripts, it might work better to do all of that in one go when not generating sound</div><div><br></div><div>Machine.add(&quot;thingOne.ck&quot;);<br>Machine.add(&quot;thingTwo.ck&quot;);<br>Machine.add(&quot;thingThree.ck&quot;);<br>Machine.add(&quot;thingFour.ck&quot;);<br><br>And then later call methods to initialize them serially or in different shreds, something like</div><div><br></div><div>thingOne.start();</div><div>thingTwo.start();</div><div>thingThree.start();</div><div><div>thingFour.start();</div></div><div><br></div><div>spork ~ thingOne.start();</div><div><div>spork ~ thingTwo.start();</div></div><div><div>spork ~ thingThree.start();</div></div><div><div>spork ~ thingFour.start();</div></div><div><br></div><div>Hope this helps,</div><div><br></div><div>   michael</div><div><br><div><br><blockquote type="cite"><div>Begin forwarded message:</div><br><div style="margin:0px"><span style="font-family:-webkit-system-font,&quot;Helvetica Neue&quot;,Helvetica,sans-serif;color:rgb(0,0,0)"><b>From: </b></span><span style="font-family:-webkit-system-font,&quot;Helvetica Neue&quot;,Helvetica,sans-serif">mike clemow &lt;<a href="mailto:michaelclemow@gmail.com" target="_blank">michaelclemow@gmail.com</a>&gt;<br></span></div><div style="margin:0px"><span style="font-family:-webkit-system-font,&quot;Helvetica Neue&quot;,Helvetica,sans-serif;color:rgb(0,0,0)"><b>Subject: </b></span><span style="font-family:-webkit-system-font,&quot;Helvetica Neue&quot;,Helvetica,sans-serif"><b>[chuck-users] Machine.add() and me.yield()</b><br></span></div><div style="margin:0px"><span style="font-family:-webkit-system-font,&quot;Helvetica Neue&quot;,Helvetica,sans-serif;color:rgb(0,0,0)"><b>Date: </b></span><span style="font-family:-webkit-system-font,&quot;Helvetica Neue&quot;,Helvetica,sans-serif">July 2, 2020 at 3:43:51 PM CDT<br></span></div><div style="margin:0px"><span style="font-family:-webkit-system-font,&quot;Helvetica Neue&quot;,Helvetica,sans-serif;color:rgb(0,0,0)"><b>To: </b></span><span style="font-family:-webkit-system-font,&quot;Helvetica Neue&quot;,Helvetica,sans-serif">ChucK Users Mailing List &lt;<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a>&gt;<br></span></div><div style="margin:0px"><span style="font-family:-webkit-system-font,&quot;Helvetica Neue&quot;,Helvetica,sans-serif;color:rgb(0,0,0)"><b>Reply-To: </b></span><span style="font-family:-webkit-system-font,&quot;Helvetica Neue&quot;,Helvetica,sans-serif">ChucK Users Mailing List &lt;<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a>&gt;<br></span></div><br><div><div dir="ltr"><div>Greetings Chuckists,</div><div><br></div><div>Looking for validation on this before I change many, many lines of code: I&#39;m noticing clicks and pops in running audio when I do something like this:</div><div><br></div><div>Machine.add(&quot;thingOne.ck&quot;);</div><div><div>Machine.add(&quot;thingTwo.ck&quot;);</div><div></div></div><div>Machine.add(&quot;thingThree.ck&quot;);</div><div></div><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Machine.add(&quot;thingFour.ck&quot;);</div><div><br></div><div>and also with Machine.remove(idNum); four times in a row.</div><div><br></div><div>Question:</div><div><br></div><div>Is this:</div><div><br></div><div><div>Machine.add(&quot;thingOne.ck&quot;);</div><div><div>Machine.add(&quot;thingTwo.ck&quot;);</div><div></div></div><div>Machine.add(&quot;thingThree.ck&quot;);</div><div></div><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Machine.add(&quot;thingFour.ck&quot;);</div><div>me.yield();</div><div><br></div><div>significantly different than this:</div><div><br></div><div><div>Machine.add(&quot;thingOne.ck&quot;);</div><div><div>me.yield();</div><div>Machine.add(&quot;thingTwo.ck&quot;);</div><div></div></div><div>me.yield();</div><div>Machine.add(&quot;thingThree.ck&quot;);</div><div></div><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>me.yield();</div><div>Machine.add(&quot;thingFour.ck&quot;);</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div>me.yield();<br></div><div><br></div><div>???</div><div><br></div><div>The same for sporking shreds four in a row.</div><div><br></div><div>Warmly,</div><div>Mike</div><div><br></div><div></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">--</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><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><span style="color:rgb(117,117,117);font-family:&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:13px">(he/him)</span><br></div></div></div></div></div></div></div></div>
_______________________________________________<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></blockquote></div><br></div></div>_______________________________________________<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>