Page 1 of 1

MULTILABEL: HOW DO I LABEL PADS?

Posted: 23 Jan 2012 12:13
by esegabbo
Hi, I was trying to modify some pads set in *radio* mode in order for each pad to have a different name and color. When clicking the option for multilabel and multicolor nothing happens. I looked up in the manual, yet it only mentions you can modify them but there is nothing concrete to work with to do so.
Any insight?
Thank you.

gabbo

Re: MULTILABEL: HOW DO I LABEL PADS?

Posted: 23 Jan 2012 13:49
by Macciza
Hi
Something like this

Code: Select all

decl this, red, green, blue, grey, def_col,def_lab;

this = getobject();

red = RGB(1,0,0);
green = RGB(0,1,0);
blue = RGB(0,0,1);
grey = RGB(.5,.5,.5);

def_col = {red,green,blue,grey};
def_lab = {'one','two','three','four','one','two','three','four'};

setattribute(this,'labels',def_lab);
setattribute(this,'colors',def_col);

Re: MULTILABEL: HOW DO I LABEL PADS?

Posted: 14 Feb 2012 22:15
by esegabbo
Hi, thanks for the response. Yet, that code you pasted ... I do not know what to do with it. Could you explain as if I was a 5 year old =) How would I go about labeling pads.
Thanks,

g.

Re: MULTILABEL: HOW DO I LABEL PADS?

Posted: 15 Feb 2012 04:13
by findbuddha
Step 1. RTFM
Step 2. Create a script under your pad object with execution set to 'on load'
Step 3. Modify Macciza's example as needed.

Re: MULTILABEL: HOW DO I LABEL PADS?

Posted: 15 Feb 2012 20:37
by whatisvalis
I've found the best way to figure stuff out is by looking at other templates. There are loads of templates that use multi labeled pads, just navigate to the object and copy/paste the script into your own template, making the necessary changes.

Re: MULTILABEL: HOW DO I LABEL PADS?

Posted: 23 Nov 2013 16:10
by phlange
If you were a 5 yr old, I would tell you youre wasting time coding scripts for a controller.
As colorful as Lemur is (and oooo, mau5 uses it), with TouchOSC you just put labels onto the pads and then MAKE MUSIC WITH IT a minute later.

Re: MULTILABEL: HOW DO I LABEL PADS?

Posted: 23 Nov 2013 16:31
by phlange
findbuddha wrote:Step 1. RTFM
Step 2. Create a script under your pad object with execution set to 'on load'
Step 3. Modify Macciza's example as needed.
Good job. Answer the question abbreviations and codes.

Re: MULTILABEL: HOW DO I LABEL PADS?

Posted: 25 Nov 2013 00:08
by Softcore
phlange wrote:If you were a 5 yr old, I would tell you youre wasting time coding scripts for a controller.
As colorful as Lemur is (and oooo, mau5 uses it), with TouchOSC you just put labels onto the pads and then MAKE MUSIC WITH IT a minute later.
lol.....You obviously havent yet understood the power of Lemur scripting. Download one of Antonio Blanca's Lemur templates and let me know how many decades it will take you to reach that level of interactivity with TouchOSC.

Re: MULTILABEL: HOW DO I LABEL PADS?

Posted: 25 Nov 2013 01:44
by electrofux
You need to understand how Lemur works with arrays. I am having a hard time with that too now and then. But once you understand it stuff gets easier.

A Pad of say 1 row and 4 collumns -lets call it Pad1- is essentially an array of single pads and so are its labels in Multilabel Mode.

When you setattribute (Pad1,'labels',XXXX) the XXXX stands for an array of labels.

So setattribute (Pad1,'labels',{'Filter','Oscillator','Effects','Routing'}) will lead to the 4 pads being labelled Filter, Oscillator, Effects, Routing.

you can also do

decl mylabels;
mylabels={'Filter','Oscillator','Effects','Routing'};
setattribute (Pad,'labels',mylabels)

Don't forget to set the script to something that makes the function to be carried out like "on load".