Forums > Javascript

Accessing a table or coll from javascript


Lee
May 13, 2012 | 3:47 pm

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


May 16, 2012 | 9:19 pm

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.



Lee
May 21, 2012 | 12:04 pm

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



pid
May 21, 2012 | 6:45 pm

you need

Dict

you can use Dict directly in js.


December 20, 2013 | 6:18 pm

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?


December 21, 2013 | 12:15 am

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


December 21, 2013 | 4:12 am

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.


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