<div dir="ltr"><div><div><div><div><div>I'm trying to get a continuous ambient mix 'app', where once a SndBuf finishes playback, another will be instantiated. There should always be two SndBufs playing at all times.<br>
<br></div>I can get this scenario working easily enough but the memory used by earlier playback isn't being freed up. It seems that as long as a parent shred (required to instantiate and monitor the sndbufs) is while-ing away eternally, the sndbuf remains in resident memory. This is a problem because as more sound files are selected and played the computer will eventually run out of memory.<br>
<br></div>Switching to the command line I find I can chuck + simple sndbuf playing files and once playback is complete, memory use goes back to what it was. I already have a perl script running to take care of environment and execution of the program on boot, so I can modify that to periodically add new chucks.<br>
<br>The problem now shifts to knowing when to identify that the current file has completed playback, and a new file should be added. OSC seems a good way of getting information from Chuck to the script. There's a Perl library for running an OSC server, so it seems like this could well work.<br>
<br></div>But before I go down this slightly Rube Goldberg route, I wanted to check: is this really the Best Way(TM)?<br><br></div>Thanks,<br><br><br></div>Stuart<br></div>