Trying to launch the following scene automatically

Vincent Baglin's icon

Hi everybody,

I'm trying to do a simple patch to be able to launch the scene automatically using a midi impulse : the first scene is launched manually but at the end of the first scene, on a midi channel I put a midi note (C-2) to launch the next scene. I looked to the Live Object Model and found the right message to put in the live.object : "call fire_as_selected".
The first and the second scene are following in a good way but then it's always the second scene that is launched. And even if I launch the 4th scene, the second scene is played everytime.
I'm on Live 10, on a Macbook Pro 13" with Mojave.

Any idea ? Thank you so much!

Here is the amxd file.

PlayNextScene.amxd
amxd 6.18 KB

broc's icon

I think you need observing the selected_scene to apply the fire calls.

To keep it simple the patch below assumes that the first scene is selected but not launched. Then each note message will launch the following scene starting with the first. (If the first scene was launched manually the first note message will retrigger it.)

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

Vincent Baglin's icon

Thanks BROC for your reply. I continued to work on it and understood that the problem was coming from the path live_set scenes N.
Based on your patch, I will try to find a way to avoid the retrigger of the first scene launched and it will be exactly what I hoped! Not sure I will succeed but if I do, I will post it here.
Thank you so much for your patch it surely teach me a lot.

broc's icon

Notice that retrigger can be avoided if the second scene is selected when launching the first scene manually, and 'select on launch' is off in preferences.