Hi,

'while' continuously evaluates the condition in () parenthesis (that in your case is 20::ms => now, a "pause"), and if that's true then executes the code in between {}.

That is the equivalent of having


while(true)

{

    your code;

    20::ms => now;

}


Cheers,

Mario



On 22/02/2020 09:37, herman verbaeten wrote:
Hi,
 In the flossmanuals i found this exemple  of modulation of the freq of a SinOsc.
Normally in the while() loop, between the brackets is the condition to keep the loop running. In the example it is a time. Complete confusion! 
Kind regards 
Herman

SinOsc s => dac; 
SinOsc lfo; 
5 => lfo.freq; 
while (20::ms => now) 
{
     ( lfo.last() * 10 ) + 440 => s.freq;
}

_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-- 
electronic musician, sound artist, creative coder, QA engineer
https://vimeo.com/creativecodingsalerno
http://mbuoninfante.tumblr.com/
https://github.com/mariobuoninfante
https://bitbucket.org/mariobuoninfante/