[PD] getting the name/receive symbol of a patch/subpatch

Jamie Bullock jamie at postlude.co.uk
Wed Jul 12 21:16:57 CEST 2006


Hi hc,

I presume you saw the announcement about my external which does this, and this is by way of follow up...
 
On Wed, 12 Jul 2006 14:00:40 -0400
Hans-Christoph Steiner <hans at eds.org> wrote:

> 
> Does anyone know a way to get the name of a patch or subpatch from  
> within Pd?  Basically I want to dynamically get the name that you  
> would use like this:
> 
> [; pd-myobject.pd(
> 
> The actual filename would work too.  It seems to me that this should  
> be part of a standard, message-based querying mechanism which could  
> also be used for patch meta data like local namespace, current dir, etc.
> 

I think all that it would take, is for PD to map a patch's unique ID to it's filename. Then you could do:

[bang(
|
[f $0]
|
[makefilename pd-%d.pd]
|
|$1( 

It's a shame you can't just do :

[s $0]

But $0 isn't expanded to a symbol when used alone.

Jamie




More information about the Pd-list mailing list