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

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



OK so with reset you can do the same as with Task... thanks a lot.
About "if Task is "systemClocked' or not ?" question : I just meant "by default", but never mind it musts work the same way as Routine.

Cheers

Le 7 mai 09 à 02:22, Fredrik Olofsson a écrit :

use .reset before trying to restart your routine again. it played to the end so it won't do anything when you try to play it again. reset makes it forget it played.

(
r = Routine.new({
	10.do({ arg a;
		a.postln;
		1.wait;
	});
	0.5.wait;
	"done".postln;
});

SystemClock.play(r);
)

r.reset
SystemClock.play(r);
r.stop
r.reset
AppClock.play(r);


Task is basically a routine that can pause and resume. use reset for it as well. and no, you can run Task on appclock as well (or did i misunderstand you question?)

_f

7 maj 2009 kl. 01.25 skrev TomD:

Oh yes you're right, it's very simple with Task (but if someone can explain why ... and if Task is "systemClocked" or not ?)
Thx anyway

Le 7 mai 09 à 01:11, LFSaw a écrit :

In short:

use a Task instead of Routine.

lg
	Till

On 07.05.2009, at 01:07, 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



_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/



_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/



 #|
    fredrikolofsson.com     klippav.org     musicalfieldsforever.com
 |#


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/



_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/