Bach.roll, Bach.score: access to preset data by javascript like maxobject preset

Discussions, advice, bug reports and much more about the "bach" environment.
Post Reply
sydy
Posts: 155
Joined: Tue Mar 21, 2017 1:34 pm

Bach.roll, Bach.score: access to preset data by javascript like maxobject preset

Post by sydy » Wed Jul 29, 2020 2:49 pm

Hy Daniele, Hy Andrea,

As we're still stuck with the pattr-pattrstorage-story I'm doing experiments with javascript and bach.shelf in order to find, at least for non-realtime-stuff, some kind of data-parsing-storing structure. Javascript has full access to nearly all maxobjects and you can set, output data from a script – without touching any spaghetti...

I'd love to do so with a bach.roll or a bach.score. Unfortunately this is not possible. But it seems that the max-preset-object can access to a special set of data (from a bach.roll, score, slot) which then is saveable as json.

Here's finally my question: could you make available for JS that same set of data (dataset given to maxobject preset) ?

That would actually allow me to acquire the preset state of all objects in patch in one single operation and reparse it after.

Thanks in advance.

danieleghisi
Site Admin
Posts: 1347
Joined: Fri Dec 03, 2010 1:25 pm

Re: Bach.roll, Bach.score: access to preset data by javascript like maxobject preset

Post by danieleghisi » Fri Jul 31, 2020 11:02 am

Hy sydy,

I have no Idea on how to do that. I'll talk to andrea who knows probably more than me about this JS stuff, and especially whether there's a 3rd party api to do that. Or perhaps anyone else has an idea?

The preset support has nothing to do with JSON, the implementation of preset compatibility (via Max SDK) it's actually done via the standard Max A_GIMME datatypes.

Can you perhaps send me, even privately, a snippet of the code that already works for other objects? Again, I'm no expert in Max+JS stuff.

Daniele

Post Reply