Select a track by getting the number of currently armed track

397 viewsGeneralmapping
0

Hi everyone, got a control surface question here, using Akai MidiMix. So here’s the context:

  • I use 8 lower buttons to select Live’s tracks. When selected, they also are being armed.
  • A button at the side of the controller is used to switch to another mode, which is used to control master track’s parameters. AND also it is used to select the master track.

The problem is that when you hit this master track mode button to return to standard mode, you need to press the track select buttons again to be able to control the device parameters of the track that you were at previously, before going to master track mode. Hope you get what I mean.

The good thing is that you can’t arm a master track and when you select one, previous arm selection is still there. So my question is that if it is possible to select that track which was armed before going to master track mode. Something like “select_track(get_armed_track)”.

Glenn Verhaeghe Answered question July 7, 2024
0

Hi,

Here’s a Reaction for you that loops through all Tracks and selects the First Armed Track it encounters.

If you want the last Track you Armed to be selected, then another approach will be needed.

I didn’t know what button you used. I set the Listener to button_12 of the MIDImix template.

Glenn Verhaeghe Answered question July 7, 2024
0

After reading your request again, I’ve made some adjustments. The first version I posted will always run whenever Button 12 is pushed. That would mean that it would override the selection of the Master Track, when switching to that mode. To prevent this from happening, I added an Action Block that checks if the current Active Mode is your Default Mode (the one that’s not used to control the Master Track). If the Active Mode is not the Default Mode, then the Reaction should not perform any further Actions. This Reaction thus needs to be put below the Mapping that switches the Modes, otherwise it will perform incorrectly.

The Reaction is not fully ready yet. You’ll have to make a little adjustment in order for it to work as intended with your script. Here are the instructions:

  1. Load the Reaction in your script. Put it at least below the Mapping that switches the Modes.
  2. If I installed the incorrect Listener, change it first to the one you’re using.
  3. Generate the script and run Ableton. When you press the button that was assigned to the Reaction, a Log description should appear that refers to the current Active Mode (it will show the same log twice, once for the press and once for the release of the button). What you need to do is get the number for the Default Mode. This will probably mean you need to press the button twice, once to activate the Master Track Mode, and again to return to the Default Mode.
  4. Once you have this number, open the Reaction. You’ll find there are 3 Action Blocks:
    1. The first Logs the current Active Mode number when pressing the button. After everything is installed correctly, you may remove this Action Block.
    2. The second Action Block is where you need to make an adjustment. In the Condition, change the number 43 to the number of your Default Mode (43 was that of mine). IMPORTANT: make sure to put the number inside the str( ) parentheses, otherwise it won’t work.
    3. The third Action Block performs the Loop through the Tracks and selects the first armed Track.
  5. After making the adjustment, save and regenerate the script. Reload Ableton. It should all hopefully work as intended.
Glenn Verhaeghe Posted new comment July 7, 2024

Thanks! I’ll try this tonight, seems very clear. Also, how to toggle the top right buttons LED’s on/off by using Reaction? As I understood, it should use “Send raw MIDI data to controller”, but I couldn’t get it work, most probably because of incorrect arguments.

No, “send raw MIDI data” is used for sending SysEx messages to a controller (which is an earlier form of MIDI that is used by some controllers). In the case of the MIDImix, you need to use the other option “send MIDI velocity value to input”. Sending a value of 127 to the button will light it up, sending a value of 0 to the button will dim it.