[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Something strange with Routine...



r.reset in between?
Otherwise it won't know to start from the beginning again, and resumes where it left off... which is at the end.


sincerely,
Marije


On Wednesday 06 May 2009 19:07:52 TomD wrote:
> Hi, here's a Routine (from the Help file) :
>
> (
> r = Routine.new({
> 10.do({ arg a;
> a.postln;
> 1.wait;
> });
> 0.5.wait;
> "done".postln;
> });
> )
>
> To play it :
>
>
> SystemClock.play(r);
>
>
> To stop it (or wait untill the end, it remains the same...) :
>
>
> r.stop;
>
>
> But to play it back I have to enter once again :
>
> (
> r = Routine.new({
> 10.do({ arg a;
> a.postln;
> 1.wait;
> });
> 0.5.wait;
> "done".postln;
> });
>
> SystemClock.play(r);
> )
>
> But why not just SystemClock.play(r) ? Why do I have to tell once
> more what's "r" ? How to do if I don't want to define "r" after each
> time it's stopped and being able to play it another time ?
>
> If someone can help...thx