Looping a Routine

View: New views
6 Messages — Rating Filter:   Alert me  

Looping a Routine

by arthurc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi List,

Is there a way to infinitely loop a routine that has already been created, using the included wait times e.g.

r = Routine {
    "hi".postln;
    0.5.wait;
    "bye".postln;
    0.5.wait;
};

Thanks,

Arthur

Re: Looping a Routine

by Nathaniel Virgo-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Arthur

One way is to do


q = Routine {
        inf.do {
                r.embedInStream;
                r.reset;
        };
};

q.play;

There may be other ways...

hth

Nathaniel


2009/4/19 Arthur Carabott <arthurc@...>:

> Hi List,
>
> Is there a way to infinitely loop a routine that has already been created,
> using the included wait times e.g.
>
> r = Routine {
>     "hi".postln;
>     0.5.wait;
>     "bye".postln;
>     0.5.wait;
> };
>
> Thanks,
>
> Arthur
>

_______________________________________________
sc-users mailing list

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

Re: Looping a Routine

by arthurc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That's perfect, thanks Nathaniel.

Arthur

2009/4/19 Nathaniel Virgo <nathanielvirgo@...>
Hi Arthur

One way is to do


q = Routine {
       inf.do {
               r.embedInStream;
               r.reset;
       };
};

q.play;

There may be other ways...

hth

Nathaniel


2009/4/19 Arthur Carabott <arthurc@...>:
> Hi List,
>
> Is there a way to infinitely loop a routine that has already been created,
> using the included wait times e.g.
>
> r = Routine {
>     "hi".postln;
>     0.5.wait;
>     "bye".postln;
>     0.5.wait;
> };
>
> Thanks,
>
> Arthur
>

_______________________________________________
sc-users mailing list

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


Re: Looping a Routine

by G-Wohl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You can also embed a loop within any routine. Just place
loop({
...
});
Inside your routine.

Sent from my Verizon Wireless BlackBerry


From: Arthur Carabott
Date: Sun, 19 Apr 2009 18:29:40 +0100
To: <sc-users@...>
Subject: Re: [sc-users] Looping a Routine

That's perfect, thanks Nathaniel.

Arthur

2009/4/19 Nathaniel Virgo <nathanielvirgo@...>
Hi Arthur

One way is to do


q = Routine {
       inf.do {
               r.embedInStream;
               r.reset;
       };
};

q.play;

There may be other ways...

hth

Nathaniel


2009/4/19 Arthur Carabott <arthurc@...>:
> Hi List,
>
> Is there a way to infinitely loop a routine that has already been created,
> using the included wait times e.g.
>
> r = Routine {
>     "hi".postln;
>     0.5.wait;
>     "bye".postln;
>     0.5.wait;
> };
>
> Thanks,
>
> Arthur
>

_______________________________________________
sc-users mailing list

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


Re: Looping a Routine

by Julian Rohrhuber :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

x = r.loop;

>Hi List,
>
>Is there a way to infinitely loop a routine that has already been
>created, using the included wait times e.g.
>
>r = Routine {
>     "hi".postln;
>     0.5.wait;
>     "bye".postln;
>     0.5.wait;
>};
>
>Thanks,
>
>Arthur



--





.

_______________________________________________
sc-users mailing list

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

Parent Message unknown Re: Looping a Routine

by arthurc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Even easier, thank you!

2009/4/19 Julian Rohrhuber <rohrhuber@...>
x = r.loop;


Hi List,

Is there a way to infinitely loop a routine that has already been created, using the included wait times e.g.

r = Routine {
   "hi".postln;
   0.5.wait;
   "bye".postln;
   0.5.wait;
};

Thanks,

Arthur



--





.

_______________________________________________
sc-users mailing list

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