[chuck-users] Question about Gain and instantiating objects
gpermus at gmail.com
Sat Jan 14 18:48:45 EST 2006
On 13-Jan-06, at 11:33 AM, Mike McGonagle wrote:
>> chuck sinegrain sgtest1 rec-auto
I've found that recording things in chuck is quite expensive
(computationally), so I would first try it without recording. And I
certainly wouldn't have four different recordings going on at once;
I've find some way to only have one thread recording everything.
> I did this in Pure Data, but I had to create it in such a way that
> there were already all the generators instantiated, so if there ever
> occured a moment where one more generator was needed that created, it
> would "steal" a generator. This occasionally produced some clicks in
> the resulting sound.
I did a similar thing (in chuck) using fifteen generators. In my case
I had new generators wait until one was free, instead of stealing it...
but you can avoid the clicks if you can give the generator a few ms
notice before stealing it. When you notify a generator, have it do a
fade-out, then start the new info.
> Will I need to create an "array" of my objects, creating all the
> instances that I may need? Or should I be able to create an object,
> call its function, and call its function by sporking it, and then
> instatiate a new object using the same object reference?
sporking is relatively expensive. When I tried to do my project (with
126.96.36.199, I believe), I ran out of CPU when I have five generators
going. With an array of objects (using whatever I wanted up to the
array size), I could do something like fifteen or eighteen generators.
Since chuck is so new, it's not very optimized.
- Graham Percival
More information about the chuck-users