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.
__ __
Frank Barknecht ____ ______ ____ __ trip\ \ / /wire ______
/ __// __ /__/ __// // __ \ / / __ \ ___\
/ / / ____/ / / / // ____// /\ \ ___\____ \
/_/ /_____/ /_/ /_//_____// / \ \_____\_____
/_/ _\