No internet connection
  1. Home
  2. How to

Open mono/stereo AudioSuite plugin based on selected track/clip

By Joachim Jorddal @Joachim_Jorddal
    2021-05-04 09:20:14.056Z

    I use Audiosuite a lot and have my most used plugins opening from buttons on my Stream Deck which is really handy.

    The only issue I have is that some of them (e.g. Waves RCompressor) are either mono or stereo and I don't want to spend two buttons on my deck just for opening one plugin.

    Is it possible to open either the mono or stereo version of the plug from the same button based on my selected clip or track in PT?
    So if I have a stereo clip/track selected the button will open the RCompressor Stereo and if I have a mono clip/track selected the button will open RCompressor Mono.

    Solved in post #2, click to view
    • 7 replies
    1. samuel henriques @samuel_henriques
        2021-05-04 09:52:39.153Z

        Hello @Joachim_Jorddal,

        try this:

        const track = sf.ui.proTools.selectedTrack
        const width = track.groups.whoseTitle.is('Audio IO').first.sliders.whoseTitle.contains('Pan').count;
        
        if (width == 1) {
        
            // Open Mono Plugin
        
        } else {
        
            // Open Stereo Plugin
        
        }
        
        Reply2 LikesSolution
        1. JJoachim Jorddal @Joachim_Jorddal
            2021-05-05 09:19:32.140Z

            It works perfectly. Thank you so much!

            1. This is really cool and incredibly useful for pesky Altiverb. Templated and building with it now.

              Question, how hard would it be to add QUAD, 5.0 and 5.1 to this?

              Bests,
              Owen

              1. There's no elegant way to determine a track width greater than stereo. The only way I know of is to get all of the available plugins from the popup menu and check if they end with "(5.0)" , (5.1) etc.

                1. and even that isn't reliable if a previous insert is changing the track width.

                  1. In reply toChris_Shaw:

                    Ahh, oh well, not a hill I must die on :) This is already super useful and handles most case scenarios

              2. D
                In reply toJoachim_Jorddal:
                AK @DJAK
                  2024-03-07 22:45:01.884Z

                  Hi. I posted recently for a script like this and haven't received a response but this looks like what I am looking for. I tried it but it does not work. I added this script both before and after the plugin and neither worked. Is there a fix for this? Thanks