[PD-dev] dynamic patching: getting info on objects

Hans-Christoph Steiner hans at at.or.at
Thu Aug 19 07:31:16 CEST 2010


Sounds like quite a project.  The 'purity' python library by Alexandre
Quessy might be of interest, it aims to allow you to dynamically
generate Pd patches from python.

On Thu, 2010-08-19 at 01:14 -0400, Ted Hayes wrote:
> Following up on this—doesn't look like anything in iemguts will help.
> 
> Basically I need either
> 
> 1) A way to generate a list (once) of all object names, number of inlets and outlets or

The question here is: all objects loaded, in use, currently available,
or ever available?  The answer is quite different depending on the
answer.  For "ever available", wiki.puredata.info is probably your best
bet.  For "currently available" you could navigate the whole tree of
symbols, and see which has an "s_thing" attached (see the t_symbol
struct).  I think that would get you all loaded objects combined with
all receive names.  For "currently available" you might just search thru
the search path in the filesystem, but that would mean that Gem's
objects would be represented since they are all bundled into one file.

Check out the t_object struct for the linked list of inlets and outlets.

> 2) A way to output the number of inlets and outlets for a given object name.

Traverse the inlet and outlet linked lists, and count them.

pd-dev is your best bet for these kinds of questions.

.hc

> I've been hunting through the pd source looking for inspiration... perhaps I could write an external that calls obj_noutlets and obj_ninlets, for instance.  However it would be ideal to just generate a list once that I can refer to later...
> 
> If anyone has any ideas or pointers (har) I'd love to hear them!  Would it be of any use to cross-post to the pd-list?
> 
> Thanks everyone :)
> —t3db0t
> 
> 
> 
> On Aug 2, 2010, at 3:06 PM, Hans-Christoph Steiner wrote:
> 
> > 
> > Hey t3db0t, I'm happy to see you digging into the guts!  mrpeach's [which] will tell you if an object exists or not.  Maybe something in the iemguts lib will tell you more?
> > 
> > .hc
> > 
> > On Aug 2, 2010, at 12:55 PM, Ted Hayes wrote:
> > 
> >> Hi all, this is t3db0t, been meaning to subscribe here for a while and finally did, and I have a question.
> >> 
> >> I'm writing a remote front-end that sends FUDI internal messages over a socket to a server running a -nogui Pd instance.  I'd like to be able to get a listing of every object available to that instance with how many inlets and outlets each object has, i.e.,
> >> osc~ 2 1
> >> etc. etc.  I wouldn't assume this is possible, but I had to ask before I just start hand-coding my own.  I image the native Pd front-end builds this list when it initializes, so is there any way I can listen in to that—over a socket?  Thanks everyone!!
> >> 
> >> —t3db0t
> >> _______________________________________________
> >> Pd-dev mailing list
> >> Pd-dev at iem.at
> >> http://lists.puredata.info/listinfo/pd-dev
> > 
> > 
> > 
> > ----------------------------------------------------------------------------
> > 
> > "[W]e have invented the technology to eliminate scarcity, but we are deliberately throwing it away to benefit those who profit from scarcity."        -John Gilmore
> > 
> > 
> 
> 
> _______________________________________________
> Pd-dev mailing list
> Pd-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev





More information about the Pd-dev mailing list