M4L.api.SetSelectedSceneIndex only goes up to 127?

joao's icon

I'm trying to set the selected scene to a specific number, to help me navigate through my set. It was working swimmingly until my scene count went above 127.

Is scene index limited to 127?

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

This is my patch, the part in blue being the questionable:

ShelLuser's icon

Not dissing them but this is another example why I don't use abstractions other than example purposes and create stuff myself.

Control double-click on the abstraction (or use right click; then Object -> Open) and check out the patch. As you can see it uses integers (right at the top; "t b i" as well as the 'int' object).

One of the caveats of using integers is its maximum value. The range goes from 0 to 127. I only glimpsed at this; but I think that's causing your problem.

Not planning on rewriting abstractions here, but lessee.. you want to provide a number after which that specific scene should be selected? Lemme rig something up.

ShelLuser's icon

Right, after a good meal here's the patch I promised.

Due to time constraints this evening I haven't included any fail saves but did leave my "scene_observe" subpatcher in there (so: this is an optional object, you can leave it out). It basically keeps track of the currently selected scene and the maximum amount of scenes and puts these values into separate value objects. Keep in mind: with a max. amount (buffer) of 1024.

Alas, now for your solution, you can see it put to work immediately, I tried with a live set containing 349 scenes and it works normally.

The theory is simple; the path to a certain scene is basically the scene number minus one. After all: scene 1 can be accessed using "live_set scenes 0". That's basically the main theory I'm using here.

Hope this helps!

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

`

joao's icon

You are my king and my savior! I'm going to go look at this now.

Thanks!

joao's icon

Hey ShelLuser, just wanted to let you know that was exactly what I needed. It seems there's something fundamental lacking in my understanding of the LOM. I tried for days to get that simple solution.

Thanks again!