-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Romain.

I'm really sorry, my description was clear as mud.

- From what I understand, the procedure/function for each "case" of the
switch is evaluated during intialization (I read in the doc that once
the script is parsed, the graph is built and related objects are
created, and you call that instantiation I think.) The outcome of the
predicates is settled at that time - except when we deal with
time-related operators I think. I just came to this conclusion using
printf() and markers within test scripts. I'm maybe wrong though. Please
correct me.

Anyway, what I'd love to get are "case" functions that are 'visited'
each time a branch of the switch must be selected - a real dynamic
operator, where case predicates are evaluated each time the switch
operates. It's like the regular switch, except that the "cases" behave
more like 'event' triggers (like on_track(), on_end(), on_connect(), etc.)

Myabe I'm mistaken and the original switch doesn't really behave the way
I've described. Please tell me if there's a solution/workaround/whatever
to make the switch act like a true dynamic operator.

P.S. The track_sensitive variable is just fine I guess.

Regards.

Le 08/08/2011 01:26, Romain Beauxis a écrit :
> 2011/8/5 okay_awright <[email protected]>:
>>> What do you mean exactly??
>> 
>> I don't know if I can explain in a few words. I'll try with an
>> example: within a given source graph, there's this switch operator
>> with, say, 2 predicates to evaluate in a sequence. When the first
>> predicate is true it will switch to a source made from a
>> request.dynamic(), as soon as the first track has been played using
>> this function, the predicates from the switch will be evaluated
>> once again. If this time the first predicate is false and the
>> second one is true, then the source will switch to a blank() or a
>> sine() or whatever. As soon as the function is over we go back to
>> the switch, and it repeats endlessly like that, until no predicate
>> is true. At the moment I have emulated that kind of behaviour with
>> some event triggers, references, forced failures (fail()),
>> fallbacks, and a full page of scripting I have yet to debug :(
> 
> I assume you already know that you can write this:
> 
> s = switch( [ ( function1, s1), (function2, s2) ] )
> 
> Which is track_sensitive (switching only occurs at end of tracks) by
> default.
> 
> Then, if I understand well what you describe, you would like the 
> switch to track sensitive from s1 to s2 but immediate from s2 to s1, 
> right?
> 
> Romain

- -- 
best regards,

okay_awright
<okay_awright AT ddcr DOT biz>
[PGP key on request]
-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJOPyw/AAoJEN2X/7ng71pT9wkIAKLIlrbNTvN8Jxys8wukS8LN
SRbyRIcQu9Zf2y55OydhEW+abRABxuPqAV6tffOhbFjr+VB3JZ+v0k4lvoqn9sDb
MV3BqNHoAIxLA0IPLzZHrt/QZXKIdJz6W5rhgPR9EcGB1hRxheBFmrG5H1gKZWb+
RFHxSW2Tvgy5z3G9vOzIjB7DoWwAG0j7O633aeQvh31yRJhDyInkTNkTgvUmJ5VI
oDqL+U33RG8nM3C3e2fhFMP69gQotJCMNXXliuU+OvR2qdFLIwJnqfeVXg6wl7pR
JJw9HRD0aJ6U0HgxcGT7DRrgoJC4IRZe08M4QK2BgLwqmME8Vdw1wd1VVvNG6dQ=
=ofcZ
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to