Im wondering if anyone knows a way to display the currently selected track? I realise I can do this through this_device. However, the device im using wont always be on the same track as is selected.
Im also struggling to understand how to listen for when the track is selected. Im guessing I should use loadbang?
The seledcted_track is a property of the song.view as are selected_scene, highlighted_clip_slot, and seelcted_parameter. This code lets you observe selecting tracks on the fly. Please click the button to start this in an existing patcher.
This works within a Live Max device or a sub patcher of it. It seems it doesn’t work in a patcher started from the MFL menu: File -> New patcher.
----------begin_max5_patcher---------- 699.3oc0W9saZCCEF+5To9NX4qonXmPVX208ZLUgBImBdK3fhMT5p1697eZ. JEFlLmDsavhyII7c94y4Kl2t+t.77pcf.i9J56nff2TQBLwzQBZBDfWksKuL SXtPLGdoZ9OvidOmD1IMwKfmg5xpW1m44JtTv9EnyRBGG1DmuYU0FYIHMOOR S30Yx7kL9hY0PtzJIBUeaHRZrdYB09kwgnmZtI6CR95ZvdGX7gb5eed1JSF7 i0rrRz2pJK1qOVgIipXdHFej3X78ZyD722emdUsLxYHsBDhrEvmojVPHxCOt ofU4QRkpQCM0hqH6RRG.JR54IE0+jhUfn9rWx19zvHMc5JFQ5MFs.jHip79L GMxfqIwcFlnTeioK4LUx1BiUYz0n+A0DSmj0hpSLmngW.TMQEYaghY1BbVlT VyluQZs0CNvp.7r0PsfIj.OGNXu0fZuhbIZNpDUdi3NxAbGZr5HwoNv64Y7E 3QJtOp0yxS6s2LrttRs+HeEIfRUUq1Qk0Y4+rCdcZj06iF0cVfI87rs.p2B0 2HqnNvpjP2a29GZyh+OcDuCHNg1hA71Q8HeObq1TjUbb6GMSrdbMedsR+P9i KKpuKq+5vmpZV5ee9Ty1+DhqicsuIHr+b3UjBoY1Lg5baaYPG7ekRLmCYZ2c 51zd0YWtjIJfsrbv+sXwlO+xzavmgwkMKsBdNZ3Xe1JBv+zeN2TN5DmfTQ0l 57F41zWiHGTYAHjLdljo7mN5pTJBcTkujUT.lKXOWWwJVWop32UBIdx3Ipmr 5bX5E5z8eC8zk6AbW1zOJnyK6aV09QaQNgz3OdU8o3tJ3zGLaHHWhShKdXDm 5L9H5UEGYX1Vm5ROGMb3D2U2VozAYa0vjq2ykNHji5jM2okPOINmbRRGDok5 zd5vfsSsuNu3FFONmj1oiysPa5.pk+.KSelK -----------end_max5_patcher-----------
thx for the snippet. It seems to display the selected track. However, it only selects for every 3rd track i click on. I can see its using deferlow, which should sort this problem out. I cant see how I can make it always display the selected track – would be grateful if you have any ideas?
I just tried the snippet and it seemed to work fine for me even clicking frantically…?
Here’s what I did. I went into Live and created an empty m4l patch, then opened it to edit in Max, selected all, deleted it… then I copied the above snippet, did "New From Clipboard" from the menu, then copied all of _that_ and pasted it into the empty m4l patch and saved it… then I went back to Live and selected various tracks and saw the results in Max.
What I want is to set the selected_track, which I have so far failed to do… :-( and rather need now, any hints welcome!
This MFL device listens to changes of the selected path. The sub patcher also has a menu control to select a track yourself. It had to be a subpatcher else it would only be visible when the path it is on is selected. This device does not work for return tracks and the master track.
Came back to clear up my previous post!
Xanadu: thanks for these great examples! If you’re going to post code in the longer term, I strongly suggest you get a free github account and put the examples there – the advantage is that you can link to the source code and fix errors there instead of having to come back to the thread and update it again, but also that people can read and share your code.
I did this: http://ax.to/max
I’ve published some devices om MaxForLive.com, but I consider these code snippets just as proof-of-concept and didn’t bother to make it an official publucation.