is there a way to get a list of all the externals used in a patch? other than by hand of course... I see nothing in pd --help
On Fri, Sep 10, 2010 at 10:55:27AM -0700, Kim Cascone wrote:
is there a way to get a list of all the externals used in a patch? other than by hand of course... I see nothing in pd --help
Yeah, that would be a cool feature, but it's not there AFAIK. It's also a bit tricky. For one thing there are nameclashes: If I use a [urn] or [scale] or [prepend], from where does it come? Cyclone, maxlib, zexy, Gem? Most of these are even incompatible.
And then there are abstractions vs. externals vs. loader-defined objects like those you can write with pyext or pdlua. If I make a prepend.pd abstraction that just wraps [list prepend]--[list trim], I have created another [prepend] just for me. (I usually call that abstraction "prepent.pd" but you get the idea.)
So the best thing for now is to document what you use, either in comments, a README or with [declare] rsp. [import]. If it's a foreign patch, you probably will have to manually dissect it.
What I do is avoid externals where possible and bundle abstractions into a project. urn, prepend or scale from maxlib can be build as abstractions that can easily be bundled. But abstractions vs. externals can easily turn into a religious war and for many things you need externals, so a better solution would be needed.
Frank
On 10/09/10 18:55, Kim Cascone wrote:
is there a way to get a list of all the externals used in a patch?
Yes, probably in several ways. One I used is to patch Pd to print out the list of all classes registered when they get registered (and the library names when they are loaded), so the first lot are internal, and the rest external. Using this you can get some plain lists of objects from different libraries.
Then you can use some shell scripts (and the lists you generated from the patched Pd) to filter out all the internal objects from the patch files, and get a list of all the externals used. For example code:
https://code.goto10.org/svn/maximus/2008/pdpatchinfo/
(may have slightly bitrotted, and probably the object lists are out of date by now).
other than by hand of course... I see nothing in pd --help