ableton control surface script not in the same order as device parameters

grrrz's icon

I'm trying to make a little tool to display parameters on my phone with touch osc when I use a control surface with a remote script (I use a custom script made wit this tool, and also an launchkey mini mk3). I use the LOM and "live_set appointed_device parameters" to list the parameters (0 is bypass; then they're listed) with get name/get value. For macros and vst I have no issue and the numbers matches the banks of parameters the control surface picks up. For most of live devices though they don't match and have a specific mapping. Worst; this mapping depends on the controller I use (not sure if it's because I use a bank of 16 vs 8). What I get displayed is something like this . What I control with my 16 pots is completely different. sometimes the first few match then it's off. So basically there's an internal parameters order for remote control script for live devices that doesn't match the number sent. I haven't tried to use the id with live.remote but not sure it would be different; and I can't list the names anyway. There's a control surface part in the LOM but it has nothing on this (I can intercept the bank switch but that's all). I could maybe try to fake move every parameter in order to create a list of the internal mapping but that seem quite complicated. other option is to hardcode a list of parameter for each device; but that's a lot of work too; and it seems it's different each time.
does anybody have info on this; or did I miss something?
I see that softwares like preditor allows you to edit the internal live mapping but that's all; I wouldn't know how to access this from max for live.
thanks!

Mellon's icon

I'm doing a very similar project and ran into the same issue. There's a python script (.pyc) in the Live program folder Midi Remote Scripts/_Generic called Devices.pyc that details the parameter banks for every device. for every device there are 1-8 banks of parameters, and a "Best of Banks" bank (bob) that listst the parameters in the order we're used to seeing them. The MIDI scripts refer to this to get that info, and to me it looks like a series of dict objects could hold all the data, or one with nested dictionaries. below is a link to the remote script, decompiled for easy viewing.
https://github.com/gluon/AbletonLive11_MIDIRemoteScripts/blob/main/_Generic/Devices.py

Marc Assenmacher's icon

You already found the easiest way around this problem, which also gives you full customization of the order you want to use yourself:
Use Rack Devices and Macros 1-16.

Its more work on your set then programming max but brings you the most flexibility.

grrrz's icon

@MELLON
thanks; that's interesting; but what's weird is there doesn't seem to be an index linked to those parameters in banks; so I guess they're called by their parameter names?
My understanding is that the "BOBS" is used instead when you have only 8 macros without the ability to switch banks. The mapping actually makes sense.
Now I'm thinking the full mapping without an explicit display like the push is not super useful so the bobs system would make more sense. Or develop a full push like interface (the category sysem can be useful).
Basically the solution to all of this would be to make a correspondance table in a text file / coll; find the name of the device and apply the map. That's a bit of a task.

@ Marc Assenmacher
I'm making this as a composition aid; so the idea is to insert any effect / instrument and be able to use it immediately. racks are not super useful in this context; they lock the parameters so you can't use preset from instrument; you'd have to save them separately. maybe a few racks for most used tools why not. I also plan to use regular mappings from vsts by the way. If I'd want to use one or two parameters; or if I'd want to make a full set for a live; I'd simply use the standard mapping in live like I've always done, I don't really see remote script as being of any use for live performances anyway.

grrrz's icon

I've ended up getting rid of the control surface script entirely and using midiin so I get direct access to the banks. I'm still considering making custom mapping for some of them with a coll table i a text file. Only drawback is I can't lock the plugin using the "lock to" feature and I'd have to program something for this (which isn't easy since I use the appointed_device object for everything in this patch.
This is getting to be quite an elegant solution; at least for non ableton plugins; 16 parameters par bank; controllable either via touchscreen or with the controller with feedback on the screen. I have a separate volume device with about the same feature and I'll probably end up merging them. I'm also planning to
I also miss a way to get the units/symbol value for each parameter so I can see what exactly I'm controlling. I'm considering getting a midi fighter twister for instant recall but even with standard pots it works pretty nicely with the screen