AbletonOSC icon indicating copy to clipboard operation
AbletonOSC copied to clipboard

/live/scene/fire_as_selected not working as expected?

Open Coupe70 opened this issue 10 months ago • 4 comments

@ideoforms

I just tried /live/scene/fire_as_selected and think it does not work as it should.

It is supposed to fire the scene that is selected in Live (same as if I hit Enter on a selected scene in Live). So it should not be necessary to send a scene id as the scene id is already set by the selection in Live. But if I don't send a scene id, I get an error.

Example of what happens when sending a scene id:

  • I select scene 2 in Live
  • I send /live/scene/fire_as_selected [0] -> scene 0 is fired (same as with /fire [0]) and scene 3 is selected (as I have set "select next scene on launch" in Live preferences) What I would expect is the selected scene 2 being fired and (with my preferences) scene 3 being selected.

In the API documentation I see something about an argument 'scene', too,

fire_as_selected( (Scene)arg1 [, (bool)force_legato=False]) → None

but somehow it does not make sense to send a scene id...

Coupe70 avatar Feb 03 '25 16:02 Coupe70

Hmm, I wonder if this is actually an internal Live issue!? The LOM documentation says:

"Fire the selected scene, then select the next scene.
It doesn't matter on which scene you are calling this function."

But it seems that the call does actually honour the specified scene_id. Hmm. One of the principles I am applying throughout AbletonOSC is as much as possible to pass-through the design of LOM to the OSC interface, but this is a slightly perplexing one.

ideoforms avatar Feb 03 '25 17:02 ideoforms

The error I get when not sending a scene id is

Error handling OSC message: list index out of range

I guess that is an error message from AbletonOSC and not coming from Live, right? So maybe let's try to allow and call /live/scene/fire_as_selected without scene id and see if it works?

Coupe70 avatar Feb 03 '25 17:02 Coupe70

It's a good point, but the fire_as_selected method is specifically an object method that requires a Scene to operate on... so it can't be called without a target!

Instead, I've added a new method /live/scene/fire_selected, which takes no parameters and fires the scene that is selected in the view, before selecting the next scene. I think that probably does what is intended?

The only question is whether there should also be another method that fires the selected scene but keeps it selected.

ideoforms avatar Feb 03 '25 21:02 ideoforms

/live/scene/fire_selected works as I would expect it.

/live/scene/fire_as_selected is obsolete in my eyes - I can't see any use case for this strange behaviour.

The only question is whether there should also be another method that fires the selected scene but keeps it selected.

Whether this call selects the next scene or not is set in Live's preferences. Both settings are working as expected with /live/scene/fire_selected.

Image

Is there a way to select a scene, like /live/scene/select ? Not super important though.

Coupe70 avatar Feb 03 '25 22:02 Coupe70

Hey @Coupe70, just checked this out, and yes, you can do this to achieve the above:

>>> /live/view/set/selected_scene 0
>>> /live/scene/fire_selected
>>> /live/view/set/selected_scene 2
>>> /live/scene/fire_selected

ideoforms avatar Nov 17 '25 17:11 ideoforms