On Thu, Mar 1, 2012 at 2:02 PM, Jonathan Wilkes jancsika@yahoo.com wrote:
Not sure if this makes sense, but here goes:
Can a Pd dsp graph be nested inside a Pd dsp graph?
This occurs whenever you make a sub-canvas. For each canvas, there is a new dspcontext struct created. The canvas->dsp graph process creates a nested dsp graph, delimited from its parent by block prolog/epilog (when re-blocked from parent) and inlet/outlet prolog/epilog code.
It may be possible to think of just any sub-graph as being a nested dsp graph, for that matter. But yes, I think it's clear that nested dsp graphs can be programmed and used.
If this were the case, then would it be possible created/destroy any of these scalars at will and only have to rebuild this "nested" dsp graph that is associated with it's [struct]?
Not possible yet! Every time you add/delete a connection (and some other conditions I'm not sure of), the dsp stops, rebuilds its entire graph, and re-starts. Just set ugen_loud to 1 and re-compile--you will be greeted with a representation of Pd building your dsp graph every time you make changes to it.
Comments in d_ugen.c have said--for a long time--that this is not a preferred way of doing things. It's just the way things are done now.
I'm obviously still very sketchy on signal graph compilation, so links to any documentation or resources are appreciated!
-Jonathan
I wouldn't want you to have to learn all the hard lessons about how Pd does it's internal management of dsp chains and the like, but--if it's interesting to you and you might want to become a developer, I recommend reading d_ugen.c, g_canvas.c, g_io.c, and d_resample.c. It's all in there.
Feel free to ask any other questions.
Chuck