How to display Ableton track colors on MIDI controller pads?

1.17K viewsCSS Questions
0

Hi,

Great to see 2.6 out of beta, thanks for keeping up the development!

Now with the new reactions working, is it possible to send the color of the track in Ableton to a controller RGB pad? I mean, pick up the color from Ableton, not write down manually a matching velocity value.

What I want to do is lay out all the tracks on my controller pads with their colors and then hit the pad to select the track. It is MUCH easier to select the right track when I can see the color. Counting tracks to find the right one from a bunch of identically colored ones is not really useful.

If it is possible now, I’d really appreciate some direction on how to do it… I’ve tried finding the functionality myself, but failed :-/

Cheers!

admin Changed status to publish May 22, 2024
Attached Files:
1 2 3 10 11
0

Yes you can grab a track’s color using the ‘color index’ value (which go from 0 – 69)
You can send this directly to your pad as the velocity value, but it would make more sense to map/convert it to the correct velocity value – which you setup in a Reaction.

If this would work for you, I can put a tutorial together on how to do it…

admin Changed status to publish May 22, 2024
Attached Files:
0

Awesome! So, I guess the color index is Ableton’s own way of referring to the colors? I have no clue how to do the mapping, so a tutorial or instructions of any kind (doesn’t have to be anything fancy) would be much appreciated indeed! Thank you 🙂

admin Changed status to publish May 22, 2024
Attached Files:
0

Attached to this post is a script (named: custom track colors) containing the completed reaction mappings which I’m going to explain in this tutorial.

Download and import it into Control Surface Studio, then you can drag and drop / duplicate them in your own script.

Overview of how this works:

  1. The Reaction ‘set pad 1 color’ listens for the color to be changed in track 1. When this happens, it saves the ‘color index’ value to modifier ‘m1’.
  2. The Reaction ‘Convert Track Color to Velocity Value’ listens for modifier m1 to be updated. Whenever m1 is updated, it checks the value of m1, and based on this value it sets modifier ‘m2’ to a certain velocity value.
  3. Reaction ‘set pad 1 color’ then sets the pad’s velocity value to the value of modifier ‘m2’

The track color index

Each option in Ableton Live’s track color selector has an assigned number from 0 to 69 (see the below image). These values are accessed using the track’s ‘color index’ (Live Object Model > Track > color index)

How pad LEDs work

To light up a pad’s LED, a MIDI velocity value is sent to it. The MIDI velocity range goes from 0 to 127. Each value in this range is used to display a specific color, for example, sending a velocity value of 50 to the pad will light the LED red. 

Keep in mind that every midi controller is different, the range of colors it’s LEDs can display and the velocity value used to display each color are specific to only that controller. 

So you will need a way to ‘map’ each color index value to a specific MIDI velocity value.

The ’Convert Track Color to Velocity Value’ reaction

Each Action block uses a condition to check the value of the m1 modifier, if the condition is met (for example: if ‘m1’ is equal to 14)  it saves the velocity value we want to send to the pad to modifier ‘m2’ (i.e. save 50 to modifier ‘m2’) and immediately exits the reaction at that point.

If the condition doesn’t find a match then it skips the action section and continues on to the next action block. This process continues until either a match is found or there are no more action blocks remaining to process in the reaction.

Abit of extra info about using conditions

You can of course set up the contents of your action blocks however you need.
The most simple way would be to have 69 action blocks, one for each ‘color index’ value. The chances are though, your pads aren’t capable of displaying 69 different colors, so you probably don’t need 69 Action blocks in the reaction.

Conditions are very versatile, allowing you to run your checks in many different ways. You can use multiple ‘and / or’ conditions in order to filter out exactly what you need.

In this case, adding to an action block multiple conditions which match many different color index values would result in the same pad color being displayed for various ‘color index’ values. If your pad can’t display all 69 colors then this would be a good solution.

Here’s another way you can do it, check for a range of color index values such as if the value of ‘m1’ is greater than 10 and less than 20.

You will notice that the last action block in this Reaction doesn’t have a condition. This is used to set the pad to a default color. If processing reaches this action block then it means there have been no matches, so this final action block acts as a fallback/default and will set the m2 modifier to the default value of 127.

The ‘set pad color’ reactions

In the example script is a reaction named ‘set pad 1 color’. You will need to copy/duplicate this reaction for each pad that you want to send LED feedback to.  

Rename it (i.e. set pad 2 color) and then set the ‘path menu’ to the correct track number in:

  1. the listeners section – Track’s color index value has changed
  2. in the action section – set the value of a modifier

You will also notice that the listeners section contains 2 other events, ‘script is initialised’ and ‘song’s tracks value has changed’. These are used to ensure that…

  1. the pad LEDs are configured when the script first loads
  2. the pad LED’s are re-configured whenever you move/add/remove tracks in your Ableton session.

And that’s all there is to it, if you also want to use your pad to select the track in Ableton, this can be done using the ‘track navigation’ mapping type or with reactions by using the action: script > set selected track.   

admin Changed status to publish May 22, 2024
0

Excellent. Thank you for the tutorial John.

Now how would you go about changing the color of each clip contained within the session box?

I’ve created a listener for “session box position changed” and I am able to retrieve the track offset and scene offset.
Now with this data, can I create a list of all the clips within the box and store their color index? The idea would be to then send it to the controller…
Or perhaps there’s a better solution? How can I go about it?

I am using an APC40 MK2 and would like to emulate the same behavior as the original script and have the pads light up with the right color as I move the session box.

Thank you for your help!

admin Changed status to publish May 22, 2024
Attached Files:
0

Awesome! Thank you so much John, I appreciate the very detailed instructions.

Now I can finally put the Akai Fire that I bought specifically for this purpose to use 🙂

admin Changed status to publish May 22, 2024
Attached Files:
1 2 3 10 11