M4L.api.SetSelectedSceneIndex only goes up to 127?

Mar 31, 2011 at 7:23am

M4L.api.SetSelectedSceneIndex only goes up to 127?

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?

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

– Pasted Max Patch, click to expand. –
Mar 31, 2011 at 6:32pm

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.

Mar 31, 2011 at 8:28pm

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!


– Pasted Max Patch, click to expand. –
Apr 1, 2011 at 7:00am

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


Apr 4, 2011 at 11:28am

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!


You must be logged in to reply to this topic.