No internet connection
  1. Home
  2. How to

Toggling AudioSuite Processing Options

By @alex
    2020-03-03 18:26:47.505Z

    I'm trying to come up with a script that lets me toggle between two different sets of AudioSuite processing options (create individual files/clip by clip and create continuous file/entire selection). I know already how to change the options:

    asWin.audioSuiteSetOptions({
        processingInputMode: "ClipByClip",
        processingOutputMode: "CreateIndividualFiles",
    });
    

    What I can't figure out is how to read the current settings in order to toggle them. There doesn't seem to be audioSuiteGetOptions or similar. Is there another way of achieving what I want?

    Solved in post #5, click to view
    • 4 replies
    1. Hi @alex

      Do you want to read them so that you have one command that just toggles between the two states?

      1. A@alex
          2020-03-06 21:21:42.628Z

          Correct!

          1. Great - you should be able to do it like this (this works on a named AudioSuite plugin, there's also an option to work on the top-most plugin if you prefer):

            var pluginName = 'AudioTrack Stereo';
            
            if (sf.ui.proTools.getAudioSuiteWindow(pluginName).popupButtons.whoseTitle.is('Processing Output Mode').first.value.invalidate().value === "create individual files") {
            
            }
            else {
            
            }
            
            1. A@alex
                2020-03-06 23:11:57.064Z

                Thanks, this worked perfectly. Here's the complete script in case anybody's interested:

                var win = sf.ui.proTools.firstAudioSuiteWindow;
                
                if (win.popupButtons.whoseTitle.is('Processing Output Mode').first.value.invalidate().value === "create individual files") {
                    win.audioSuiteSetOptions({
                    processingInputMode: "EntireSelection",
                    processingOutputMode: "CreateContinuousFile"
                    });
                }
                else {
                    win.audioSuiteSetOptions({
                    processingInputMode: "ClipByClip",
                    processingOutputMode: "CreateIndividualFiles"
                    });
                }
                
                Reply3 LikesSolution