Cycling74 / max-sdk

Software Development Kit for Max by Cycling '74
Other
262 stars 57 forks source link

Access to LOM (Live Object Model) #65

Open 0x01011970 opened 6 months ago

0x01011970 commented 6 months ago

Hello,

Is there any provision to access the LOM using C / C++ code when developing an external using this SDK ?

Something that would provide similar features like the The LiveAPI Object provides in javascript.

Cheers

jeremybernstein commented 6 months ago

These APIs are currently private and probably will remain so for the foreseeable future. What are you trying to do?

0x01011970 commented 6 months ago

Thank you for taking the time to answer.

I would like to develop an external in C or Rust (using https://github.com/Cycling74/median) that allows me to directly access the LOM : reading properties, updating some, subscribing.

I understand I can use "live.object" or the The LiveAPI Object and even a combination of an external and these two max objects.

But it would be less convoluted to be able to directly access the LOM in a C/Rust external :

I could probably build better arguments but if it's a company policy my one voice may not do much.

jeremybernstein commented 6 months ago

Couple of things: working with the LOM API from C is just as complex, if not more so, than from JS, since there is a fair amount of object management and message/state routing to deal with. JS hides quite a bit of that from you.

The LOM API is main thread only, that's an Ableton limitation, so if you expect to improve performance or execute background tasks, you're out of luck.

In short, it's not something we're eager to open up, and we'd need to do a lot of work to make it suitable for external use. If there are tasks which are annoying in JS we could help out with, in terms of building higher-level access or similar, please let us know.

0x01011970 commented 6 months ago

Thanks for these added details.

To simplify this task, my first intuition would be to re-use and expose in the SDK the C/C++ methods that are currently directly behind the javascript layer. But maybe there is a technical reason why it would not be possible.

And it still would require a good amount of work for something few or no people requested.

Thanks for the explanations :+1: