scroll_clip and zoom_clip not working

Discuss Live-ready controllers other than Push.
Post Reply
randi
Posts: 105
Joined: Thu Apr 03, 2014 4:03 am
Contact:

scroll_clip and zoom_clip not working

Post by randi » Tue Feb 14, 2023 11:57 pm

Hi,
I have very nicely working script for the MackieC4 (https://github.com/markusschloesser/MackieC4_P3/), but wanted to add scrolling and zooming the clip in Clip/Detail view with an encoder.
Now, zooming and/or scrolling works fine in Session/Arrange view with

Code: Select all

    def zoom_or_scroll(self, cc_value):
        """ Scroll in Session view or Zoom in Arrange view with vpot_rotation encoder rotation"""
        nav = Live.Application.Application.View.NavDirection
        if cc_value >= 64:
            self.application().view.zoom_view(nav.left, '', self.alt_is_pressed())
        if cc_value <= 64:
            self.application().view.zoom_view(nav.right, '', self.alt_is_pressed())
            
But using

Code: Select all

    def scroll_clip(self, cc_value):  # todo WIP
        nav = Live.Application.Application.View.NavDirection

        if cc_value >= 64:
            if not self.application().view.is_view_visible('Detail/Clip'):
                self.application().view.focus_view('Detail/Clip')
                self.application().view.scroll_view(nav.left, 'Detail/Clip', False)
        if cc_value <= 64:
            if not self.application().view.is_view_visible('Detail/Clip'):
                self.application().view.focus_view('Detail/Clip')
                self.application().view.scroll_view(nav.right,'Detail/Clip', False)

    def zoom_clip(self, cc_value):  # todo WIP
        nav = Live.Application.Application.View.NavDirection
        
        if cc_value >= 64:
            if not self.application().view.is_view_visible('Detail/Clip'):
                self.application().view.focus_view('Detail/Clip')
                self.application().view.zoom_view(nav.left, 'Detail/Clip', False)
        if cc_value <= 64:
            if not self.application().view.is_view_visible('Detail/Clip'):
                self.application().view.focus_view('Detail/Clip')
                self.application().view.zoom_view(nav.right,'Detail/Clip', False)
Does not work, even though IMHO it should. I found a couple of examples of code which are done similarly, all for Maschine

Code: Select all

self.application().view.scroll_view(scroll, 'Detail/Clip', False)
.
1. Can anyone confirm, that scrolling clips in Clip/Detail view works with Maschine?
2. Maybe someone (from Ableton?) could point me in the right direction?
3. Is the sub-view still supported for scrolling or zooming?
Thanks! :-)

randi
Posts: 105
Joined: Thu Apr 03, 2014 4:03 am
Contact:

Re: scroll_clip and zoom_clip not working

Post by randi » Thu Mar 23, 2023 12:31 am

tested this in Live 10 as well, definitely not working, the changed code:

Code: Select all

    
    def scroll_clip(self, cc_value):  # todo WIP
        nav = Live.Application.Application.View.NavDirection

        clip = self.song().view.detail_clip

        scroll = cc_value == 1 and 3 or 2
        if cc_value >= 64:
            if not self.application().view.is_view_visible('Detail/Clip'):
                self.application().view.focus_view('Detail/Clip')
                # clip.move_playing_pos(- cc_value)
                self.application().view.scroll_view(nav.left, 'Detail/Clip', False)
        if cc_value < 64:
            if not self.application().view.is_view_visible('Detail/Clip'):
                self.application().view.focus_view('Detail/Clip')
                self.application().view.scroll_view(nav.right,'Detail/Clip', False)

    def zoom_clip(self, cc_value):
        nav = Live.Application.Application.View.NavDirection
        app_view = self.application().view
        view_name = 'Detail/Clip'
        # logging.info(f'zoom_clip called with cc_value: {cc_value}')

        # scroll = cc_value == 65 and 3 or 1
        if cc_value > 64:
            if not app_view.is_view_visible(view_name):
                # logging.info(f'Focusing view: {view_name}')
                app_view.focus_view(view_name)
                app_view.zoom_view(nav.left, view_name, False)
                # logging.info(f'Zooming view to the left')
        if cc_value < 64:
            if not app_view.is_view_visible(view_name):
                # logging.info(f'Focusing view: {view_name}')
                app_view.focus_view(view_name)
                app_view.zoom_view(nav.right, view_name, False)
