No internet connection
  1. Home
  2. How to

Toggle Plugin visibility (show/hide) using

By Matt Yocum @Matt_Yocum
    2019-09-21 01:33:12.226Z

    So I see this has been asked before but then OP decided he didn't care whether it was possible or not, but I do! haha. So I'd like to be able to, for example, open Pro-Q3 with my Pro-Q3 button on my stream deck, and then toggle it back away

    Possible? I tried this by adding onto the macro with "wait for stream deck button" and then "hide focus window" but this came with the unintended consequence of toggling off my plugins regardless of what other action I took on the stream deck as opposed to working like a toggle switch.

    Solved in post #4, click to view
    • 14 replies
    1. Hi @Matt_Yocum

      Thanks for posting this.

      So if I hear you correctly, you want one action on the Stream Deck to function like a toggle for an AudioSuite plugin?

      1. Quoting your reply from elsewhere here for context:

        Ah intersting I didn't realize it would stop anything else from happening. Basically, for now, I'm almost exclusively using SoundFlow through the stream deck while minimally taking advantage of the keyboard shortcuts (this will most likely change soon as I warm up to the new stuff) but with that in mind, I'm creating shortcuts to open my most used design plugins but also placing an action to close the focus window (essentially creating a toggle show hide) of each plugin. So I'm placing the "wait" action in between so that it doesn't open and then immediately close.

        1. If you want to toggle a specific AudioSuite plugin (if I understood you correctly), check out this post:
          https://forum.soundflow.org/-1025#post-2

          ReplySolution
          1. MMatt Yocum @Matt_Yocum
              2019-09-21 01:42:12.407Z

              Ah man you're the best! Didn't realize it had already been discussed so my apologies for the redundancy!

              I'll give this a shot

              1. No worries :)

                You should also check out the Preset search here:
                https://forum.soundflow.org/-987#post-3

          2. In reply tochrscheuer:
            MMatt Yocum @Matt_Yocum
              2019-09-21 01:39:44.084Z

              That is correct.

              Expanding to a more complex idea it would be cool to also toggle the "focus" of each plugin but then still be able to toggle the visibility of specific plugins which would require SoundFlow to recognize the state of each audio suite as active or inactive. In other words, to open ProQ3, Altiverb, and Pitch n Time, but then to be able to hit Altiverb and have it hide just that plugin.

              This opens a can of worms but hey - thats what this forum is here for yes? :)

              1. Haha yea.
                SoundFlow unfortunately (quite weirdly) doesn't understand if an audio suite window is Targeted (red/active) or not.
                You could automate stuff like always opening the plugins up in un-targeted mode (ie. simulating holding down shift while opening) or stuff like that.
                But honestly I find myself letting go of having multiple AudioSuite windows open more and more now that I'm using SF.

                1. MMatt Yocum @Matt_Yocum
                    2019-09-21 01:46:38.979Z

                    I'll probably have them open as unfocused for now and change my mind later haha. For now though that script above will work even if they are not focused?

                    1. MMatt Yocum @Matt_Yocum
                        2019-09-21 01:47:24.048Z2019-09-21 02:00:01.907Z

                        actually I know next to nothing about scripting so what's the fastest way to add the action of holding down shift while opening the desired plugin to the existing script of

                        var pluginCategory = 'EQ';
                        var pluginName = 'EQ3 7-Band';
                        
                        var win = sf.ui.proTools.getAudioSuiteWindow(pluginName);
                        if (win && win.exists) {
                            win.windowClose();
                        } else {
                            sf.ui.proTools.audioSuiteOpenPlugin({ name: pluginName, category: pluginCategory });
                        }
                        
                        1. MMatt Yocum @Matt_Yocum
                            2019-09-21 02:01:43.990Z

                            Sorry to be a nag with tons of questions! I just hit an additional snag with that template where when I input Pitch 'n Time Pro as a "name" field up top it things that the quote is stopping with the apostrophe that serato uses in the name.... is there a way to code around it?

                            I currently have it as

                            var pluginName = 'Pitch 'n Time Pro';
                            
                            1. You have 2 options.
                              Either use a double quoted string, like this:

                              var pluginName = "Pitch 'n Time Pro";
                              

                              Or escape the single-quote with a backslash:

                              var pluginName = 'Pitch \'n Time Pro';
                              

                              They'll work identically, are just two means to an end.

                              1. MMatt Yocum @Matt_Yocum
                                  2019-09-21 02:11:26.200Z

                                  Excellent!

                              2. In reply toMatt_Yocum:

                                Something like this should work (will open first, then click target de-activate)
                                Holding down shift while automating the menu click doesn't appear to work for me at the moment.

                                var pluginCategory = 'EQ';
                                var pluginName = 'EQ3 7-Band';
                                
                                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();
                                }
                                

                                Side-note: When quoting script code on the forum, to format it nicely, add a line of 3 backticks ``` on a separate line before your code, and again after your code. Edit your post above to see how I did it :)

                                1. MMatt Yocum @Matt_Yocum
                                    2019-09-21 02:09:42.978Z

                                    Amazing! Thank you so much! You've been a huge help :)