On Tue, Dec 25, 2001 at 08:25:50PM +0100, Frank Barknecht wrote:
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.
OK, so if I understand this, we can't create tables on the fly, since the table object only tells us about tables that are created when the patch is first opened. (Although I'm curious about the use of the "$0-table" in the test help patch at http://iem.kug.ac.at/mailinglists/pd-list/2001-09/att-0129/01-table.pd )
So maybe I should create a patch (or sub-patch) that contains, say, 100 table objects named 1-table through 100-table right at the start, then use them as I need them, passing the numbers 1-100 into what ever references them as needed. For the current purpose, I think reusing them after I run out shouldn't be a problem.