[chuck-users] While loop with condition =>NOW
mario buoninfante
mario.buoninfante at gmail.com
Sat Feb 22 04:57:58 EST 2020
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 at 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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20200222/de17b3fa/attachment.html>
More information about the chuck-users
mailing list