[chuck-users] good until loop

Timothy Leonido timothy.leonido at gmail.com
Thu Sep 23 09:43:24 EDT 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20100923/8a8498ef/attachment.html>


More information about the chuck-users mailing list