Display program name in a fader or monitor

Discuss Lemur and share techniques.
bammer
Newbie
Posts:11
Joined:27 Dec 2011 20:57
Re: Display program name in a fader or monitor

Post by bammer » 10 Jan 2012 15:05

I fixed it for you --- sort of. But it's limited to 52 items and I added a little thing to make the fader and text box follow each other but I've somehow gotten it backwards. lol.
I imagine there is some sort of an array that could be implemented for a more graceful solution here but I have no idea how. :mrgreen:

I have never gotten the == compare to work.
I used >= or <= and it works.

To get around the 0-1 fader output, I just divided each discrete Fader.x output by 128. (0, 1/128, 2/128,3/128, 4/128 etc)

Code: Select all

if(Fader.x<=0)setattribute(Text,'content','1');
if(Fader.x>=(1/128))setattribute(Text,'content','2');
if(Fader.x>=(2/128))setattribute(Text,'content','3');
if(Fader.x>=(3/128))setattribute(Text,'content','4');
if(Fader.x>=(4/128))setattribute(Text,'content','5');
if(Fader.x>=(5/128))setattribute(Text,'content','6');
I also discovered (hopefully I messed up somewhere and it's not so) that the limit on the amount of if's in the script is for 52 items in the text box.
Also, the script window grays out legitimate text after about 24 lines but it still functions.
I got it to work to a point.

However, can someone help me, too?
I included a text box that follows the fader as it goes up and down but it does in the opposite direction. How do I get the text box to remain next to the fader knob as it goes up and down?
protocol wrote:The last suggestion is creating a lemur menu and having that have selections of a given name, that way when you select things it will send out a value and be associated with a name instead.
But a menu won't work for 128 items. It only shows 32 max, iirc. Is there a way to link up about 4 menus conditional on what the Fader.x output would be? That would help in another sticky mess I've gotten into. Wait. I bet there is. Just set four different ranges to go to their respective menus.
Attachments
aaafader_tweak.jzml.zip
(1.23KiB)Downloaded 165 times

jojokrok
Newbie
Posts:20
Joined:04 Jan 2012 10:19
Location:Plombieres Belgium

Re: Display program name in a fader or monitor

Post by jojokrok » 11 Jan 2012 05:31

Thank you Bammer that to play the game with us.

I gonna try your idea. About the IF´s is this very weird.I hope you made a mistake. :D
The menu, I do not want to use, course I want the result with the faders.
In anyway..Gonna try it now.
Thanks in advance

PS IF THERE IS SOMEBODY OUT THERE WHO WANT TO HELP US!!
Y O U _A R E _W E L C O M E

areyes1038
Newbie
Posts:1
Joined:11 Jan 2012 04:21

Re: Display program name in a fader or monitor

Post by areyes1038 » 11 Jan 2012 07:30

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:
templates.zip
(2.73KiB)Downloaded 193 times
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.

jojokrok
Newbie
Posts:20
Joined:04 Jan 2012 10:19
Location:Plombieres Belgium

Re: Display program name in a fader or monitor

Post by jojokrok » 11 Jan 2012 10:56

Hi areyes

Thank you very much For this splendid info.
This is exactly what i needed. Now I can go on and make my faders with my progchanges. To beautifully..
O yes, BTW.. I only need an array of 44 values. So no problems anymore for me.

My Shruthi gonna be Happy.

When I finish my project, I will post it. So now I go to work on it. Still a lot to do.
I think bammer gonna be happy to
Have a nice day my friend.

BTW. Why I can not make a account by jazzmutant...They Close??? :?:

Macciza
Regular
Posts:1325
Joined:07 Dec 2011 04:57
Location:Sydney, Australia.

Re: Display program name in a fader or monitor

Post by Macciza » 11 Jan 2012 11:32

Hi All
Interesting little prob - I came at it from the array side of things , set up an array and index into it . . .
Unfortunately there seems to be limits to array size that stopped me below 30 . . .
But it provides a neat solution by calling a single subarray of the main array at chosen index . . .

Probably best to wait till arrays are larger though I guess it could still be scripted as is . . .

Cheers
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]

kraftf
Regular
Posts:124
Joined:14 Dec 2011 06:36

Re: Display program name in a fader or monitor

Post by kraftf » 16 Jan 2012 01:24

Guys the only way for now to efficient is to split strings with items that are equal or less than 20.
Have a look at this voice select patch I am working on for RS7000.
There is a Pads object for selecting program banks and a multislider for selecting the program.
Only the GM and Synth&BassLead1 banks are working in terms of displaying the patch.
Hope this will be helpful for you.
Cheers
Kyros
Attachments
VoiceSelect.zip
(3.84KiB)Downloaded 164 times

st8_livecontrol
Regular
Posts:83
Joined:04 Oct 2010 12:26

Re: Display program name in a fader or monitor

Post by st8_livecontrol » 16 Jan 2012 07:03

Heres another way to do it, add a new multiline script to you fader with trigger expression = x

val = floor(x*127);
decl names = {'Piano', 'Guitar', '...', '...'}
setattribute(getobject(), 'label', names[val]);

In response to why other things dont work:
== with floats is probably due to rounding errors, you should compare differences with floats rather than absolute values. I'm not sure what the precision on the lemur is.

Macciza
Regular
Posts:1325
Joined:07 Dec 2011 04:57
Location:Sydney, Australia.

Re: Display program name in a fader or monitor

Post by Macciza » 16 Jan 2012 07:18

Hi
st8 - Yes that is the ideal / proper way to do it . . .
These are solutions developed to get around the array size limit - can't make an array to hold all 127 strings atm . . .
Number of strings possible limited depending on char count of strings involved . .

Cheers
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]

kraftf
Regular
Posts:124
Joined:14 Dec 2011 06:36

Re: Display program name in a fader or monitor

Post by kraftf » 16 Jan 2012 09:54

Macciza wrote:Hi
st8 - Yes that is the ideal / proper way to do it . . .
These are solutions developed to get around the array size limit - can't make an array to hold all 127 strings atm . . .
Number of strings possible limited depending on char count of strings involved . .

Cheers
MM
Yeah its possible that the number of arrays will be cut out.
However regarding my template for RS7K I will be probably stoped by the 512k file size limit.
Such a pity to have plenty of RAM in iPad not utilised by Lemur.
Were these limitations also valid for the original Lemur?I know its memory was 4Mb which was ironcally more than the current 512k!! :shock:

Macciza
Regular
Posts:1325
Joined:07 Dec 2011 04:57
Location:Sydney, Australia.

Re: Display program name in a fader or monitor

Post by Macciza » 16 Jan 2012 10:44

Hi
Congrats on your solution rather than letting these things limit you - good effort . . .

Yes these were/are the limits to the hardware Lemur - 512k per project . .
Probably not noticed/got overlooked during the updated to a Liine product . . .
But I believe they are working on these various issues (filesize/arrays) for an update, due soonish . . .

I think there is a way around the 512k limit but it involves text-editing the jzml, but not as simple as a cut and paste . . .
You would need to paste stuff in the right spot and edit id numbers for objects etc etc - may end up a bit messy and only half work like it did for me . . .. . .

I'm just going to wait until after the first update or two - which should hopefully solve many of these 'teething' issues -
And I am hoping to see some completely new features before too long as well . . .

Cheers
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]

Post Reply