[chuck-users] quiting chuck from chuck and saving reference to function
joerg piringer
joerg at piringer.net
Thu Nov 9 13:41:58 EST 2006
the reason is:
0.2::second => now;
if you forget this statement chuck tries to execute the loop "between"
the actual calculation of any output.
the audio output generation of chuck always happens while you wait.
joerg
altern wrote:
> :) but your way doesnt block the loop!
> how come?
>
> 0 => float off;
> while (true){
> if(off){break;}
> }
>
> locks the loop i am not sure why, but
>
> 0=>int off;
> while(!off){
> 0.2::second => now;
> }
>
> does not lock it. Or thats what it seems to me...
> any reason for this?
>
> thanks!
>
> enrike
>
>
>
> joerg piringer wrote:
>> altern wrote:
>>> I just needed this, setting variable off to 1 exits the main loop. I am
>>> still confused with ChucK ;) so i guess i did not asked the question in
>>> the right way.
>>>
>>> 0=>int off;
>>> while(true){
>>> if(off){break;}
>>> 0.2::second => now;
>>> }
>>>
>> you could even write:
>>
>> 0=>int off;
>>
>> while(!off)
>> {
>> 0.2::second => now;
>> }
>>
>>
>> best
>> joerg
>>
>
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
--
http://joerg.piringer.net
http://www.transacoustic-research.com
http://www.iftaf.org
http://www.vegetableorchestra.org/
More information about the chuck-users
mailing list