[chuck-users] good until loop

Andrew C. Smith andrewchristophersmith at gmail.com
Thu Sep 23 09:51:09 EDT 2010


you need the following:

now => time then;

do { ...
} until (then < (now - 10::second));

also, I'm not sure that "do..until" is a functioning construct. It may
just be a keyword in the miniAudicle, maybe a scrap from its
Java-based highlighting (right? java?)

-Andrew

2010/9/23 Timothy Leonido <timothy.leonido at gmail.com>:
> Would anyone mind sending a good example for loop "until" ? I simply want a
> shred to stop automatically after a 10 seconds. Here is what I wrote:
>
> do{
>
>     Std.rand2f(200,50.0) + Math.sin(v*100.0)*20.0 => v2 => f.pfreq;
>
>     Std.rand2f(5000.0, 60) + Math.sin(v*30.0)*80.0 => f3.pfreq;
>
>     Std.rand2f(1500, 80.0) + Math.sin(v*200.0)*50.0 => f2.pfreq;
>
>     std.rand2f(.551,.549)=>buf.rate;
>
>    .0+(.9*maybe)=>buf.gain;
>
>    0=>buf.pos;
>
>    .1:: T =>now;  } until (5::second);
>
>
>
> thanks so much!
>
> -tim
>
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>
>


More information about the chuck-users mailing list