/live/scene/fire_as_selected not working as expected?
@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...
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.
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?
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.
/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.
Is there a way to select a scene, like /live/scene/select ?
Not super important though.
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