Forums > MaxMSP

tip on working with large arrays inside max?

Oct 30 2008 | 3:13 pm


After a longer absence from Max, i’ m finally getting back to realize a little project
with it, and i feel, i have probably one obvious and often answered question.

In the project i’ m mostly concerned with data structures, storing large arrays,
doing some math’s with it and so on. I thought i would use MSP buffers~ to store
everything as normalized floats (via peek~). This is very handy, clean, and fast, and allows
me to copy, store, read etc. the data conveniently and also, data input can be anything,
so this is about "generalization design and efficiency".

I don’ t need realtime support for the moment, just requesting data at a certain point.
Getting this data back into the Max Environment itself poses more of a problem…

(this is old Max 4.6, without Jitter, btw)

Example: i want to poll 8192 elements from some buffer and back into an array, list
inside Max, what is the most efficient way to iterate over a buffer~ data collection, collecting
and storing it into a list, an array? Should i use the table object (size limits don’t apply?)?
What is a good, lightweight data storage object for arrays in Max?
There is also a list size limit, preventing me to use large arrays in Max with most of the standard list objects…
or maybe mxj/java would be better at handling large collections? What is your recommendation
when working with large data collections (only floats) in Max?

Any tips are greatly welcome,



Oct 30 2008 | 3:25 pm

Just out of curiosity, why aren’t you using matrices
for what you describe?

Oct 30 2008 | 3:38 pm

Hm, well observed. I just found out i could use jit.matrix, jit.fill ect. (although i don’t own a Jitter license)…

Oct 30 2008 | 9:52 pm

d00d – time for Jitter. And, given what you
describe, maybe Max 5 as well [which pretty
much dispenses with the list length problems,
as well]….

Oct 31 2008 | 10:16 am

you’re very right, and works wonderfully sweet with those matrices, thanks.


Viewing 5 posts - 1 through 5 (of 5 total)

Forums > MaxMSP