Right. We discussed before somewhere on the list but I couldn't figure out where. Here's the same solution but only using a subpatch. Just use "testab.pd" as an abstraction, give it some args, and bang [pd get-my-args] to get your args.
(Then just copy/paste [pd get-my-args] into any abstraction where you want to get the args.)
-Jonathan
--- On Mon, 3/7/11, Matt Barber brbrofsvl@gmail.com wrote:
From: Matt Barber brbrofsvl@gmail.com Subject: Re: [PD] Get list of a the arguments of a patch without using any external? To: pd-list@iem.at, "Alexandre Quessy" alexandre@quessy.net, "Jack" jack@rybn.org Date: Monday, March 7, 2011, 8:28 PM If you need to get the arguments to use within the abstraction instance itself, you can do it using the [list-argv] patch I've attached (see the help file). It requires a helper subpatch on [list-argv]'s parent (i.e. the abstraction you want to use it in). This employs an idiom by IOhannes which has seemed to be pretty robust. Warning: there is some dynamic patching that goes on in the helper subpatch to make this work. I use this a lot for abstractions that need to be able to take a variable number of arguments.
Matt
Hello Alexandre,
I just try to write an abstraction. I don't know if it
could help you,
it is just a try. ++
Jack
Le lundi 07 mars 2011 ? 11:50 -0500, Alexandre Quessy
a ?crit :
Hello everyone, I was wondering if there is a way in pure-vanilla
Pd to retrieve the
list of arguments of an abstraction. I use zexy's
[dollarg] for this,
but I'm making an effort to see if I can use Pd
vanilla only for some
abstractions. Is there a way to do this in Pd
vanilla?
Thanks,
Alexandre Quessy http://alexandre.quessy.net/
Pd-list@iem.at
mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list