Re: array

Forums > MaxMSP > array
October 12, 2010 | 6:27 pm

I’ve always thought that a "fast and simple to use" multi-dimensional array object was missing in max, through one can also use :

- [jit.matrix]
- [fmat] (installing ftm/gabor free ircam package)
- or maybe even the new [polybuffer~] object perhaps, if it can be used with [peek~], i don’t know..
( )

Here are some storing/reading arrays examples that i made 5 years ago: "Efficiency-test-on-arrays.maxpat" in attachment.

[coll] is not really an array but a ‘collection’, and it can get really badly unefficient when using lots of datas (for example gestures datas), through, for musical chords, it could be fine, but hmm…

…on my 2,4Ghz macbookpro, if using a list of 5000* 4-notes-chords, i can only read 5 chords in a [coll] in one millisecond** : 1 millisecond, that’s still 2400000 cycles… i’m REALLY wondering what is [coll] doing during 2400000 cycles instead of looking for my 4*5=20 notes… this is 120000 computer cycles to recover one single value! Is [coll] playing cards with itself ??

*using a list of 2000 4-notes-chords is 4 times less slow… [coll] slowness is exponential to its size, as all ‘collection-type’ datas, i guess…

** using [fmat], [jit.matrix] or [buffer~] to store/read arrays is about X20-X100 more efficient than a [coll] of 5000 lines. (while using arrays inside Java or C routines is around X15000-X30000 more efficient compared to a [coll] ] of 5000 lines. (!) )