Passing multi-dimentional arrays in PD? WAS: Re: {Spam?} Re: [GEM-dev] curve3d acts very very odd with lots of control points OSX+Linux)

james tittle tigital at
Sun Jul 24 17:35:38 CEST 2005

hey ya'll,

On Jul 24, 2005, at 10:10 AM, B. Bogart wrote:
> For this application I would be happy with a something like a
> "multipoly" object that allows many many faces to be rendered and
> seperatly controled. Though nice smooth bezier curves would be very  
> nice.
> I think that this is a general problem though, efficiently controlling
> many many points in PD. I'm not sure what the approaches are. Maybe  
> the
> fastest would be to have three signal inputs where each signal is a
> super-efficient stream of X,Y,Z then that would be hard to sync
> perhaps... Or the possiblilty of some kind of matrix type in PD  
> which is
> perhaps a multi-dementional signal. (Now this is what numarray  
> does, and
> the new VASP will pass pointers to these numarrays and be very fast)
> numarrays are multi-dimentional.
> Is one long list of points faster than a bunch of simpler individual
> messages?
> In vertex arrays (Chris, correct me where needed) I think the  
> problem is
> that the current objects are very easy to control and very fast BUT
> since the arrays are in C we still have to use PD messages to control
> them. Looks like the approach in vertex_arrays is to have one message
> control multiple vertexes. Problem with this is that you loose the
> individual control (rather if you had a range of vertex 1 to 1 then  
> you
> would be back to the same problem of many many messages). I posted  
> some
> ideas about more complex ranges, and the ability to rotate/ 
> translate/..
> vertexes based on their normal rather than global axes.
> I have to say using python numarrays has been very satisfying in terms
> of how efficient it is to create arrays of messages [set 0 0 -4 -4  
> 0< to
> [set 100 100 4 4 0< but perhaps this is not really all that much to do
> with Gem and a general PD soultion to creating such things would be
> better. I find using "repeat" still awkward myself...
> I'm also looking forward to doing things like matrix rotation,
> convolution etc in numarray...

...ok, I'll have to jump in here and say that you are basically  
"rediscovering" many of inspirations that brought about the whole  
vertex_array stuff...the good news is that there is already something  
of a solution to your problem:  the vertex_array tag has two  
interesting objects not well known outside of the IOhannes and  
myself:  vertex_tabread and vertex_tabwrite... can probably guess that this allows reading and writing of pd  
"tables" or "arrays", and then efficient uploading of the data as  
vertex arrays or vertex buffer objects with [vertex_draw]...this is  
all very important to the "shapeSynth" that I've been working on:   
basically calculating shapes via iemmatrix ops and other goodies...I  
apologize for not making it more well known:  I'll try to get some  
patches out this week that demonstrate this kind of stuff, but I have  
some heavy early week deadlines that are looming atm...

more l8r!

More information about the GEM-dev mailing list