[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-dev] Calculate num-wire-buffers from SyntDef
You iterate over the UGens in the order that they appear in the def. For
each UGen you check its inputs. If an input is another UGen at
audio-rate, you 'release' (decrement a use counter) them; next you
'allocate' for the current UGen all audio rate outputs (incrementing by
the total number of uses of that output). while doing that an internal
counter keeps track of the maximum concurrently used buffers.
https://github.com/Sciss/ScalaColliderUGens/blob/f7b17f5e60a20d32958b7784d848aa8abd3f8caf/api/src/main/scala/de/sciss/synth/UGenGraph.scala#L41
The server additionally assigns the output buffer indices while
iterating this way.
best, .h.h.
On 18/11/15 00:28, Chris Sattinger wrote:
> Actually I'm interested too. I did have a look but didn't find the answer.
>
> the naive guess is that its equal to the number of UGens that have children.
>
>
>
> On Tue, Nov 17, 2015 at 11:56 PM Hanns Holger Rutz <contact@xxxxxxxx
> <mailto:contact@xxxxxxxx>> wrote:
>
> ok, I got it, basically extracting the relevant part of
> `DoBufferColoring`.
>
> best, .h.h.
>
>
> On 17/11/15 19:15, Hanns Holger Rutz wrote:
> > hi y'all,
> >
> > is there a simple counting algorithm that given a synth-definition (as
> > written out in an .scsyndef file, i.e. after topological sort and
> all),
> > will give me the number of wire-buffers that the server would require
> > when loading that def?
> >
> > (this is so I can check on the client side whether a given max of
> > wire-buffers would be exceeded or not).
> >
> > it should be fairly simple, no?
> >
> > thanks, .h.h.
> >
> > _______________________________________________
> > sc-dev mailing list
> >
> > info (subscription, etc.):
> http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> > archive: https://listarc.bham.ac.uk/marchives/sc-dev/
> > search: https://listarc.bham.ac.uk/lists/sc-dev/search/
> >
>
>
> _______________________________________________
> sc-dev mailing list
>
> info (subscription, etc.):
> http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: https://listarc.bham.ac.uk/marchives/sc-dev/
> search: https://listarc.bham.ac.uk/lists/sc-dev/search/
>
_______________________________________________
sc-dev mailing list
info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/