No internet connection
  1. Home
  2. How to

SSL UC1 'Track Follow' in Pro Tools

By Rafael Villafane @Rafael_Villafane
    2021-10-06 21:51:14.446Z2021-10-07 17:15:19.955Z

    Hi, i read somewhere that there´s a 'track follow' script someone shared for the SSL Channel Strip on Pro Tools. I believe it opened the plugin on the selected channel, which in turn makes UC1 follow that channel. I searched the forum but no luck. If this is true i´ll be getting Soundlfow just for that feature. Would really appreciate any help, thank you.

    Solved in post #2, click to view
    • 5 replies
    1. O

      I don't remember the name of the topic however I copied the script to my 'save for later bucket' since I thought I might need it some day.

      I did not write this, nor have I tested it but here it is.

      var lastFocusedTrackName;
      
      function main() {
          try {
      
              var newName = sf.ui.proTools.selectedTrackNames[0];
              if (newName === lastFocusedTrackName || newName === undefined) return;
      
              lastFocusedTrackName = newName;
      
      
              const pluginName = 'SSL Native Channel Strip 2';
          
      
      
              const group1Visible = sf.ui.proTools.getMenuItem('View', 'Edit Window Views', 'Inserts A-E').isMenuChecked;
              const group2Visible = sf.ui.proTools.getMenuItem('View', 'Edit Window Views', 'Inserts F-J').isMenuChecked;
              const insertButtons = sf.ui.proTools.selectedTrack.invalidate().insertButtons.slice(group1Visible ? 0 : 5, group2Visible ? 10 : 5);
      
              const eqButton = insertButtons.find(b => b.exists && b.value.invalidate().value.includes(pluginName));
              if (eqButton) {
                  eqButton.elementClick();
              }
      
      
          } 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("OpenPluginFollowTrackSelection", main, 500, 5000);
      

      Bests,
      Owen

      Reply1 LikeSolution
      1. You can see the user requested for "SSL Native Channel Strip 2" in green, you can swap the name to your desired plugin.

        const pluginName = 'SSL Native Channel Strip 2';
        
        1. RRafael Villafane @Rafael_Villafane
            2021-10-07 22:32:23.752Z

            Thank you very very much, will be getting Soundflow very soon!

          • O
            1. DDr Jack @drjack69
                2024-07-09 16:09:22.481Z

                Hi. I’m just starting to use soundflow, and I want to use this script. I haven’t upgraded to pro yet, which I realise I will have to do, but I wondered whether I can use multiple versions of the script for each of the SSL plugins used with the UC1, or whether that’s likely to confuse the software. Many thanks.