We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › maxlink + arrays/lists
Page Index Toggle Pages: 1
maxlink + arrays/lists (Read 976 times)
maxlink + arrays/lists
Jun 12th, 2007, 4:04pm
 
hey all,

been playing with processing for a few months now, and finally getting somewhere with my pictures and visualisations - though a few things have made it necessary for me to venture onto this board.

at the moment im writing some max/msp programs to do some audio work, though i've been captured by the beauty of processing visuals, along with my habit of trying to learn many languages at once..

im trying to load a list of max numbers (256 values) from max into beginShape() as vertices. as i understand it isn't really possible to load a list directly, but if i paired every value with an index, would it allow me to direct each value to fill the appropriate vertex()?

2 ideas spring to mind:

firstly to use OSC messages instead of maxlink, as it allows more complex groups of data (though i am probably underestimating maxlink).

and secondly, to embed the sketch in a max .mxj object. im afraid this option, whilst allowing more direct connection with the sketch (i believe), is a little beyond my knowledge of the language and the .mxj object in max. perhaps someone has some suggested reading, though im sure the answer is the java section of the max manual... that thing is inexhaustable..

if anyone has thoughts/ideas, i'd love to hear them.
trent
Re: maxlink + arrays/lists
Reply #1 - Jun 12th, 2007, 5:34pm
 
one simple solution is to pack your 256 values into a single message (say, a comma-delimited string).

i've played around a bit with embedding sketches in max. it's possible, but it's a little hairy.  the main problem, in my experience, is that max has its own thoughts about priority, which makes it hard to maintain a consistent frame rate.

also, you'll still need some way to communicate with the sketch, although it is simpler to avoid the networking aspect.

i'd try the string packing method, and see if that suits your needs. stringbuffers and stringtokenizers are your allies, here...
Page Index Toggle Pages: 1