No internet connection
  1. Home
  2. How to

How do I toggle AudioSuite plugins open/closed.

By Kitch Membery @Kitch2021-04-09 01:00:51.176Z

Hi @Mark_Mangini,

As requested, here is a script to toggle AudioSuite plugins open and closed. Simply change the pluginCategory and pluginName to what you want :-)

var pluginCategory = 'Pitch Shift';
var pluginName = 'Pitch II';

var win = sf.ui.proTools.getAudioSuiteWindow(pluginName);
if (win && win.exists) {
    win.windowClose();
} else {
    var asWin = sf.ui.proTools.audioSuiteOpenPlugin({ name: pluginName, category: pluginCategory }).window;
    asWin.buttons.whoseTitle.is('Target button').first.elementClick();
}

Here is a video on "How to copy a script from the SoundFlow User Forum, paste it into the SoundFlow and use in Pro Tools"

Let me know if that works for you :-)
Rock on!

Solved in post #2, click to view
  • 23 replies

There are 23 replies. Estimated reading time: 9 minutes

  1. Kitch Membery @Kitch2021-04-09 01:02:42.339Z

    Please find the answer in the post above. :-)

    ReplySolution
    1. MMark Mangini @Mark_Mangini
        2021-04-09 15:57:32.313Z

        Thanks Kitch, that worked great!

        1. MMark Mangini @Mark_Mangini
            2021-04-12 15:37:41.492Z

            This worked for the DUPLICATE plugin but not for the EQ3 audio suite plugin. What's the difference? This code opens the EQ3 plugin but doesn't close it. It is nested the same number of layers so something else is up with the code?

            1. MMark Mangini @Mark_Mangini
                2021-04-12 15:38:39.770Z

                Ignore that comment. User Error. This is working fine. Thanks.

                1. MMark Mangini @Mark_Mangini
                    2021-04-12 16:04:13.298Z

                    Having trouble making this code work with Pitch 'n Time Pro. Is the apostrophe causing a code problem. This works for all my other AudioSuite plugins but not this one

                    1. Kitch Membery @Kitch2021-04-12 17:25:42.096Z

                      Hi @Mark_Mangini,

                      I don't have a "Pitch 'n Time Pro" to test but I think I see the issue from the name of the plugin.

                      So when entering the name into the action's property, the special character ' needs to be escaped by adding a backslash before it. Therefore when entering the name of the plugin type it as Pitch \'n Time Pro. This should resolve this edge case.

                      1. MMark Mangini @Mark_Mangini
                          2021-04-12 17:33:59.634Z

                          Thanks Kitch. That did the trick. Appreciate the help.

              • M
                In reply toKitch:
                Mark Mangini @Mark_Mangini
                  2021-04-09 16:47:13.104Z

                  Not working well. If I leave ProTools and come back to it, the window turns itself on even if I've closed it. It doesn't seem to work well when duplicated and I change the names of the Plugins and locations within the script. They just don't run.

                  1. Kitch Membery @Kitch2021-04-09 17:18:43.727Z

                    Hi Mark,

                    From what you are describing it seems that you may have assigned an Application trigger to the toggle AudioSuite scripts, which means each time Pro Tools is activated the script is run.

                    To remove the application triggers from the toggle AudioSuite scripts, select the script of the plugin that is opening each time you return to Pro Tools and then click the "x" in the right-hand corner of the trigger button.

                    Also, make sure to have the exact spelling and capitalization of the pluginCategory and pluginName and have them in single or double quotes. :-)

                    Let me know if that works for you.

                  2. M
                    In reply toKitch:
                    Mark Mangini @Mark_Mangini
                      2021-04-09 17:03:35.694Z

                      Another strange anomaly: I put the old AudioSuite Macros back on buttons (the ones that don't toggle) and left the new one you wrote in my ProTools Package. Even though it is not assigned to a button, I would get error messages from SoundFlow and the plugin would turn itself on anyway.

                      1. Kitch Membery @Kitch2021-04-09 17:23:58.903Z

                        This may be related to the same issue as I mentioned above. If you are triggering the scripts from your Pro Tools Stream Deck, you don't need to manually add a trigger to the scripts. :-)

                        Let me know if that makes sense. :-)

                      2. M
                        In reply toKitch:
                        Mark Mangini @Mark_Mangini
                          2021-04-09 18:49:02.326Z

                          When I create a new Script in the package, I cannot paste the code, above. There is now field for pasting.

                          1. M
                            In reply toKitch:
                            Mark Mangini @Mark_Mangini
                              2021-04-09 18:49:31.917Z

                              I hit the + button, selected new script, but there is no field to paste your code.

                              1. M
                                In reply toKitch:
                                Mark Mangini @Mark_Mangini
                                  2021-04-09 18:50:51.691Z

                                  This was not the case last night when I tried this.

                                  1. Kitch Membery @Kitch2021-04-09 21:53:30.862Z

                                    Note: This issue has been resolved offline :-)

                                  2. M
                                    In reply toKitch:
                                    Mark Mangini @Mark_Mangini
                                      2021-04-09 21:54:16.396Z

                                      Thanks Kitch. All better now.

                                      1. M
                                        In reply toKitch:
                                        Mark Mangini @Mark_Mangini
                                          2021-04-09 21:56:50.898Z

                                          How or where do I make a suggestion for a feature?

                                          1. Kitch Membery @Kitch2021-04-09 22:02:35.890Z

                                            Hi Mark,

                                            You can post an idea in the "Ideas" category of the forum. Here is the link;

                                            :-)

                                          2. A
                                            In reply toKitch:
                                            AddingSound Addington @AddingSound_Addingto
                                              2022-04-08 10:28:08.613Z2022-04-10 16:58:18.286Z

                                              Hi Kitch.
                                              I realy like this script you have posted in the top of this thread.
                                              But I realy miss a importaint feature, that is to add a preset to the open when the pluginn is opened, so it opens with my prefered settings. Will that be possible to add to the script?
                                              thanks

                                              1. Kitch Membery @Kitch2022-04-11 20:03:17.648Z

                                                Hi @AddingSound_Addingto,

                                                Thanks for your patience :-)

                                                This script should do the trick.

                                                const pluginCategory = "EQ";
                                                const pluginName = "EQ3 7-Band";
                                                const presetMenuPath = ["TEST 1"];
                                                
                                                let win = sf.ui.proTools.getAudioSuiteWindow(pluginName);
                                                
                                                if (win && win.exists) {
                                                    win.windowClose();
                                                } else {
                                                    var asWin = sf.ui.proTools.audioSuiteOpenPlugin({
                                                        name: pluginName,
                                                        category: pluginCategory
                                                    }).window;
                                                
                                                    asWin.audioSuiteSelectPreset({
                                                        presetMenuPath,
                                                    });
                                                
                                                    //Remove the 2 forward slashes at the start of the next line of code if you
                                                    //need the Target button of the AudioSuite plugin to be greyed out.
                                                    //asWin.buttons.whoseTitle.is('Target button').first.elementClick();
                                                }
                                                

                                                As noted in the script comments there is a line of code that I've commented out as it may not be needed for your specific workflow. If you need the "Target button" of the AudioSuite plugin to be clicked (greyed out) when the AudioSuite plugin opens, just remove the two forward slashes at the start of the last line of code asWin.buttons.whoseTitle.is('Target button').first.elementClick();

                                                I hope that helps :-)

                                                Rock on!

                                                1. Kitch Membery @Kitch2022-04-12 17:41:53.199Z

                                                  Hi @AddingSound_Addingto,

                                                  Via the chat, you mentioned that you could not get the above script working.

                                                  To get this script working, you'll need to copy and paste the script into SoundFlow. Here is a video on how to do this;

                                                  You'll then need to customize the first three lines of the script;

                                                  const pluginCategory = "EQ"; //Replace "EQ" with the plugin Category/Manufacturer as seen in the AudioSuite Menu
                                                  const pluginName = "EQ3 7-Band"; //Replace "EQ3 7-Band" with the plugin name as seen in the AudioSuite Menu
                                                  const presetMenuPath = ["TEST 1"]; //Replace "TEST 1" with your preset name
                                                  

                                                  I hope that helps.

                                                  1. Thanks Kitch.

                                                    It works for me now, thanks.

                                                    1. Kitch Membery @Kitch2022-04-13 07:39:22.489Z

                                                      Great to hear :-)

                                                      Rock on!