Hey jojokrok,
I'm trying to tackle a similar multi-label task building a DSI Tetra template using NPRN based on others postings.
The objective is simple...select a value from a list of 48 modulation destination parameters and have a monitor display the text equivalent. Initially, I thought of using a menu, but it has a limitation of 32 items in the list. I tried using a bank of 48 switches, but the editor kept crashing once I started applying multi-labels using an on load script.
So I decided to use three menu objects and used three pads to show/hide the different menus. This might be a workaround for you, so that you can split the preset selection into various banks and select the presets from the corresponding menu. You'll need to adjust the value of the preset you select by adding 32, 64, or 96 to value selected in the corresponding bank.
Initially, I thought of using a knob or fader to select the modulation destinations, but the thought of using that many 'IF' statements to display the corresponding value just seemed too inefficient. I'd like to see a menu object that can handle 127 values and better yet, the option to break the menu into multiple rows/columns, so that it still fits within the iPad screen.
I took bammer's code and modified it a bit to fit my NPRN-based Tetra template, which does the trick, but it's still not as efficient as showing a bank of parameters to select from. I'm not a scripting guru, so if there is an efficient array-based method of doing this within Lemur, please post it.
Keep in mind that I'm working with NRPN values, but is should be easy enough to adjust for your needs. Also, I only need an array of 48 values, so this may not be an option for you since you need to handle 127 values and just like the menu and multi-labels objects, there are some limits.
The main changes to bammer's script are:
1. I used the range function to stretch the value of Fader.x into 48 segments (in your case it would be 127)
value=range(Fader.x,0,48); //splits the fader into 48 segments
2. In order to have the text value follow the fader, I used the y variable to anchor the starting point at the bottom of the fader and as the fader slides up, it subtracts the y-axis value using the same range function.
y=420-(range(Fader.x,0,400)); //the value 400 is a guesstimate to the actual height of the fader object
3. In this example, I'm displaying the numerical value of fader.x and text description using two lines in the script
setobjectrect(Monitor2,{140,y,20,20});
setobjectrect(Text,{160,y,120,20});
I also included a template showing my initial multi-menu object approach.
Here is the attachment:
My options so far are:
1. Use a menu object but it can only handle 32 items, unless I split the selection into multiple menu objects.
2. A bank of switches with labels was my next option, but it crashes the editor
3. A knob or fader with if statements to display the corresponding text values, but that's a lot of IF statements when you consider 4 LFO's and 4 Modulation sections.
I'm going to continue working with options 1 and 3 and see how they integrate with my workflow.