« Return to Thread: Re: [sc-users] Node.isPlaying question

Re: [sc-users] Node.isPlaying question

by Josh Parmenter :: Rate this Message:

Reply to Author | View in Thread

In the Ctk classes, this is what I do. NodeIDs are placed for groups and synths are kept track of according to server. Then all n_end messages are caught and the ids removed. isPlaying then just checks to see if a server has a node running in its array.

Best,

Josh

On Apr 28, 2008, at 8:46 AM, ronald kuivila wrote:

Hi Felix,

Why not track of the whole node tree in Node (I guess in a dictionary indexed by Server) and use notifications for changes of state?  
Or is that what you are driving at?

RJK


On Apr 27, 2008, at 3:59 PM, felix wrote:

what do you all think about :

adding a <>nodes variable to Group

adding to NodeWatcher so that it adds the node to the nodes var of its group (provided both the node and the group are being watched).

this would mean that if you watched all nodes you could query to ask if a node executes after another node.


On Sat, Apr 26, 2008 at 5:17 PM, Stefan Nussbaumer <stefanus@...> wrote:
hi eirik,

Eirik Blekesaune schrieb:
> When I do:
>
> a = Synth(\synthname, [\dur, 10]);
>
> a.isPlaying //returns false
> a.isRunning // also returns false.. why?
>

set up a NodeWatcher:

s.makeBundle(nil, {
   a = Synth(\synthname, [\dur, 10]);
   NodeWatcher.register(a);
});

then you should be able to query the state of your synth ...

a.isPlaying;

good luck, stefan
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users



_______________________________________________
Sc-devel mailing list

_______________________________________________
Sc-devel mailing list
Sc-devel@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-devel

******************************************

/* Joshua D. Parmenter

http://www.realizedsound.net/josh/


“Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono

*/


_______________________________________________
Sc-devel mailing list
Sc-devel@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-devel

 « Return to Thread: Re: [sc-users] Node.isPlaying question