Ableton Live API in Node for Max JS Script

Nao Tokui's icon

Hello,

I've been working on an Ableton Live Device using Node for Max.
My question is: how can I access Ableton Live API from my Node.js script?

In js object, I can call new LiveAPI(this.patcher, "live_set");, for example. But apparently, it didn't work in node.script object.
Is there anything like this?:
const Live = require('live-api');

Thanks in advance!

Florian Demmer's icon

Hi Nao,

[node.script] and the [js] objects are not alike and the [node.script] does not have access to the Live API. If you need access to these u have to either use it in the [js] object or implement some layer in between that translates and sends/receives the Live API interactions to and from the Node.JS process.

Hope that helps
Florian

Nao Tokui's icon

Thank you, Florian.

That's exactly what I wanted to know. Appreciated!
Best,

Nao

Giovanni Allegri's icon

or implement some layer in between that translates and sends/receives the Live API interactions to and from the Node.JS process.

Florian, I guess you mean passing messages between the two inside a patcher, right?

Florian Demmer's icon

Yes that's what I was referring to.