No internet connection
  1. Home
  2. How to

Bypass last plugin in master fader

By Pau Romero @Pau_Romero1
    2021-02-06 14:10:06.349Z

    Hello!

    I'm using an Eq to start mixing to force me to start the mixes with all the low end and high end rolled off and I'm wondering how can I write a script that allow me to bypass or active certain insert on the master fader. I've tried a few options available here and I have not found any that works

    Thank you much!

    Solved in post #2, click to view
    • 3 replies
    1. Kitch Membery @Kitch2021-02-07 06:00:08.848Z

      Hi @Pau_Romero,

      Here is a script that will do the job.

      You will need to set the trackName , pluginName & insertNumber in the first three lines of code.

      const trackName = 'Master';
      const pluginName = 'FabFilter Pro-Q 3';
      const insertNumber = 1;
      
      function bypassToggleInsert(trackName, pluginName, insertNumber) {
          sf.ui.proTools.appActivateMainWindow();
          sf.ui.proTools.mainWindow.invalidate();
      
          //Make sure Inserts A-J are visible
          sf.ui.proTools.menuClick({ menuPath: ['View', 'Edit Window Views', 'Inserts A-E'], targetValue: 'Enable' });
          sf.ui.proTools.menuClick({ menuPath: ['View', 'Edit Window Views', 'Inserts F-J'], targetValue: 'Enable' });
      
          //Get track by name
          const track = sf.ui.proTools.trackGetByName({ name: trackName }).track;
      
          //Show the plugin
          track.trackInsertToggleShow({ insertNumber: insertNumber });
      
          //Plugin Window
          const pluginWindow = sf.ui.proTools.windows.whoseTitle.is('Plug-in: ' + pluginName).first;
      
          //Wait For plugin window
          pluginWindow.elementWaitFor();
      
          //Bypass Button
          const effectsBypassBtn = pluginWindow.buttons.whoseTitle.is("Effect Bypass").first;
      
          //Toggle Bypass Button
          if (effectsBypassBtn.value.invalidate().value !== 'on') {
              effectsBypassBtn.elementClick();
              log(`The plugin "${pluginName}" on track "${track.normalizedTrackName}" has been disabled`);
          } else {
              effectsBypassBtn.elementClick();
              log(`The plugin "${pluginName}" on track "${track.normalizedTrackName}" has been enabled`);
          }
      
          //Close Plugin Window
          pluginWindow.windowClose();
      }
      
      bypassToggleInsert(trackName, pluginName, insertNumber);
      

      I hope that helps :-)

      Reply1 LikeSolution
      1. P
        In reply toPau_Romero1:
        Pau Romero @Pau_Romero
          2021-02-07 18:23:39.810Z

          Thank you so much! It works!

          1. Kitch Membery @Kitch2021-02-07 19:37:48.085Z

            You're welcome, @Pau_Romero :-)