No internet connection
  1. Home
  2. How to

How to auto-select a specific plugin using Add Plugin to Insert Slot 1...?

By Robert Mallory @Robert_Mallory
    2024-01-18 00:15:40.939Z

    Hi! I'm trying to mod the Add Plugin to Insert Slot 1 (Search) macro one step further by having it automatically select a specific plugin for me (in this case Waverider) instead of me needing to type the plugin name into the Search window that pops up.

    I thought I was being smart by creating a Macro that added Type Text to it, to type out the plugin name, but it didn't work because SF waits on the plugin search window of Add Plugin to Insert Slot (Search) before going to the next command, or at least that's why I suspect it didn't work.

    Any help is appreciated! Thanks!

    • 5 replies
    1. S
      Sreejesh Nair @Sreejesh_Nair
        2024-01-18 06:23:03.312Z

        I dont think you can modify that unless you make an editable copy. Else, this code below will help. You can change the plugin path to your needs accordingly. This will insert the EQ3 7-Band on insert slot 1 (defined by plugin number).

        sf.ui.proTools.appActivateMainWindow();
        sf.ui.proTools.selectedTrack.trackInsertOrSendSelect({
                pluginNumber: 1,
                pluginPath: ["multi-mono plug-in", "EQ", "EQ3 7-Band (mono)"],
                selectForAllSelectedTracks: true,
            });
        
        1. RRobert Mallory @Robert_Mallory
            2024-01-18 16:34:03.584Z

            Thanks so much! This is a massive, massive help.

            For anyone else looking to do the same (in Pro Tools with WaveRider), I had to delete "multi-mono plug-in" to get this to work on a mono track, change "EQ" to "Dynamics" and then change "EQ3 7-Band" to "WaveRider". Of course this can be revised to work with any plugin.

            Small note, if there's already a plugin in slot 1, Pro Tools will ask "Do you really want to change the existing insert?" via a pop up window. Is there a way to either clear that slot first, or have SF click "Change" on its own?

            THANK YOU!

            1. RRobert Mallory @Robert_Mallory
                2024-01-18 18:02:13.238Z

                Nevermind that last question. I found the script to remove an Insert in Slot 1 elsewhere on the Forum.

                sf.ui.proTools.selectedTrack.trackInsertOrSendSelect({
                insertOrSend: 'Insert',
                pluginNumber: 1,
                pluginPath: ['no insert']
                });

                So psyched!

                1. In reply toRobert_Mallory:
                  SSreejesh Nair @Sreejesh_Nair
                    2024-01-18 18:13:02.568Z

                    Yes. The path needs to be exactly identical to how it looks in the UI. This code should do what you requested for.

                    sf.ui.proTools.appActivateMainWindow()
                    sf.ui.proTools.selectedTrack.trackInsertOrSendSelect({
                        pluginNumber: 1,
                        pluginPath: ["multi-mono plug-in", "EQ", "EQ3 7-Band (mono)"],
                        selectForAllSelectedTracks: true,
                    });
                    // Wait for confirmation dialog
                    const confWin = sf.ui.proTools.confirmationDialog;
                    const elementWaitResult = confWin.elementWaitFor({
                        timeout: 500,
                        onError: "Continue",
                    });
                    
                    // Accept confirmation dialog
                    if (confWin.exists) {
                        confWin.buttons.whoseTitle.is("Change").first.elementClick();
                    };
                    
                    1. RRobert Mallory @Robert_Mallory
                        2024-01-18 23:17:38.037Z

                        thanks so much!!