Alternating Colors for Clips in Arrangement View

KRAWALI's icon

Hi,

I'd like to create a M4L device that allows me to select two colours from Live's colour palette and then colorizes all clips on the track the device is inserted on by alternating between those colors. I plan to use this in Arrangement View.

The idea is to be able to see quickly see where a clip ends and the next one starts, resulting in something like this:

Can anyone give me a few tips how to go about this?

Thanks and best,
Karan

TFL's icon

It is definitely possible since Live 11 by querrying "arrangement_clips" to a track to get a list of all its clips in the arrangement view, then using some list manipulation you can alternately change the color of these clips with the "set color" or "set color_index" messages.

To choose the color, I see two approaches:
- Either fill 2 umenu or some custom object with each of the available Live colors through color_index (to my knowledge that would require to first query the rgb code of these color_index to actually be able to represent them in Max)
- Do some automatic color operation, like: get the track's color in rgb (that's your first color), convert it in hsl, get the opposite color (add 0.5 to the h value), convert back to rgb and you get your second color.

Unfortunately I only have Live 10 so I cannot do some testing in arrangement view. But I could do some testing regarding colors if needed.

KRAWALI's icon

Thanks for this reply, exactly what I needed :)