
We already have a mechanism via OSC that waits asynchronously on incoming messages. I suppose your UG could become a higher class citizen within ChucK, capable of triggering asynchronous events. But that would be up to the gods of ChucK to decide... PRC On Sat, 19 Aug 2006, Bradford Garton wrote:
Hey cHuCksters --
I've written a ugen to deliver values coming from inlets on the max/msp [chuck~] object into the chuck executing environment. The essential part of the function looks like this:
CK_DLL_CTRL( maxinlet_ctrl_inletval ) { t_CKINT inletno = GET_CK_INT(ARGS);
// inletvals[] is set from max/msp RETURN->v_float = inletvals[inletno-1]; }
and is set up thus:
func = make_new_mfun( "float", "inletval", maxinlet_ctrl_inletval ); func->add_arg( "int", "value" );
To get this to update during execution, I can use a script like this:
maxinlet maxin; sineosc a;
while (true) { // gets the value coming from inlet #1 1 => maxin.inletval => a.freq; 10::ms => now; }
However, ideally I'd like the function to deliver/update the incoming value whenever it came from max/msp, something like this:
maxin.inletval => a.freq; 3.5::second => now;
(i.e. no loop in the script, but during execution any change coming from maxin.inletval would indeed affect the sineosc frequency).
I suspect that I could set it up to tick somehow at the audio rate, but that seems overkill. Is there a way to do this in chuck?
brad http:://music.columbia.edu/~brad _______________________________________________ chuck-dev mailing list chuck-dev@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev