[chuck-users] chuck-users Digest, Vol 83, Issue 1

Joel Matthys jwmatthys at yahoo.com
Tue Jun 5 12:22:25 EDT 2012


Hi Chris. Yikes, anything above about 40% CPU is pretty dicey for live audio.

The OSC listeners themselves should be fairly trivial, CPU-wise. I suspect that the bulk of your power is going to calculating audio, so that's where you should look to optimize.

Do you have 26 simultaneous voices sounding? If so, that might be too taxing for ChucK (or any other live audio language, for that matter).

But if any of the voices are only occasionally active, I suggest unchucking UGens when they're not in use (myOsc =< dac etc.) Any UGens not directly connected in a signal path to either the dac or the blackhole will not calculate audio, thus preserving precious CPU cycles. You can reconnect them on demand.

-Joel

>This program takes up a LOT of CPU resources, and I was wondering if anybody had any
>tips on optimization, or if this is just a fact of life with a ChucK program of this
>nature.  I know that the OSC stuff has only recently been implemented.  I feel like
>I've been reasonably efficient with my code, but I'm seeing upwards of 80% CPU usage.
>It stays pretty stable, but this seems like a lot.  In its current state, it's
>unplayable on my dual-core laptop, but my quad-core desktop can handle it OK.


More information about the chuck-users mailing list