[chuck-users] Sharing Instantiated Objects Thru Shreds
signal.automatique at gmail.com
Wed Oct 11 17:14:32 EDT 2006
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,
If I read it all corectly, this is the central problem, right?
How about making one .CK file that defines this public class and includes a
static a event. This file would also broadcasts this event from a looping
shred (thast shred will probably also deal with incrementing a counter to
keep track of what beat is the current one).
All of the other files that you use would then wait for that event and as
soon as it happens change their parameters (and start phrases or play beats
That's what I use and it works for me but your needs might be different.
Making a event static in a public class is a bit tricky; it involves a
temporary workaround using assignment. I could share some code but it would
be way better if somebody could properly explain it who actually understands
*how* the workaround works; I have to confess it's a bit hazy to me.
And no; none of this sounds insane to me but I use ChucK so it might be wise
to consult a profesional expert as well ;-).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the chuck-users