[PD] Arrays of arrays?

Frank Barknecht barknech at ph-cip.uni-koeln.de
Tue Dec 25 20:25:50 CET 2001


Joseph Zitt hat gesagt: // Joseph Zitt wrote:

> On Mon, Dec 24, 2001 at 09:57:39AM +0100, Frank Barknecht wrote:
>
> > "table $1-table" would just name the table's array depending on the
> > arguments in a calling patch.
> 
> Hmm. So what I'm wondering is this: could we put the table object in a
> chain, so that, for example, I could bang a counter, send the outlet
> of the counter into the inlet of a "table $1-table" object, and thus
> create new tables (1-table, 2-table, 3-table, etc) on demand as
> needed?

For creating table's on demand you will have to resort to the
self-modifing patches stuff, that you can find on the pd-wiki-page AFAIK. 

But I think you misunderstood what a [table $1-table] does. It is best seen
with an example patch, and so I attached one ;) It has a patch "mytable.pd"
that only has one pbject called [table $1-name]. The patch "test-mytable.pd" 
calls [mytable] two times with different arguments: "testtable" and "1".
Those arguments are then used by [table $1-name] to name the table array
to "testtable-name" rsp. "1-name". You can see this if you click-open the
subpatches and then the [table $1-name] object: Both have different names.

Tables are nice for modularizing your PD-code: You can create subpatches
for tables that you can put more than one time into you patches without
name clashes.

The table inlet is only good for messages, that set the table's array
values, give it borders or change the name.

Merry Christmas everyone and "Hoh-hoh",
-- 
                                                 __    __
 Frank Barknecht       ____ ______   ____ __ trip\ \  / /wire ______
                      / __// __  /__/ __// // __  \ \/ /  __ \\  ___\	
                     / /  / ____/  / /  / // ____// /\ \\  ___\\____ \	
                    /_/  /_____/  /_/  /_//_____// /  \ \\_____\\_____\
                                                /_/    \_\ 
-------------- next part --------------
#N canvas 223 242 450 300 10;
#X obj 159 87 mytable testtable;
#X obj 158 124 mytable 1;
-------------- next part --------------
#N canvas 258 269 450 300 10;
#X obj 123 108 table \$1-name;


More information about the Pd-list mailing list