[chuck-users] Sharing Instantiated Objects Thru Shreds

Piero B. Contezini chuck at piero.contezini.net
Wed Oct 11 16:48:21 EDT 2006


Maybe i'm missing something, but I need to share a instantiated object between my shreds, as this object will control the music flow, I need all my shreds to share this instance.

It works like this:

Shred 1 controls the basic bass sequence
Shred 2 controls the fx sequence

There is a common class between them notifying each shred when they must change their random parameters (for sequencing everything in the right compasses), but the class itself doesn't work if it has no instance controlling the time poll interval, so in a programming language I should implement a shared memory area with mutexes to control the access of the main object, anyone had this problem before?

I'm still figuring out how to put my ideas on Chuck, maybe i'm just doing something that's already done. Basicly i'm thinking this way because of the common way eletronic music is built on (8 beats as a word, 32 beats as phrase, and so on)

In this way, I can't just add a new shred to the machine without being in the right compass (in a new phrase) , I could use timing, but I still want to make breaks (with effects of course) live, where I just set the main object to stop allowing the shreds to processes its next words/phrases , play the hole effect, and leave the control of the machine to the old shreds again.
Is this just insane?



More information about the chuck-users mailing list