[PD] some macro ideas
matju at artengine.ca
Wed Oct 4 01:14:23 CEST 2006
On Wed, 4 Oct 2006, padawan12 wrote:
> The necessity for abstractions to be separate files is imho one of Pds
> most significant flaws. I avoid using abstractions entirely because even
> with the most careful management they are more trouble than they are
Let me propose a syntax addition: an abstraction file would be embeddable
in another pd file (any other pd file) just by inserting that file
anywhere where an #X obj can be put, then add the following line:
#X class myfilename;
Where "myfilename" is the classname (the filename of the abstraction minus
the .pd suffix)
This proposal makes a bit more sense in combination with multiple
objectmakers as I proposed recently.
> A "convert abstractions to subpatches"
no. an abstraction and a subpatch are quite different, especially for the
handling of $0, $1, $2, ... where every abstraction instance (and every
messagebox) brings a new context for the $-variables. It would still be
possible to do the conversion by replacing all dollar-signs by their
corresponding values, but that's almost never what I'd want to do.
> But those that really *use* Pd a lot probably agree with me that another
> reason for abstractions is to test/edit a piece of code in many places,
> and once you've got it right cast it in stone as a subpatch.
I don't know why I'd like to cast anything in stone like that. For casting
in stone, it's sufficient to just stop editing it. That way, whenever you
want to uncast it, you just resume editing it.
> 1) Subpatches - single fixed code blocks
> 2) Aliases - reusable code blocks within the main file
> 3) Abstractions - reusable code blocks in separate files
I don't think that it should be called Aliases. That name should be
reserved for something else whose purpose is more one of aliasing: e.g.
multiple creator names for one class...
I believe that (2) should still be called Abstractions, unless we get
another name for both (2) and (3) which is less vague and/or less long
_ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada
More information about the Pd-list