How to light up selected track button RELATIVE to session box (on APC40 MK2 alternate mode)
Hi, I’m trying to recreate the APC40 MK2 behavior where the button for the currently selected track lights up, but relative to the session box — not based on absolute track number. Also, it works regardless on how the track is selected (via APC, mouse, whatever)
So for instance, if my box is placed on tracks B C D E F G H I and I select track C, it’s the SECOND track of the red box, so the SECOND button should have the light. If I move the session box or select another track, the light moves accordingly ot always signal “this is the Nth track of the session box that is currently selected” as button Nth as light.
If I use highlight navigation by attributing button to track higlighting, there is some automatic lighting but it is not correct (it always illuminates the 3rd button when C track C is selected because C is considered the 3rd track in absolute order – regardless of where the session box is its always the 3rd buttton that lights up)
Any clue on how to emulate the original behavior?
Thanks for the help !
So, to reformulate my request : Is there a simple track button that select a track and illuminates relatively to the session box? I’m pretty sure it’s possible as it’s possible for solo, mute button etc. I may be have overlooked some basic functions..?
I’ll check it out one of the following days. I don’t immediately see a way to do this with the Mappings in CSS so I’m guessing it will have to be done through a Reaction.
My first thought: Listener should be “Selected Track has changed…”
Then it checks if that Track is somewhere within the boundaries of the Session Box and, if so, at which position relative to the left side of the Session Box.
The Reaction would need a list of buttons that relate to each of the Tracks within the Session Box, so that we first can reset all the LED’s to OFF, and then can send an ON value to the correct one (if the highlighted track was within the session box).
It’s certainly conceivable.
I don’t think this is a feature that a lot of MIDI Controllers use natively but there’s no harm in asking.
Btw, have you been able to try out the updated version of the Clip Colors on LEDs Reactions? I’d like to know if your problems with them are solved. EDIT: nvm, I just saw your response.
Here’s the Reaction. I didn’t know which buttons you want to use it with so you might need to change the channels and/or values of the list of buttons in Action Block 1.
Reaction needed 4 Listeners:
- Script is initialised (for if a track is already selected upon initialisation)
- Highlighted Track changed
- Visible Tracks changed (for if you’re using Grouped Tracks)
- Modifier m19 was activated (which is the modifier we used when the Session Box was moved using the custom Reaction)
If you only want this Reaction to work on specific modes (instead of the Global Mode) then you might also want to add a Mode Activated Listener + you might need a Reaction that Listens to the Mode being Deactivated and that resets all of the buttons.
Many thanks !!!
Hello Glenn, as always you deliver some great stuff !
It seems to work perfectly.
I did some minor change I posted below.
At first this script removed the other function you wrote about the LED color of clips (!) but after investigation I renamed the variable button in this script to track_button to avoid conflict and all is fine. Also I think there were some mapping to your MFT for testing thus I removed it so people can better understand how it works.
Sign up
User registration is currently not allowed.
That would be great! Maybe we can ask that of an added CSS feature no?
Because to me I thought I was missing something, it would be one of the first thing I want (before having same functionality with solo, A/B, etc. which are already there)