Need help with my Simpler-Map (LOM-IDs, names etc.)

nckn's icon

Hey guys,

here is what i'm trying to accomplish:
I want to have a Instrument Rack full of simplers. This is my workaround for the lack of Abletons possibility to dynamically change the sample inside simpler.
But then i want to have a custom mapping on my remote SL 37 where i have near complete control of all the Simplers parameters.
I want to dynamically add and remove simplers as time goes by and don't want to lose my custom midi-mapping.

so here is what i thought to do with max:
create a maxpatch, that "duplicates" all of simplers knobs and faders, that automatically maps itself to the currently selected simpler. my "hardwired" midi-mapping then goes to the max-device and i will never spoil my midi mappings again or have to do it a thousand times … 

if you now think: "why the hell is he thinking so complicated?", please nudge me in a simpler direction ;)

this is kind-of my first max-project, so it has been a tough journey learning all the basics while going, but having this clear goal helps me to push through.

basically what i first did is for every parameter having a seperate live.path call and seperate live.remote going on.
my path isgoto this_device canonical_parent devices 1 chains $1 devices 0 parameters 3
where $1 indicates the active chain.

Now, what i encountered about Parameter IDs:
For me it would have been obvious, that for example SStart always is parameter 3, while VeAttack is always parameter 26.
But it turns out, that this is not the case. parameter 23 can be totally different Knobs, seemingly random.

In the reference for the LiveAPI/LOM i read that the parameters are identified by their names.
The point where i'm stuck now is:
how do i select a parameter via its name when all live.path is taking as arguments is IDs?

do you guys have any ideas for helping me out?

thanks,
niklas

Lee's icon

There is no direct way to do this, other than iterating over all the parameters for a device and fetching the names, thus determining which parameter has which ID. Check out the M4L.api.GetAllDeviceParameterIds.maxpat and M4L.api.GetParameterNames.maxpat abstractions.