On Thu, Jan 26, 2012 at 04:01:09PM -0600, Michael Heuer wrote:
Yep, every instance of Sample has a SndBuf chucked to dac
Then that is where your CPU is going. The UGens that aren't "playing" are still being calculated so you have 200+ UGens generating 0's. Clearly that's not so efficient so you will need to implement some sort of system for "voice cycling" where at any time only -say- 10 of these buffers are connected to the dac.
ChucK appears to be hitting one CPU on a two CPU machine pretty hard, but is only using 305M of RAM. Overall CPU usage on the machine is around 55%.
Yes, that sounds like what I expected. The bad news is that ChucK doesn't use multiple CPU's (or cores or threading, which comes down to the same thing). This is because of the design and it'll be non-trivial to have ChucK figure out in what cases we can use multiply CPU's. Sorry to have to bring the bad news, but I don't think there is any way around it, you'll have to implement voices to limit how many UGens are connected at any time. I wish I had better news. Yours, Kas.