[chuck-users] Cpu time between audio samples?

Kassen signal.automatique at gmail.com
Mon Jan 15 16:09:23 EST 2007

On 1/15/07, karl.petermichl at orf.at <karl.petermichl at orf.at> wrote:
> Dear ChuKees,

Hi, Karl!

I am particularely interested in the wonderful feature which allows me
> to calculate EVERY SINGLE AUDIO SAMPLE prior to outputting it to the dac
> via the impulse ugen. Is there a rough estimation just how much
> calucaltion can go on between each sample at 44100hz?

Generally somewhere inbetween "a fair amount" and "too much for comfort".
It's realy quite expensive to ChucK that way but still very possible.

Does this depend
> on the cpu type and speed, or is there an inherent ChuK limit?

It's all in the CPU but it also heavily depends on the sample rate set. As
far as I know there is no real limit nor should there be.

I want to create some amazing sounds by making extremly complicated
> computations for each sample, as in theory one could just create about
> any sound in the world this way (including semi-talented clarinet
> players just having been woken up from a deep alpha-cycle..---))

I'd like to point out there is a Clarinet model ready made in Chuck already.
This particular model, because of it's name, is very well suited for more
jokes in dubious taste should one be so inclined.

Somewhere about a year ago or so there was a fair amount of talk on the list
about using arrays of floats to record to, then chuck the values in them to
Impulse or Step once per sample. That might be a interesting place to start,
you could do some variations on Karplus-Strong using that. You could also
implement anything found in texts on DSP or your own concoctions doing it
this way but be prepared to spend a lot of time optimising. Do use Gain in
it's various modes for all multiplications at sample-rate; this realy saves
a lot of cpu time at the expense of some readablity.

In my experience you can create very interesting little instruments that way
that will still run in realtime but ti would be pushing it a bit too far to
try to do a whole piece that way. That's refering to my own Pentium4 2GHz
under a tuned version of XP. Your processor and taste in experiments will
likely give different results but I'd save this menthod for things you can't
get in any other way or for moments when this method sounds like real fun.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20070115/7dc56860/attachment-0001.htm 

More information about the chuck-users mailing list