Forums > Max For Live

updating live.object with selected_track

October 1, 2012 | 7:44 pm

Hello,
I would like to solo the selected track with a key I mapped to the button on the m4l patch.
I can see that the message box updates itself everytime I select another track, but set solo message only affects the original track that holds the m4l patch.
It seems like live.object initializes only once as soon as the first id message hits, and ignores any other id messages. any help is much appreciated.

– Pasted Max Patch, click to expand. –

October 1, 2012 | 8:23 pm

Actually the ID doesn’t change. It may appear that way in the message object but try replacing the message object with a print object. Then remove & insert your device again. Right click on its title bar and select "Show max window". This will display the runtime window which will then display the output of the print object. Select other tracks; you’ll notice that nothing gets printed.

The best approach is to simply get the currently selected track as soon as you click the live button and then perform the solo command on it.

So something like this:

– Pasted Max Patch, click to expand. –

Good luck!

PS: did a quick edit. I often mix up the live path outlets. The best outlet to use when triggered by a bang is the left, not the middle. So added quick change ;)

Edit2:

I also see where things went wrong in your patch.

The middle outlet on a live.path sends out different id messages but only when the id of the object changes. But when you select a track then its id only changes one single time: the moment the track is selected it’ll get an ID assigned. But if you select the same track again at a later time its ID will have remained the same. Thus nothing will be sent out the live.path object at that time.

As such you’re better of picking up the right id at the moment you want to do things.


October 1, 2012 | 9:29 pm

thanks for your response.
it turns out, all I had to do was to use the deferlow object.

– Pasted Max Patch, click to expand. –

Viewing 3 posts - 1 through 3 (of 3 total)