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

Re: [sc-users] Individual Synth's CPU usage...



Oh yes, that might do it. The equivalent of "tic" and "toc" in matlab.
Hadn't thought of that. There's no way for a ugen on its own to time
the execution of a synth, but if you could ensure that Tic.kr came at
the start of the synth's graph, and Toc.kr came at the end, you could
measure the interval. Hmm...

Dan

2009/7/23, Josh Parmenter <josh@xxxxxxxxxxxxxxxxx>:
> Or possibly a UGen pair that run at the head and tail of the UGen graph, and
> check the amount of time it takes to execute the graph (storing values in
> the Graph's struct)? Then the second UGen could output the difference? I
> don't know how to access the values that would yield the amount of CPU used
> to calculate the Graph, but I imagine that could be another solution.
>
>  Best,
>
>  Josh
>
>
>  On Jul 23, 2009, at 2:53 PM, Sciss wrote:
>
>
> > hmmm, maybe you are right. i imagine, technically it would maybe be easier
> to have something like a new server command
> >
> > [ /n_bench, <nodeID> ]
> >
> > or so. that way you could even calculate the total CPU usage of a
> sub-branch of the node graph....
> >
> > ciao, -sciss-
> >
> >
> > Am 23.07.2009 um 23:47 schrieb Josh Parmenter:
> >
> >
> > > I'm not sure if this is really something a UGen could easily compute,
> since it would have to know how long the entire SynthDef graph takes. and it
> would (I'm guessing) have to actually outputs its value somewhere in the
> synthesis chain.
> > >
> > > Not sure if this helps, but one thing I do with pieces is, before
> performing them, run 20 of a synth and get an average from that (divide by
> 20 obviously). Then in my routines that are creating new notes (or
> responding to triggers), I check the current CPU Usage before creating the
> note with s.avgCPU . If it is below a certain threshold, I let the new synth
> be created.
> > >
> > > Best,
> > >
> > > Josh
> > >
> > > On Jul 23, 2009, at 10:49 AM, Sciss wrote:
> > >
> > >
> > > > hi,
> > > >
> > > > any clues how to measure a particular synth's individual CPU usage? i
> like to add a management to my live patch that can track which instruments
> takes how much CPU and can also warn before creating a new instance of that
> instruments if CPU would go too high...
> > > >
> > > > if there's none -- how difficult would it be to have like a
> CpuUsage.kr ugen?
> > > >
> > > > ciao, -sciss-
> > > >
> > > >
> > > > _______________________________________________
> > > > 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/
> > > >
> > >
> > > ******************************************
> > > /* 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-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/
> >
>
>  ******************************************
>  /* 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-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/
>


-- 
http://www.mcld.co.uk

_______________________________________________
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/