commented out "f'" for Live10/Py2 to work.

Called by

Code: Select all

                if vpot_range[cc_no] == C4SID_VPOT_CC_ADDRESS_20:
                    self.scroll_clip(cc_value)
                if vpot_range[cc_no] == C4SID_VPOT_CC_ADDRESS_21:
                    self.zoom_clip(cc_value) 
It changes the focus to clip view, but neither zooms nor scrolls in the clip.
Also tried another subnav view

Code: Select all

'Detail/DeviceChain'
, but this also doesn't work. So ALL subview nav stuff doesn't work (except for focus on it).

Will test in Live 9 now

randi
Posts: 105
Joined: Thu Apr 03, 2014 4:03 am
Contact:

Re: scroll_clip and zoom_clip not working

Post by randi » Mon Mar 27, 2023 6:23 pm

also tested with Live 9, also does not work.
So to reiterate: ALL subview nav stuff doesn't work (but focus on it, does), all non-sub navigation (zooming/scrolling) works fine. Anybody knows anything?

[jur]
Site Admin
Posts: 5275
Joined: Mon Jun 01, 2015 3:04 pm
Location: Ableton

Re: scroll_clip and zoom_clip not working

Post by [jur] » Mon Mar 27, 2023 11:48 pm

I don't have the answer you need in a remote script form.
But I remember implementing Arrangement zooming on a NI Machine (was probably mk1) by using the Mackie Control emulation protocol.
There is a simple CC for this. There used to be a midi chart with all the info you'd need but I couldn't find it from a quick search. I probably have it somewhere on an old computer so I could share it if you need; but for the time being I've found this this. You might even found the link to the midi chart I'm mentioning somewhere in those few pages.

Zooming in clips, unfortunately this never worked. And I don't think this ever get fixed, but you might want to ask Support about this... I tried this many years ago, so maybe things have changed in this area.
Ableton Forum Moderator

randi
Posts: 105
Joined: Thu Apr 03, 2014 4:03 am
Contact:

Re: scroll_clip and zoom_clip not working

Post by randi » Tue Mar 28, 2023 2:47 am

thanks so much for the reply!
I've got Arrangement zooming working fine using

Code: Select all

    def zoom_or_scroll(self, cc_value):
        """ Scroll in Session view or Zoom in Arrange view with vpot_rotation encoder rotation"""
        nav = Live.Application.Application.View.NavDirection
        if cc_value > 64:
            self.application().view.zoom_view(nav.left, '', self.alt_is_pressed())
        if cc_value <= 64:
            self.application().view.zoom_view(nav.right, '', self.alt_is_pressed())
But any kind of of sub view (zoomin or scrolling in Clip/Detail, scrolling Clip/Devicechain) is not wokring. I already mailed support, but haven't heard back, maybe you've got a better connection? 😉☺. The docstrings/comments still feature zooming and I think all of the subview nav stuff would be extremely helpful having on a controller.

Scrolling in Clip/Devicechain is present in at least 15 scripts, one of them being the file simple_device_navigation in the v3 framework and the old _framework

Code: Select all

view.scroll_view(direction, 'Detail/DeviceChain', False)
, because of this I'd assume it should be working (it doesn't).
Scrolling in clip view however I've only found in the Maschine scripts

Code: Select all

scroll = value == 1 and 3 or 2
            self.application().view.scroll_view(scroll, 'Detail/Clip', False)
. Also not working for me.

Post Reply