Changin colors in multicolor mode

Discuss Lemur and share techniques.
Post Reply
gumbomasta
Newbie
Posts:5
Joined:02 Jan 2012 14:57
Changin colors in multicolor mode

Post by gumbomasta » 04 Jan 2012 02:00

I have a 1x8 Switch object that Im using for a custom step sequencer. I want the first and fifth buttons to be a different color denoting that they represent downbeats. Switching my switch array to "multicolor" mode in the properties window leaves me to believe that it is possible to change just these two switches within the array, but I'm not sure the implementation. Any ideas?

Thanks!

highmountain
Newbie
Posts:21
Joined:13 Dec 2011 05:52

Re: Changin colors in multicolor mode

Post by highmountain » 04 Jan 2012 02:39

Multicolor is not very user friendly at the moment, so let me give you a really easy option that you can use if you aren't using the light values for anything else. Just setting light to {.5, 0, 0, 0} will highlight the 1st, 5th, 9th, 13th, 17th, etc pads by making them a little brighter than the others.

Okay, here's the multicolor explanation. It's not too hard, it's just a little ugly and opaque if you don't already know what to do. Turn multicolor on, and add a script to your switch object. You can name it whatever you want. Set the script execution to "on load." In the script, put this:

Code: Select all

decl base = (64 * 65536) + (64 * 256) + 64;
decl highlight = (127 * 65536) + (127 * 256) + 127;
setattribute(getobject(), 'colors', {highlight, base, base, base});
The "64"s and "127"s you can change to any number between 0 and 127 to control red, green, and blue levels (in that order from left to right). Don't touch the 65536 or the 256, or your color combinations will become unpredictable.

As with the lights, the pattern you set will repeat itself if it is shorter than the actual number of pads.

mbncp
Regular
Posts:87
Joined:08 Dec 2011 07:25

Re: Changin colors in multicolor mode

Post by mbncp » 04 Jan 2012 08:12

highmountain wrote:As with the lights, the pattern you set will repeat itself if it is shorter than the actual number of pads.
But doesn't work with multi labels, you really have to fill them all. :(

Btw, you can use RGB(r,g,b) to declare colors:
decl base = RGB(64,64,64);
a bit easier to read, imo.

Glennzone
Newbie
Posts:24
Joined:18 Jan 2013 22:16

Re: Changin colors in multicolor mode

Post by Glennzone » 07 Oct 2013 13:22

So, if you were to go one step further and submit a "command" via OSC, would you send the script object the vector as "highlight, base, base, base, base" (for a phrase of 5 rather than 4) ?

The situation I'm working with is somewhat different, but i expect this same technique will work for me as well. I will go for the r,g,b sub-array usage to set the colors.

Thanks again for the insights.

Post Reply