LiveAPI observer for scene selection?

Nathan Wolek's icon

For a project, I am attempting to synchronize something outside of Ableton Live with specific scenes in the set. To do this, I have been digging into the Live Object Model and the implementation of the LiveAPI in Javascript.

I found an answer from Andrew Pask about coding a basic observer for volume, but when I tried to adapt it for observing the scene using

var liveObject = new LiveAPI("live_set scenes");

it fails to update with my selections in Ableton Live. It seems to report the correct id of the scene at the time it first runs, but then it never updates.

Has anyone tried something like this before? Any suggestions about how to code an observer for the current scene in Ableton Live?

-Nathan

Source Audio's icon

why java and not simple live.path -> live.observer object ?
I am not using Live at all, but helping someone out
took only few minutes to get live.observer
report current selected scene either by id, number or name

Nathan Wolek's icon

Javascript makes it easier for me to track changes using version control, since the live.path & live.observer object only work inside M4L.

On your advice, I tried the following collection of objects. It does not seem to report the current scene inside my Max for Live device.

Max Patch
Copy patch and select New From Clipboard in Max.

Any ideas?

Nathan Wolek's icon

Doing some more digging and found this M4L device from 2012 that fires scenes. Using their method, I can get the selected scene. It's not clear how I could make this an observer unless I do some sort of polling.

Even then, it is a selected scene and not one that has been fired. A fired scene will be selected, but a selected scene is not necessarily fired. Unless I am missing something?

Nathan Wolek's icon

OK, this solution works as a temporary measure. But I would still prefer to know when the scene has been fired, not just selected.

Max Patch
Copy patch and select New From Clipboard in Max.

Source Audio's icon

I used this in one project.
Am not Live user at all, maybe this can be done more effective...

Scene-Detector.amxd
amxd 50.23 KB

sending info out can be easily done, midi, OSC

I also could not find any way to get info on which scene is fired-
did read up and down the LOM documentation, nothing.
All that could be issued is if scene is triggered (blinking)
in idle time to fire in case firing is quantised and not immediate.

Nathan Wolek's icon

Thanks for this example. Seems to match what people were telling me over in the Facebook group. You can get the currently selected scene, but you cannot observe when a scene is triggered. Seems like a gap in the LOM implementation.

My thanks to Source Audio and everyone that offered input.

Nathan Wolek's icon

For archival purposes, here is the solution I created for getting the currently selected scene:

Max Patch
Copy patch and select New From Clipboard in Max.

schlam's icon

thank you Source Audio for your detector !