M4L: get ids of tracks currently highlighted by the APC40?

Jan 3, 2014 at 11:16am

M4L: get ids of tracks currently highlighted by the APC40?

If you plug in a control surface, such as an APC40 or a Launchpad, you’ll see that some of the tracks in Live are highlighted by a coloured border.

Is it possible to use the Live API and Live Object Model to retrieve a list of tracks (ids) that are currently highlighted by a particular control surface?

#277300
Jan 8, 2014 at 9:02am

I may be wrong about this but I don’t think it is. The APC40 communicates to Ableton Live via python scripting and as such I don’t believe the variable that would define where the grid should be placed are accessible. You could try poking around with the control surfaces section of the API but the documentation for this is horrific. There are a few sources online for people who have poked around and found thing out by trial and error but I can’t remember where they are at the moment.

You may be able to observe the button presses from the APC40 that move the box around (I know you can do this with Push) and from that work out where the box would be. I’m afraid I don;t have an APC to experiment on sorry.

#277744
Jan 8, 2014 at 12:02pm

This has already been sorted…
the session_control component can be interrogated to find the track_offset and scene_offset for the coordinates of the top left of the red box, from there the rest is easy…

Cheers
D

ps you’ll find the code for this and how to move the red box within Isotonik on the max4live.com website…

#277752
Jan 8, 2014 at 2:28pm

Thanks @cphas – I did indeed solve this on another list.

For anyone interested in the solution, you go to the path: control_surfaces 0 components 0

Then, on the resulting object, call the function ‘track_offset’ to get the index of the first track targeted by the control surface.

You can then work out what the rest of the tracks must be.

#277772

You must be logged in to reply to this topic.