<div dir="ltr"><div>Hey Michael! It'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'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'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'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'm triggering these "cues" from across a network, I'm trying to trade "immediate and real time" for "reliable and low-memory impact." I've definitely built applications like that with Chuck that ate all the memory before! There's no streaming from disk implemented under the hood, unless I'm mistaken.</div><div><br></div><div>Let me see how this works and I'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:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:19.5px">--</span></div><div><span style="color:rgb(117,117,117);font-family:"Helvetica Neue",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:"Helvetica Neue",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:"Helvetica Neue",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:"Helvetica Neue",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 <<a href="mailto:heuermh@gmail.com">heuermh@gmail.com</a>> 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("thingOne.ck");<br>Machine.add("thingTwo.ck");<br>Machine.add("thingThree.ck");<br>Machine.add("thingFour.ck");<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,"Helvetica Neue",Helvetica,sans-serif;color:rgb(0,0,0)"><b>From: </b></span><span style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif">mike clemow <<a href="mailto:michaelclemow@gmail.com" target="_blank">michaelclemow@gmail.com</a>><br></span></div><div style="margin:0px"><span style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif;color:rgb(0,0,0)"><b>Subject: </b></span><span style="font-family:-webkit-system-font,"Helvetica Neue",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,"Helvetica Neue",Helvetica,sans-serif;color:rgb(0,0,0)"><b>Date: </b></span><span style="font-family:-webkit-system-font,"Helvetica Neue",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,"Helvetica Neue",Helvetica,sans-serif;color:rgb(0,0,0)"><b>To: </b></span><span style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif">ChucK Users Mailing List <<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a>><br></span></div><div style="margin:0px"><span style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif;color:rgb(0,0,0)"><b>Reply-To: </b></span><span style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif">ChucK Users Mailing List <<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a>><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'm noticing clicks and pops in running audio when I do something like this:</div><div><br></div><div>Machine.add("thingOne.ck");</div><div><div>Machine.add("thingTwo.ck");</div><div></div></div><div>Machine.add("thingThree.ck");</div><div></div><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Machine.add("thingFour.ck");</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("thingOne.ck");</div><div><div>Machine.add("thingTwo.ck");</div><div></div></div><div>Machine.add("thingThree.ck");</div><div></div><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Machine.add("thingFour.ck");</div><div>me.yield();</div><div><br></div><div>significantly different than this:</div><div><br></div><div><div>Machine.add("thingOne.ck");</div><div><div>me.yield();</div><div>Machine.add("thingTwo.ck");</div><div></div></div><div>me.yield();</div><div>Machine.add("thingThree.ck");</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("thingFour.ck");</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:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:19.5px">--</span></div><div><span style="color:rgb(117,117,117);font-family:"Helvetica Neue",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:"Helvetica Neue",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:"Helvetica Neue",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:"Helvetica Neue",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>