i know it might sound silly, but depending on your intentions you might be able to run chuck on the command line, render some voices to audio and then just play the wav files when needed ?

sounds too unrealistic ?

good luck

On 5 June 2012 17:32, [chriswicks] <crwicks@yahoo.com> wrote:
Thanks, Joel, interesting comments.  I do indeed have 26 simultaneous voices active.  I think you are correct, so there's not really much I can do about it since the bulk of the audio is meant to be persistent.


From: Joel Matthys <jwmatthys@yahoo.com>
To: chuck-users@lists.cs.princeton.edu
Sent: Tuesday, June 5, 2012 12:22 PM
Subject: Re: [chuck-users] chuck-users Digest, Vol 83, Issue 1

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.
_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users



_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users