Hi,
I've just made a new external [getpatchname], which will return the filename of the patch in which it is instantiated. It has been committed to the CVS under externals/postlude, and has been tested under Linux.
This functionality may well be available somewhere else, in which case I would be intruiged to know how/where - particularly if it can be done without externals.
Also, the external is currently buggy in the sense that it retains the patch name from the external's instantiation, so if you rename the patch then send a 'bang' message to the object, it will report the 'old' patch name. This is because accessing canvas_getcurrent()->gl_name from a method call rather than from getpatchname_new results in a segfault. I would be interested to know why this is....
best,
Jamie