Changing live.menu items on the fly

Dan Nigrin's icon

I know I can change live.menu items with _parameter_range messages, like this:

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

But what effect will this have on Live, WRT parameter recall stuff, or any other badness?? I know Live generally doesn't like having parameters changed after initialization, but just don't know what the after effects might be if I do so.

Dan Nigrin's icon

Bumping my own question from a year ago - anyone have any insights on this one? The live.menu in question that I want to change dynamically will never be needed for recall by Live, MIDI-mapped, or anything like that. Will I break something by doing this type of thing? What are the risks?

The problem is covered in this thread that I just found, but again, no real clarification on what the risks are if using the _parameter_range method

tyler mazaika's icon

Hi Dan,

I suspect the kind of thing Live really might not appreciate is creating a new live.menu object on the fly, or deleting a parameterized live.menu with thispatcher scripting. But in this case you have one item and its object id stays the same even as you monkey with its range.

Real world, I just implemented this recently and have not had problems altering the menu items enum. However, in my case I'm always using the same number of items in the menu, so the selected index always remains valid.

Automation/Envelopes in Arranger view and Clips are both fine, and their contents restore fine when the Live set is reloaded.

It also works with 'Push 2' but after the live.menu gets updated I need to deselect and reselect my M4L device in order for the control to update as intended. Also appears ok with 'Touchable' iOS app.

Also it has rained neither cats nor dogs.

It wouldn't be hard to test recalling out-of-range indexes in clip envelopes / arranger automation. Generally though it seems to behave just as well as if you changed parameter_range on a live.numbox or live.dial.

Cheers,
Tyler

Dan Nigrin's icon

Thanks very much Tyler for the feedback. In my particular use case, I'll be deleting or adding one menu item entry, so the number of menu items will change. I guess I'll just have to try and see - your experience suggests that it should likely all be just fine... Thanks!

ShelLuser's icon

This is why I usually rely on umenu vs. live.menu whenever I need to apply something more dynamic. The advantage is that the menu can easily be used in the Live device but you won't be able to remote control it with a midi controller. But because of that the patch also doesn't have to update or refresh anything.

Of course the obvious downsize is that your patch will only be controllable using a mouse, but sometimes that's not a bad thing at all.

Dan Nigrin's icon

Thanks shelluser - I definitely see what you're sayin, appreciate the response!

Valiumdupeuple's icon

I’m also doing it like Tyler.
The trick I’m using to “dynamically” change the number of items is setting a large enough number of free “empty” lines in my live.menu. That works in my case as I know I won’t need more than e.g 10 items, but that might not be the best workaround if you don’t know how much of them you’ll need beforehand.

Dan Nigrin's icon

Thanks, good idea. I do know in advance the maximum number of menu items I would have. I would only have n or (n-1) items at any time.

So if I start with n items, and then reduce by one using the _parameter_range message, and then change back to n at a later time, that should be all good?

Valiumdupeuple's icon

I didn't try to change the parameter_range value ont the fly, but I suppose it'd work yeah.

Dan Nigrin's icon

Great thanks, will try when I get a moment. Appreciate all the input everyone!

Chas  Mo's icon

This is an old thread, but for anyone still interested, I can confirm that it’s possible to change live.menu enum values on the fly with parameter messages as long as you leave the number of menu items constant. I had the same issue Tyler notes, in which the dynamic changes won’t update to the Push without a manual deselection/reselection of the device. I emphasize “manual” because I tried doing the device selection with M4L and it didn’t have the same effect. I’m currently experimenting with then removing/re-adding the changed live.dial to the Push with live.banks changes to force the refresh, but so far it’s still loading the pre-update menu rather than the modified one. I’m hoping some fiddling with the order of operations for the menu change/device deselect/bank re-add might still work.

G C's icon

revisited this but ultimately same findings as before. Can swap object back and forth in a bank to update your menu or delete and recreate a bank with the updated menu, but cant change the length of the menu item range on push2

code for fun

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

h m's icon

Any new tricks on this topic?

I'm thinking about using a umenu with a live.number next to it in order to be able to automated it on live.