How to get the current track ID
Hi team,
I am studying Max For Live and got stuck on the way how to detect the track ID that my Max device was added to.
For example, if I add my device to the second MIDI track from the left which is supposed to be the track #1 (since the track number starts from zero) and I want to set a path to something in the track mixer buttons or knobs, I need to use "path live_set tracks 1", assigning the track ID specifically.
However, I don't know which track I would insert the device in the real scenario, so I want the device to detect the current track ID automatically (so that I can use "path live_set tracks $1" or something to set the path from the device). The device needs to understand the current track ID. Is there any useful way to do this? Thanks in advance.
------------------------
Almost... but "path live_set master_track" wouldn't work, since it's a 3 item path instead of 4.
Awesome, thanks for your help!