Match Ableton Clip Color to reflect as LED state on MIDI Pads for Akai APC40 MK2
A lot of use on the forum are asking for this feature. We want the Akai APC40 MK2 PADS to light up based on the clip color of the Ableton clip that gets loaded on that PAD.
why did you choose to only go with 3 states for LED feed back? what are you going to implement so that we have LED color matching to clip color on Ableton?
we bought and purchased CSS with the idea that MIDI Mapping would go by a lot faster with your tool you created, so far it’s been more of a hassle trying to get your program to work appropriately mainly because the APC40 has 3 modes like MCBeats has mentioned on multiple forum posts and responses.
MCBeats has even provided the solution to set the modes (giving us a template ready for you to update on your program so that it’s easier on the users to choose between modes (mode 0, 1, and 2).
I think, if you adjust the dictionary of colors and the list of buttons to your controller, you should in theory be able to get it working when you set it up like I did.
How the script is set up now, remember to arrange the buttons in lists of columns (like I did myself). There’s a picture of that list in comment #4.
If you have any trouble, let me now and I’ll try to help.
I forgot I changed some stuff around before posting comment #5.
Instead of using modifiers m10 and m11 to store the colors dictionary and buttons list, i stored those inside Action Block 1 of the Reaction named “Set Button Colors to Clip Colors”. To edit the dictionary of colors and list of buttons, I’d suggest editing them inside software that can handle python code (I use Visual Studio Code myself) because Python relies heavily on indentation to work properly and it’s real finnicky inside these custom code boxes to handle that. An online python editor like this one should also work.
I also forgot to mention you should change the dimensions of your session box to your controller’s specifications.
The script will throw up errors when the list of buttons doesn’t contain enough buttons to match the clips inside the session box. The loops in the script loop through all tracks and scenes in the session box to check all the clips it contains. Then it sends velocity data to corresponding buttons. If there is no button to send that data to, it will cause an error, and I haven’t provided a failsafe for that. When I’ll revisit the code I’ll make it a little less prone to producing errors. For now, make sure you’ve got as much buttons as you have clips inside the session box.
Hello,
First, many, many thanks! Thanks to this amazing work, we now have access to a core functionality of the APC40 — without which using Remotify wouldn’t make much sense.
I’ve tested the Clip Colors script and it works relatively well when using the built-in “Session Box Navigation” mapping.
However, I’ve been developing a custom behavior to emulate the APC40-style session box movement (as described here: https://community.remotify.io/questions/question/moving-session-box-while-a-button-is-pressed-repeating-an-action-while-a-condition-is-met/answer/73135/), using reactions instead of the standard “Session Box Navigation” mapping.
This allows the red session box to move multiple steps during a long button press — which is why I’ve opted for this custom approach.
The problem arises when I adapt the Clip Colors logic to this setup.
What I’m doing:
-
I’m using an APC40 MK2 with a Remotify-generated script.
-
I move the session box manually using reactions (not the standard navigation mapping).
-
I imported the Clip Colors logic from the scripts above (same reactions, same LED update loop).
What works:
-
The LEDs light up in the correct 8×5 grid positions.
-
Empty clip slots stay off, and occupied slots light up.
What fails:
-
All clips light up with the same fallback color (orange).
-
The actual clip colors are never shown.
-
This issue does not occur when using the standard “Session Box Navigation” mapping — in that case, the correct clip colors display just fine.
-
The only time correct colors show up in my setup is when the red box reaches position (0,0) and I press UP — then the real clip colors display. No other positions work.
I’d be very grateful for any help resolving this. While I’m using the APC40 MK2, I suspect this behavior may apply more generally to other controllers too.
Many thanks !
Cheers,
I’ll check it out but it might take some time. I’ve been “out of the game” for a while, focusing on other stuff, so I’ll need to get into it again.
Here’s a first update:
I created a few Reactions that work similar to yours for moving the Session Box up an down with repetition on long press. On my setup, the Clip Colors weren’t changing at all (i.e. they were stuck in the colors of the first position of the session box).
What could be the problem?
My thoughts about it are that the Listener that listens to the movement of the Session Box only reacts to the Mappings provided by CSS. The Reaction that should update the colors uses this Listener.
Possible fix
We could try changing the Listener to one that listens to a modifier being updated. For example:
We’d set a Modifier to 1. Each time the session_box position is changed, we multiply the value of that modifier by -1. So, the value will change between 1 and -1 with every position change, which would trigger the Listener.
I’ll try it tommorrow.
EDIT:
Also, while looking through my old code, I noticed there’s a Reaction that sets Modifiers m1 and m2 but nowhere in the code are these Modifiers being used. They might be artifacts from earlier versions. Maybe I can clean it up a little.
Another update:
The error I wrote about doesn’t seem to occurr with the code you got from ChatGPT. I had used another way to simulate the up and down movement; it did that but didn’t work well with the Clip Colors Reaction.
So, at the moment, I think I got it to work. I think I’ll be able to deliver it by the end of the week.
Sign up
User registration is currently not allowed.
First test looks promising. The colors update, even while holding down the button. However, sometimes an error occurs now, caused by the Reaction ‘Set Modifiers m1 and m2’. The error happens when selecting a clip within the session box. In Ableton it then shows the message “Removed mode: Mode 1”, which is strange.
I’ve now realised these modifiers are being used by a “Clip has changed” listener to update the colors when you change a color within the session box, so I can’t disable it without losing that functionality.