[PD] Self-construction &

Johannes M Zmoelnig zmoelnig at iem.kug.ac.at
Mon Jul 16 16:51:06 CEST 2001


don't know whether my first mail managed to get sent (we had problems with
our user-server)

> Dear list.
> I'm creating some documentation about how PD can manage self-construction of 
> patch. (a patch can create an other one... )
> I curently don't kown : 
> * how removing an (obj/msg/etc..) in a patch.
> * how unconnecting (obj/msg/etc..)
> * how showing or hiding a sub patch
> * what it's possible to do and what's is not...
as far as i know, there are (yet) no possibilities to remove
obj/msg/connections. (i once tried to make a "remove"-function but it was
buggy (crashed after a few thousand instantiations/deletions but more
unfortunately, i have lost the code)

you can control a subpatch <subpatch> by sending messages to
"pd-<subpatch>". to make it pop up, send it a "vis 1" message, and guess
what you have to do to make it vanish ?? (hint : "vis 0")

#N canvas 266 171 450 300 10;
#N canvas 205 134 600 400 my-subpatch 0;
#X restore 126 205 pd my-subpatch;
#X msg 31 104 \; pd-my-subpatch vis 1;
#X msg 191 103 \; pd-my-subpatch vis 0;
#X text 41 84 pop-up;
#X text 194 85 close;

by the way (especially for miller):
what is the proper way  for creating controllable local subpatches ?
meaning: i am having an abstraction including a subpatch, which i would 
like to control (for drawing scalars, automatic object
generation). unfortunately i would have more of these abstractions
(because they are s cute) in a meta-patch.
how should i handle this ?
creating a subpatch "pd $0_sub" and controlling it via the object name
"pd-$0_sub" (a bit complicated to create with makefilename but
possible) works only so long, as i am not saving this abstraction and
reusing it in my meta-patch.
(funny thing: when creating (in edit mode) a subpatch "pd $0_sub" the $0
will immediately appear replaced by its integer representation
(pe: 1003) in the header-line of the subpatch-window. when saving the
abstraction and using it, this replacement does not take place !)
the only way would be to use the "namecanvas" object within my subpatch
(call the subpatch "sub" and insert a "namecanvas $0_sub", and address it
with $0_sub, which by the way, is far easier to do than to address
but as i understand all the warning messages, i am strongly discouraged to
use the "namecanvas" (obsolete,...)
i hope that though the "namecanvas" is obsolete, it will never be removed
from pd's functionality (since it would break many of my patches)

> where can i find more information about it ?
> by the way, i'm very interested about how pd work.
> where can i find documentaion about it ?
> what are the most importants files in the code ? 
> thanks.
> Damien HENRY.

More information about the Pd-list mailing list