Accessing a table or coll from javascript

May 13, 2012 at 3:47pm

Accessing a table or coll from javascript

Hi there, does anyone know if its possible to access a table and/or coll defined in max from a fragment of javascript code? I’m looking for the javascript to be able to modify the contents without having to load it in from the table and then dump the modified contents out again.

Cheers, Lee

#63570
May 16, 2012 at 9:19pm

this is really needed information as is good reference of all max js. link to mozilla.org does not help much. I’m long term web-developer so js ain’t problem. My only problem is how to manage data with max objects with js.

#229136
May 21, 2012 at 12:04pm

I’ve moved all my datastorage into the js objects – makes it much easier to manage as can create proper structures.

#229137
May 21, 2012 at 6:45pm

you need

Dict

you can use Dict directly in js.

#229138
Dec 20, 2013 at 6:18pm

If there is indeed no way to access coll-data from javascript, what kind of speed drawbacks would i have if i replace the coll with my own storage in js?

Also: what is Dict? Is there some kind of special dictionary available on the js object?

#276342
Dec 21, 2013 at 12:15am

HI .
javascript is for relatively slow data io . you cant uzi it 1000 times or more without notice of a max/system hangs . it also needs more resources at that point . But if you will have relaxed data flow , you will actually benefit from it . In terms of structuring your data with code for dedicated scenarios . is a good idea . Dict also helps there . check help

#276345
Dec 21, 2013 at 4:12am

Im building an arpeggiator, and my plan is currently as follows:

- collect currently held notes in js
- also in js: reorder those notes and add octaves based on settings
- get them out of js, into a coll so i can rely on better timing when requesting them (with ‘next’ messages) by metro.

#276352

You must be logged in to reply to this topic.