List/control stream players with no handle

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

List/control stream players with no handle

by micromoog :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Is there any way to get a list of all EventStreamPlayers that are currently running, and/or control those players, without having a handle on them?  For example, if I run this code:
 
Pbind(
 \degree, Pseq([0, 2, 4], inf)
).play;
 
I now have an EventStreamPlayer running with no handle, so I don't know how to send it the .stop message.  Can this be done, or can I at least see if any are playing (to check for leaks)?
 
 
Thanks,
micromoog

Re: List/control stream players with no handle

by Julian Rohrhuber :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

no, there is no repository, simply because you may be creating many
at a time for a short time. Pdef has a gui that can be used for this
(PdefAllGui)

>Is there any way to get a list of all EventStreamPlayers that are
>currently running, and/or control those players, without having a
>handle on them?  For example, if I run this code:
>
>Pbind(
>  \degree, Pseq([0, 2, 4], inf)
>).play;
>
>I now have an EventStreamPlayer running with no handle, so I don't
>know how to send it the .stop message.  Can this be done, or can I
>at least see if any are playing (to check for leaks)?
>
>
>Thanks,
>micromoog


--





.

_______________________________________________
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: List/control stream players with no handle

by Graham Coleman-2 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

micromoog,

Still in the initial stages of learning the pattern system (and trying to bring some of my favorite livecoding gestures to sc) and this was something that I felt missing.

the current compromise:

l=List()
l.add( Pbind(\degree, 1).play )

having to enclose the final play is kind of annoying, I was also thinking about this, which returns an Array, I think

l=l++Pbind(\degree,1).play

and the processing commands

l[0].pause
l.pop.stop
l.removeAt(0).stop
l.do { |x| if ( 2.rand==0 ) x.stop }

etc.

It should be easy to extend Pattern to make an alternate 'play' message that adds the reference to a class variable collection.

Graham

On Wed, Apr 22, 2009 at 12:04 AM, micromoog <micromoog@...> wrote:
Is there any way to get a list of all EventStreamPlayers that are currently running, and/or control those players, without having a handle on them?  For example, if I run this code:
 
Pbind(
 \degree, Pseq([0, 2, 4], inf)
).play;
 
I now have an EventStreamPlayer running with no handle, so I don't know how to send it the .stop message.  Can this be done, or can I at least see if any are playing (to check for leaks)?
 
 
Thanks,
micromoog


Re: List/control stream players with no handle

by Graham Coleman-2 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

> l=l++Pbind(\degree,1).play

but I think

l add: Pbind(\degree,1).play

is the best

G

On Wed, Apr 22, 2009 at 1:53 PM, Graham Coleman <ravelite@...> wrote:
micromoog,

Still in the initial stages of learning the pattern system (and trying to bring some of my favorite livecoding gestures to sc) and this was something that I felt missing.

the current compromise:

l=List()
l.add( Pbind(\degree, 1).play )

having to enclose the final play is kind of annoying, I was also thinking about this, which returns an Array, I think

l=l++Pbind(\degree,1).play

and the processing commands

l[0].pause
l.pop.stop
l.removeAt(0).stop
l.do { |x| if ( 2.rand==0 ) x.stop }

etc.

It should be easy to extend Pattern to make an alternate 'play' message that adds the reference to a class variable collection.

Graham


On Wed, Apr 22, 2009 at 12:04 AM, micromoog <micromoog@...> wrote:
Is there any way to get a list of all EventStreamPlayers that are currently running, and/or control those players, without having a handle on them?  For example, if I run this code:
 
Pbind(
 \degree, Pseq([0, 2, 4], inf)
).play;
 
I now have an EventStreamPlayer running with no handle, so I don't know how to send it the .stop message.  Can this be done, or can I at least see if any are playing (to check for leaks)?
 
 
Thanks,
micromoog