No internet connection
  1. Home
  2. How to

How to select channel in plugin window of focused multi-mono insert

By Sean @SeanH
    2018-06-25 05:11:35.940Z2018-06-25 09:07:19.205Z

    Would be cool if SF could access the "channel-selector" of multi-mono inserts and direct it to a certain channel (ie Center) when you open the insert.

    I'm using the following script to open a specific insert on a specifically named track and i'd love to add to this to automatically also switch to the center channel of this insert:

    var targetName = 'DX SUB 5.0';
    
    
    sf.ui.proTools.trackSelectByName({
        deselectOthers: true,
        names: [targetName]
    });
    
    
    sf.ui.proTools.selectedTrack.trackInsertToggleShow({
        insertNumber: 4
    })
    

    For now I am using the script to trigger a hotkey that triggers a Keyboard Maestro macro and this actually works great

    but maybe sf can already do this internally and I'm missing it?

    Solved in post #2, click to view
    • 6 replies
    1. This is how you would do it:

      var pluginWin = sf.ui.proTools.getFloatingWindowWithTitleStartingWith("Plug-in: ");
      pluginWin.getFirstWithTitle("Channel Selector").popupMenuSelect({
          menuPath: ['Left']
      });
      

      If you want to be more specific in getting the right plugin window, eg. if you need to support having multiple open plugin windows, you should add the plugin's name after "Plug-in: ", like "Plug-in: EQ 3 7-band".

      Reply3 LikesSolution
      1. SSean @SeanH
          2018-06-25 19:25:46.069Z

          thx! works great. faster then KM

          1. In reply tochrscheuer:
            BBen Zenium @Ben_Zenium
              2022-04-21 10:47:23.950Z

              Hey Christian,

              Any idea why I cant get this working?

              var pluginWin = sf.ui.proTools.getFloatingWindowWithTitleStartingWith("Plug-in: ");
              pluginWin.getFirstWithTitle("Channel Selector").popupMenuSelect({
                  menuPath: ['Left']
              });
              
              
              sf.ui.proTools.windows.whoseTitle.is("Plug-in: EQ3 1-Band").first.mouseClickElement({
                  relativePosition: {"x":67,"y":122},
              });
              
              sf.keyboard.type({
                  text: "-6",
              });
              
              sf.keyboard.press({
                  keys: "return",
              });
              
              var pluginWin = sf.ui.proTools.getFloatingWindowWithTitleStartingWith("Plug-in: ");
              pluginWin.getFirstWithTitle("Channel Selector").popupMenuSelect({
                  menuPath: ['Right']
              });
              
              
              sf.ui.proTools.windows.whoseTitle.is("Plug-in: EQ3 1-Band").first.mouseClickElement({
                  relativePosition: {"x":67,"y":122},
              });
              
              sf.keyboard.type({
                  text: "-6",
              });
              
              sf.keyboard.press({
                  keys: "return",
              });
              
              1. Hi Ben,

                It's better to start a new thread for this - see here how to ask for help on scripts from the community: bit.ly/sfscripthelp
                Based on your code I can't see anything inherently wrong, but the guide I linked to would ask you more questions that would help people help you more easily.

                1. In reply toBen_Zenium:

                  Hey Ben,
                  I realize the @chrscheuer asked to create a new post for this question but here's my two cents:
                  Your script above works on my system but only if the plugin instance is multi - mono. It will fail if it's a stereo plugin.

                  If you still have problems create a new post (perhaps with a screen recording as well) and I can help sort this out for you.

                  1. MMatt Sherman @Matt_Sherman
                      2022-12-14 05:47:41.554Z

                      Thank you everyone for this thread. This is exactly something I’ve been trying to accomplish. Using the code above with a window trigger looking for “plug-in” , the script works phenomenally. The only downside is that it will attempt this on any and all plugins eventually causing a pro tools crash.

                      Specifying the plug-in name can help reduce the extra attempts however there are too many multiple instances of multi-mono and non with the same name in my sessions.

                      I am trying to figure out if there is a way to trigger with only multi mono and have begun a new post here :