No internet connection
  1. Home
  2. Support

Soundflow grabs a random track when running a small script, but only on th efirst time it is run.

By Randall Smith @Randall_Smith
    2022-10-07 21:30:44.966Z

    Soundflow grabs a random track when running a small script, but only on th efirst time it is run.

    System Information

    SoundFlow 5.1.11

    OS: darwin 17.7.0

    ProductName: Mac OS X
    ProductVersion: 10.13.6
    BuildVersion: 17G8037

    Steps to Reproduce

    1. Select clip for measurement
    2. Run VisLM Script

    Expected Result

    should keep clip selected and analyze using VisLM

    Actual Result

    Jumps to the first track in session and runs AS plugin on random audio.

    Workaround

    Running the script twice fixes this.

    Other Notes

    moving back to 5.0.5 solves this.


    Links

    User UID: h5usDXSaKHSy12ByPzI67bSN9353

    Feedback Key: sffeedback:h5usDXSaKHSy12ByPzI67bSN9353:-NDoLtS-cVYTksbRZeCw

    Feedback ZIP

    • 11 replies
    1. R
      Randall Smith @Randall_Smith
        2022-10-07 21:41:23.719Z
        
        
        
        
        sf.ui.proTools.appActivateMainWindow();
        
        var asWin = sf.ui.proTools.getAudioSuiteWindow("NUGEN VisLM2");
        if (!asWin.exists) {
            sf.ui.proTools.menuClick({
                menuPath: ["Window", "Configurations", "1: Blank"],
            });
            asWin = sf.ui.proTools.audioSuiteOpenPlugin({
                category: "Sound Field",
                name: "NUGEN VisLM2",
            }).window;
        }
        
        
        sf.ui.proTools.firstAudioSuiteWindow.windowMove({
            position: { "x": 1985, "y": 10 },
        });
        
        sf.ui.proTools.firstAudioSuiteWindow.audioSuiteSelectPreset({
            presetMenuPath: ["VISLm 1770-4 Default"],
        });
        
        sf.ui.proTools.firstAudioSuiteWindow.buttons.whoseTitle.is('Analyze').first.elementClick();
        
        
        1. Kitch Membery @Kitch2022-10-07 22:19:01.636Z

          Hi @Randall_Smith,

          This is untested as I don't have VisLM, but let me know how it goes.

          sf.ui.proTools.appActivateMainWindow();
          
          sf.ui.proTools.mainWindow.invalidate();
          
          let asWin = sf.ui.proTools.getAudioSuiteWindow("NUGEN VisLM2");
          
          if (!asWin.exists) {
          
              sf.ui.proTools.menuClick({
                  menuPath: ["Window", "Configurations", "1: Blank"],
              });
          
              asWin = sf.ui.proTools.audioSuiteOpenPlugin({
                  category: "Sound Field",
                  name: "NUGEN VisLM2",
              }).window;
          }
          
          asWin.windowMove({
              position: {
                  "x": 1985,
                  "y": 10
              },
          });
          
          asWin.audioSuiteSelectPreset({
              presetMenuPath: ["VISLm 1770-4 Default"],
          });
          
          asWin.buttons.whoseTitle.is('Analyze').first.elementClick();
          

          I added code to clear the SoundFlow Cache for the main window of Pro Tools, and also made sure that the AudioSuite window that is being analyzed is always the "NUGEN VislM2".

          Let me know if the issue persists. If it does, there may be another script that is being triggered in your account somewhere.

          1. Randall - thanks for sharing the scripts with issues here!

            Kitch, Randall and their team have been seeing these issues with 5.1.x but not in 5.0.x which is why I've asked them to share the scripts so we can see what causes the regression(s).

            Great suggestions from Kitch on improving the script to make it more stable / best practices. Let me know how this goes.

            Kitch, forr the other reports Randall has posted, please also take a look to see if you can help make improvements/adjustments to the scripts.

            1. Randall, I'm curious about the window move you have in there and why this is there? Ideally, this would not be using hardcoded positions but be relative to a specific screen on the device.

              Since you're using window move actions, let me double check if you have "Displays have separate spaces" turned off or on? See our known issues doc here (it should be off):

              https://soundflow.org/docs/getting-started/install-soundflow/known-issues#mac-os-spaces

              Is there a specific reason you're using a Window Configuration here btw? I'd probably invalidate the cache after changing a window configuration – but overall, doing that seems unnecessary and might add instability. Pro Tools can be very slow to change window configs, so I can see a case where that part of the code will take longer but there's no code in the script to wait for that window config change to complete.

              1. RRandall Smith @Randall_Smith
                  2022-10-10 16:54:28.655Z

                  We did the window configuration because when other AS plugins or insert plug in windows were open it could sometimes cause the wrong buttons to be executed in the script. Pulling up a clean window config in the case is basically like the 'close all floating windows' command but will also close target focused plug in windows,.

                  1. Oh ok, yea I thought that might be the case. @Kitch it might be worth it to, instead of using window configs for this, to manually loop through proTools.windows and close all of them (except the main window - check for the existence of "Edit: " in the title).

                    1. Kitch Membery @Kitch2022-10-10 20:33:17.046Z

                      Good thinking @chrscheuer,

                      @Randall_Smith This script should do the trick :-)

                      //Activate and invalidate Pro Tools main window
                      sf.ui.proTools.appActivateMainWindow();
                      sf.ui.proTools.mainWindow.invalidate();
                      
                      //Get windows whose title does not start with "Edit: "
                      const nonEditWindows = sf.ui.proTools.windows.filter(win => !win.title.invalidate().value.startsWith("Edit: "))
                      
                      //Close all windows whose title does not start with "Edit: "
                      nonEditWindows.forEach(win => win.windowClose());
                      
                      //Open Nugen VisLM2
                      const asWin = sf.ui.proTools.audioSuiteOpenPlugin({
                          category: "Sound Field",
                          name: "NUGEN VisLM2",
                      }).window;
                      
                      //Select AudioSuite preset
                      asWin.audioSuiteSelectPreset({
                          presetMenuPath: ["VISLm 1770-4 Default"],
                      });
                      
                      //Analyse Selection
                      asWin.buttons.whoseTitle.is('Analyze').first.elementClick();
                      
                      //Wait for Analyze to finish
                      sf.ui.proTools.waitForNoModals();
                      

                      I hope that helps. :-)

                      Note: If this script continues to select a random track on first run, let me know.

                      1. RRandall Smith @Randall_Smith
                          2022-10-10 21:32:42.020Z

                          This seems to address the issue. Thank you.

                          1. In reply toKitch:
                            Kitch Membery @Kitch2022-10-10 21:37:41.519Z

                            Wonderfull, One down two to go :-)

              2. In reply toRandall_Smith:
                Kitch Membery @Kitch2022-10-07 22:03:11.620Z

                Hi Randall,

                Is the "VisLM" script one you've downloaded from the Store?

                1. RRandall Smith @Randall_Smith
                    2022-10-10 16:52:55.064Z

                    No. This is one we did here.