Hello Mike, 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 Machine.add("thingOne.ck"); Machine.add("thingTwo.ck"); Machine.add("thingThree.ck"); Machine.add("thingFour.ck"); And then later call methods to initialize them serially or in different shreds, something like thingOne.start(); thingTwo.start(); thingThree.start(); thingFour.start(); spork ~ thingOne.start(); spork ~ thingTwo.start(); spork ~ thingThree.start(); spork ~ thingFour.start(); Hope this helps, michael
Begin forwarded message:
From: mike clemow
Subject: [chuck-users] Machine.add() and me.yield() Date: July 2, 2020 at 3:43:51 PM CDT To: ChucK Users Mailing List Reply-To: ChucK Users Mailing List Greetings Chuckists,
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:
Machine.add("thingOne.ck"); Machine.add("thingTwo.ck"); Machine.add("thingThree.ck"); Machine.add("thingFour.ck");
and also with Machine.remove(idNum); four times in a row.
Question:
Is this:
Machine.add("thingOne.ck"); Machine.add("thingTwo.ck"); Machine.add("thingThree.ck"); Machine.add("thingFour.ck"); me.yield();
significantly different than this:
Machine.add("thingOne.ck"); me.yield(); Machine.add("thingTwo.ck"); me.yield(); Machine.add("thingThree.ck"); me.yield(); Machine.add("thingFour.ck"); me.yield();
???
The same for sporking shreds four in a row.
Warmly, Mike
-- Michael Clemow Artist/Composer/Sound Designer http://michaelclemow.com http://michaelclemow.com/(he/him) _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users