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

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



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