ldrolez / clyphx-live11

ClyphX advanced macros and scripting for Ableton Live 12, 11 and 10
GNU Lesser General Public License v3.0
202 stars 19 forks source link

Update selected track within a action list #10

Open daniellumertz opened 3 years ago

daniellumertz commented 3 years ago

So using action like

RIGHT ; all/arm off ; sel/arm on Makes a problem since RIGHT changes which track is selected and sel/arm on will get the previous selected track not the new selected at the moment . I think this works at clyp x pro in 10....

Thanks for porting it to py3 and ableton 11 by the way....

daniellumertz commented 3 years ago

Idk much about how the Live API works but seems it needs to call a update ? in ClyphXTrackActions.py

    def set_selection(self, track, xclip, ident, args):
        """ Sets track/slot selection """
        self.song().view.selected_track = track
        if track in self.song().tracks:
            if args:
                try:
                    self.song().view.selected_scene = list(self.song().scenes)[int(args.strip())-1]
                except: pass
            else:
                if track.playing_slot_index >= 0:
                    self.song().view.selected_scene = list(self.song().scenes)[track.playing_slot_index]

I could try to change, I know a little on python, but I have so many doubts I wouldn't know where to start....

ldrolez commented 3 years ago

Many thanks for the bug report! On which Live version did you test? I'll take a look at this shortly.

-- Ludo

https://drolez.com/blog/ - Music and Tech Blog

daniellumertz commented 3 years ago

Hey thx for the reply I tested in Ableton 11 triggering it via controller

daniellumertz commented 3 years ago

other thing that IDK if is the intended behavior: left and right change the behavior depending the windows focus. so in arrange it moves the edit cursor pos. And in section view it changes the track focus.

ldrolez commented 3 years ago

Could you confirm that it works with the Pro version?

ldrolez commented 3 years ago

You can also do this with variables: One clip with [] var=1 The RIGHT clip [] var=(%var%+1) ; %var%/SEL