No internet connection
  1. Home
  2. How to

Floating Fader follows edit track mouse clicks

By Christopher Barnett @Christopher_Barnett
    2021-03-05 00:49:31.844Z2021-03-18 21:52:21.228Z

    I have looked before asking: But has anyone figured out how to make the floating fader/panner follow whatever track what I am editing, stereo or mono, automatically without a button press. Ideally it would just follow along all the time.

    I am stumped

    • 13 replies
    1. Hey!

      Christian has a command called "Output Window: Follow Selected Track" in his Pro Tools Utilities package that does exactly this.

      1. Awesome, yet again it was in there but had no idea

        Id like to add the midi bank to fader in the above to make it all one keep alive function

        add this

        sf.ui.proTools.selectedTrack.trackScrollToView();
        sf.ui.proTools.selectedTrack.titleButton.mouseClickElement({
        isControl: true,
        isShift: true,
        });

        1. Hi Raphael,

          Do you think it possible to add this command into the "Output Window: Follow Selected Track" command ?

          1. Yes, it's possible ( @chrscheuer I hope I have your blessing to append to your script):

            var lastFocusedTrackName;
            
            function main() {
                try {
                    var newName = sf.ui.proTools.selectedTrackNames[0];
                    if (newName === lastFocusedTrackName || newName === undefined) return;
            
                    lastFocusedTrackName = newName;
            
                    if (sf.ui.proTools.selectedTrack.outputWindowButton.value.invalidate().value !== 'open')
                        sf.ui.proTools.selectedTrack.trackOutputToggleShow({ onError: 'Continue' });
            
                } catch (err) {}
            
                // Keep selected track in view and on top of screen if possible
                try {
                    sf.ui.proTools.selectedTrack.trackScrollToView({ onError: 'Continue' });
            
                    sf.ui.proTools.selectedTrack.titleButton.mouseClickElement({
                        isControl: true,
                        isShift: true,
                        onError: 'Continue'
                    });
                } catch (err) {};
            }
            
            function runForever(name, action, interval, timeout) {
                var now = (new Date).valueOf();
                if (now - globalState[name] < timeout) throw 0; //Exit if we were invoked again inside the timeout
            
                globalState[name] = now;
                sf.engine.runInBackground(function () {
                    try {
                        while (true) {
                            sf.engine.checkForCancellation();
                            globalState[name] = (new Date).valueOf();
            
                            action();
            
                            sf.wait({ intervalMs: interval, executionMode: 'Background' });
                        }
                    } finally {
                        globalState[name] = null;
                    }
                });
            }
            
            runForever("isFollowFocusedTrackRunning", main, 500, 5000);
            

            I think you already know this but just in case, the only way to stop this script is to use SF's Stop All Running Commands, which can be triggered with ctrl+shift+esc or by clicking on the menu option on SF's popup menu on the menu bar, second page.

            1. All good :) This looks like it could effectively disable scrolling in your session though, right?

              1. Ah no gotcha, it's essentially what Chris is asking for. I'm just a little worried that this would disallow you from moving your track selection upwards, since this script would keep putting the selected track at the top of the visible tracks in your session (that's what Ctrl+Shift+trackname-click does, in my experience)

                1. Yeah, it's not perfect but I think this is Christopher's desired behavior. Since the interval rate is not so fast it allows for sneaking in a few shift+p strokes to extend the selection up that way.

                  1. Christopher Barnett @Christopher_Barnett
                      2021-03-18 17:19:09.672Z2021-03-18 18:30:08.301Z

                      Thank you, this is a common request from editors who have just a few HUI faders at home, I'm at the ranch today but ill try this tonight, but thank you.

                      It's a huge timesaver

                      1. Christopher Barnett @Christopher_Barnett
                          2021-03-19 17:27:43.339Z2021-03-19 17:36:00.743Z

                          OK this works very well, I'm sure a lot of people would find this useful, maybe tidy it up a little and release it to the masses, its a very common comlaint that PT does not do this,

                          The only other thing is that is does force the focus channel to the top of the session, that is kinda annoying, might kill it for most editors.

                          thank you

                          1. Actually I think the banking to the top of the session is too much now after using it for a bit, makes it pretty unworkable, friggin avid

                            1. Yeah, I know what you mean. I wish Avid would let us loose on all the internal functions. For now, I think this is as close as we can get.

                              1. On my S1 I've programed a key combo onto one of the track color keys that triggers the bank selected track script so that it's only a couple of inches from my keyboard. Pretty handy…

                                1. I think I understand Chris