On Thu, Sep 27, 2012 at 07:53:11PM -0700, Jonathan Wilkes wrote:
----- Original Message -----
From: Miller Puckette msp@ucsd.edu To: Jonathan Wilkes jancsika@yahoo.com Cc: Hans-Christoph Steiner hans@at.or.at; "pd-list@iem.at" pd-list@iem.at Sent: Thursday, September 27, 2012 10:27 PM Subject: Re: [PD] arraysize WAS apt.puredata.info is back!
The [table] object could be vastly extended: [table foo] would be
equivalent
to [tab define foo] and you could say for instance, [tab define foo -struct my-struct -save -range 0 100]
If you're not requiring the user to name the array "z" and
requiring
"z" to have a float field "y" then you would need
[tab define foo -struct my-struct -array z -y y
where "-y" defines which field to use as the independent variable in the table (similar to "-y" in [plot]).
I'm thinking in the above that foo would be an array of items of my-structs, not a struct with an array such as 'z' inside it.
In that case would [tab write foo] take an index number in the right inlet and a list of field values in the left?
I haven't thought that one through yet. Perhaps it should just write a float or symbol to a field in the struct, i.e., [tab write foo a] would write to the field a, and the field name could default to 'y'.
One thing I'm struggling with is that the objects that access data structures are abstruse and hard to use. I think more and more that some sort of scripting facility would be the only way to make it easy to do tasks like simply counting the elements in a window that now require insane patches.
cheers Miller