[PD] nubile young pd question

star morin shift8 at speakeasy.net
Mon Dec 16 21:57:09 CET 2002


hi - thanks for the reply - i was confused, but all better now.  once i
saved the subpatch and re-instantiated it as an abstract, it worked
fine.  

-star 

On Sun, 2002-12-15 at 17:02, Frank Barknecht wrote:
> Hi,
> star morin hat gesagt: // star morin wrote:
> 
> > hi all.  i'm fairly new to pd, and have a question along those lines:
> > 
> > i've created a 2 inlet sub patch called [vari-meter] to handle drawing
> > of arrays (or a metronomicly refreshed tablewrite~ for the pendants :^).
> > inlet 1 for signal, and inlet 2 for refresh speed. so far so good - it
> > works.  
> > 
> > i'd like to make the array name an argument to the patch to make it an
> > abstract, but can't figure out how to pass it. 
> >  
> > i've tried: [tablewrite~ $1] with a create of [vari-meter arrayname],
> > but $1 is null.  after reading some more of the docs, and it seems that
> > arguments given to abstracts are 'create parameters' - how do i access
> > these in a sub patch?
> 
> You can't! Subpatches - as in [pd vari-meter] - are an almost
> fullblown part of the surrounding patch, they just aren't visible (and
> might differ in blocksize).
> 
> Abstractions on the other hand - patches, that were saved standalone
> like in [vari-meter]  - accept the $1,... creation arguments. 
> 
> Attached are examples for both. Open the main.pd patch.
> 
> ciao
> -- 
>  Frank Barknecht                               _ ______footils.org__
> ----
> 

> #N canvas 162 146 542 348 10;
> #X obj 242 156 abstraction theDollarName;
> #N canvas 0 0 450 300 subpatch 0;
> #X obj 71 86 inlet;
> #X obj 71 124 t b;
> #X obj 71 156 symbol \$1;
> #X obj 71 190 print SubPatchCalled;
> #X connect 0 0 1 0;
> #X connect 1 0 2 0;
> #X connect 2 0 3 0;
> #X restore 241 212 pd subpatch theDollarName;
> #X obj 177 96 bng 32 250 50 0 empty empty Bang_This_And_Watch_Console
> -18 -6 0 8 -260818 -1 -1;
> #X connect 2 0 0 0;
> #X connect 2 0 1 0;
> ----
> 

> #N canvas 308 200 450 300 10;
> #X obj 71 86 inlet;
> #X obj 71 132 t b;
> #X obj 71 164 symbol \$1;
> #X obj 71 198 print Abstraction_Called;
> #X connect 0 0 1 0;
> #X connect 1 0 2 0;
> #X connect 2 0 3 0;






More information about the Pd-list mailing list