No internet connection
  1. Home
  2. How to

Sonarworks Plugin Profiles on SD

By Gabriel Lundh @Gabriel_Lundh
    2019-12-02 22:35:47.783Z

    Hi! I do not know if people here uses Sonarworks, but if so, have anybody figuered out a way to more intelligently way to map different Profiles to SD-keys so one can quickly change from speakers to headphones or just disable Sonarworks with a button? I'm trying to make a macro using "Mouse Click relevant to UI element" but SF can't recognize the elements properly.

    Would love some insight!
    Thanks!

    • 22 replies

    There are 22 replies. Estimated reading time: 17 minutes

    1. Hi Gabriel.

      Can you show us a screenshot of the app? I don't use Sonarworks. Do you know if it's controllable by MIDI?

      1. G
        In reply toGabriel_Lundh:
        Gabriel Lundh @Gabriel_Lundh
          2019-12-03 17:30:12.321Z

          Hi Christian!
          I Just google around and I noticed it's midi controllable in Abelton, and should be in Pro Tools - Although I do not know how to do it there. I saw that the most important features I want to have on the stream deck is available for automation, is there a way to map a command to change them in automation mode?

          Here is a screenshot of the interface:

          And here is the automation window:

          Thank you for all your help!
          My best,
          Gabriel

          1. Ah ok I wasn't aware this was an insert plugin inside Pro Tools. I thought it was a standalone app.

            Unfortunately SoundFlow doesn't understand the contents of plugins in Pro Tools. So in this window we understand the Pro Tools defined buttons (such as the dark grey popup menus in the top of the window), but we don't understand any of the Sonarworks stuff.
            To control this you would have to simulate mouse clicks relative to the window position. This would work for simple things such as switching to/from headphones and speakers though :)

            This post has a little more info:
            https://forum.soundflow.org/-1092#post-2

            Basically you'll need to use - in the Macro Editor - the "Mouse Click Relative to UI Element" action. When you click "PICK" to choose the UI Element, make sure to click in the window's empty title bar so that the full window is selected (it will not work to click inside the plugin).
            Then you'll specify X and Y coordinates relative to the top left corner of the plugin. To measure this distance, I use the macOS shortcut ctrl+shift+alt+cmd+4 and then drag from the top left corner down to the position of the button you want to click.

            1. GGabriel Lundh @Gabriel_Lundh
                2019-12-03 17:38:07.064Z

                Thank you for such a quick reply! I will try this!

                My best,
                Gabriel

                1. I'm not sure if you've solved your problem, Gabriel, but another way to do this would be to store your settings as a PT plugin preset an use SF to switch the plugin preset.

            2. A
              In reply toGabriel_Lundh:
              Andrew Downes @Andrew_Downes
                2020-12-23 21:22:12.319Z

                Hi Gabriel
                What Chis Shaw says is exactly how I do it. Here is the script I have. Just save each Speaker or Headphone profile as a preset in the plugin and have Soundflow select it.

                sf.ui.proTools.appWaitForActive();
                
                sf.ui.proTools.trackGetByName({ name: "Sonarworks", makeVisible: true }).track.trackInsertToggleShow({
                    insertNumber: 2,
                    targetValue: "Enable",
                });
                
                sf.ui.proTools.windows.whoseTitle.is('Plug-in: Sonarworks Reference 4').first.popupButtons.whoseTitle.is('Librarian menu').first.popupMenuSelect({
                    menuPath: ["<factory default>"],
                });
                
                sf.ui.proTools.viewCloseFocusedFloatingWindow();
                

                Here is a screen shot of what my streamdeck looks like

                I hope this helps.

                1. GGabriel Lundh @Gabriel_Lundh
                    2021-01-11 18:09:32.913Z

                    Thanks alot Andrew for sharing your script!
                    That is great - I will try it from now on!

                    All my best,
                    Gabriel

                    1. In reply toAndrew_Downes:
                      DDan Bozek @Dan_Bozek
                        2021-01-11 23:04:35.465Z

                        I'm new to SoundFlow and a devoted Sonarworks user. You just made me VERY happy. :)

                      • I
                        In reply toGabriel_Lundh:
                        Iwan Morgan @Iwan_Morgan
                          2021-01-20 18:52:49.361Z

                          Hi there,

                          Thanks for posting the script above. I've managed to edit it to select my factory default and it works but choosing my "No Correction" preset doesn't seem to work. Would someone be able to help? I've just started setting it up today so it's all quite new to me. The script I made for No Correction is:

                          sf.ui.proTools.appWaitForActive();

                          sf.ui.proTools.trackGetByName({ name: "MasterMon", makeVisible: true }).track.trackInsertToggleShow({
                          insertNumber: 10,
                          targetValue: "Enable",
                          });

                          sf.ui.proTools.windows.whoseTitle.is('Plug-in: Sonarworks Reference 4').first.popupButtons.whoseTitle.is('Librarian menu').second.popupMenuSelect({
                          menuPath: [""],
                          });

                          sf.ui.proTools.viewCloseFocusedFloatingWindow();

                          And I get this error:
                          TypeError" Cannot read property 'popupMenuSelect' of undefined (Sonarworks Inactive line 8) - I think i'm on the right track but something is tripping it up. I just want to toggle between correction active/inactive with the level drop SW introduces intact.

                          Thanks,
                          Iwan

                          1. You've left the menuPath:{""] empty.
                            Put your preset name between the quotes

                            1. IIwan Morgan @Iwan_Morgan
                                2021-01-21 15:08:07.842Z

                                Hi Chris,

                                Thanks for this, I don't think hte script copied across to the previous post properly for some reason, maybe because those fields were red? Anyway, the name of the preset I want is in there ("No Correction") but still isn't working although it does open the plugin window:

                                This is the message I get:

                                Also, big fan of your work with SFA (and PE, Bob D...). I did some work with Gruff a few years back - the records you made together are so important to my generation of Welsh people.

                                Cheers

                                Iwan

                                1. The other thing I believe is wrong here is on the same line. The script editor is underlining .second. Try changing that to first

                            2. In reply toGabriel_Lundh:

                              FYI Iwan, This is how you quote code into the forum so that it is formatted correctly:
                              How to quote code in the SoundFlow forum.

                              1. In reply toGabriel_Lundh:
                                Kitch Membery @Kitch2021-01-22 03:34:54.324Z

                                Hi @Gabriel_Lundh,

                                This is not exactly what you want but I could turn it into a Command Template for customization, adding the disable feature;

                                It will toggle between two presets. It's a start though!

                                //Enter your master track name here
                                const masterTrack = 'MasterMon';
                                
                                //Enter Presets to Toggle Between
                                const presetNameOne = 'Preset One';
                                const presetNameTwo = 'Preset Two';
                                
                                function togglePresets(preset) {
                                    sf.ui.proTools.appActivateMainWindow();
                                
                                    sf.ui.proTools.trackGetByName({ name: "MasterMon", makeVisible: true }).track.trackInsertToggleShow({
                                        insertNumber: 10,
                                        targetValue: "Enable",
                                    });
                                
                                    const sonarworks = sf.ui.proTools.windows.whoseTitle.is("Plug-in: Sonarworks Reference 4").first;
                                    const libraryMenu = sonarworks.popupButtons.whoseTitle.is("Librarian menu").first;
                                
                                    if (libraryMenu.value.invalidate().value === presetNameOne) {
                                        libraryMenu.popupMenuSelect({
                                            menuPath: [presetNameTwo],
                                        });
                                    } else {
                                        libraryMenu.popupMenuSelect({
                                            menuPath: [presetNameOne],
                                        });
                                    }
                                
                                    sf.ui.proTools.viewCloseFocusedFloatingWindow();
                                }
                                
                                togglePresets();
                                
                                1. IIwan Morgan @Iwan_Morgan
                                    2021-01-22 16:19:28.133Z

                                    Hey there Kitch,

                                    Thanks man, this works a treat.

                                    This tool is really great the more I'm getting into programming and looking at the repetitive tasks I have on every session

                                    1. Kitch Membery @Kitch2021-01-22 20:20:43.106Z

                                      @Iwan_Morgan Yeah... So good!! :-)

                                      1. IIwan Morgan @Iwan_Morgan
                                          2021-05-08 20:55:36.251Z

                                          Hi Kitch et al,
                                          I've been using the above script for a while and it has been so useful. Until I upgraded to the new version of Sonarworks which is now called SoundID. I have tried replacing any reference to Sonarworks with the AAX plugin's full name "SoundID Reference AAX Plugin" but it doesn't work. Also tried the sonarworks script and replaced the "Plug-in: Sonarworks Reference 4" line with "Plug-in: SoundID Reference AAX Plugin" and it also doesn't work.

                                          Any tips? Here is my current attempt to script:

                                          //Enter your master track name here
                                          const masterTrack = 'MasterMon';
                                          
                                          //Enter Presets to Toggle Between
                                          const presetNameOne = 'Correction Active';
                                          const presetNameTwo = 'No Correction';
                                          
                                          function togglePresets(preset) {
                                              sf.ui.proTools.appActivateMainWindow();
                                          
                                              sf.ui.proTools.trackGetByName({ name: "MasterMon", makeVisible: true }).track.trackInsertToggleShow({
                                                  insertNumber: 10,
                                                  targetValue: "Enable",
                                              });
                                          
                                              const sonarworks = sf.ui.proTools.windows.whoseTitle.is("Plug-in: SoundID Reference AAX Plugin").first;
                                              const libraryMenu = sonarworks.popupButtons.popupButtons.whoseTitle.is("Librarian menu").first;
                                          
                                              if (libraryMenu.value.invalidate().value === presetNameOne) {
                                                  libraryMenu.popupMenuSelect({
                                                      menuPath: [presetNameTwo],
                                                  });
                                              } else {
                                                  libraryMenu.popupMenuSelect({
                                                      menuPath: [presetNameOne],
                                                  });
                                              }
                                          
                                              sf.ui.proTools.viewCloseFocusedFloatingWindow();
                                          }
                                          
                                          togglePresets();
                                          
                                          1. Kitch Membery @Kitch2021-05-08 20:59:05.009Z

                                            Hi @Iwan_Morgan,

                                            I have not updated it yet. But I think there is a trial mode. I'll have to take a look at the new version when I get a chance and see what can be done. :-)

                                            Rock on!

                                            1. IIwan Morgan @Iwan_Morgan
                                                2021-05-08 21:01:51.819Z

                                                Hi Kitch, I'm using the trial but if I can get this script to work I will definitely upgrade. The ability to tweak the correction curves and translation check features are very good.

                                                1. Kitch Membery @Kitch2021-05-08 21:38:43.589Z

                                                  @Irwan_Morgan,

                                                  I agree :-) I suggested this to Sonarworks back in an early version, as I only want to correct the low end as I have treatment for the high frequencies. Glad they implemented it. Next, let's hope they work out a way to correct the phase introduced by the EQ.

                                                  You were so close BTW! I'd made an error in my previous script where I did not reference the master track variable name in the following line;

                                                      sf.ui.proTools.trackGetByName({ name: masterTrack, makeVisible: true }).track.trackInsertToggleShow({
                                                          insertNumber: 10,
                                                          targetValue: "Enable",
                                                      });
                                                  

                                                  Create your presets "Correction Active" and "No Correction" and then copy/paste this script and it should work.

                                                  //Enter your master track name here
                                                  const masterTrack = 'MasterMon';
                                                  
                                                  //Enter Presets to Toggle Between
                                                  const presetNameOne = 'Correction Active';
                                                  const presetNameTwo = 'No Correction';
                                                  
                                                  function togglePresets(preset) {
                                                      sf.ui.proTools.appActivateMainWindow();
                                                  
                                                      sf.ui.proTools.mainWindow.invalidate();
                                                  
                                                      sf.ui.proTools.trackGetByName({ name: masterTrack, makeVisible: true }).track.trackInsertToggleShow({
                                                          insertNumber: 10,
                                                          targetValue: "Enable",
                                                      });
                                                  
                                                      const sonarworks = sf.ui.proTools.windows.whoseTitle.is("Plug-in: SoundID Reference AAX Plugin").first;
                                                      const libraryMenu = sonarworks.popupButtons.whoseTitle.is("Librarian menu").first;
                                                  
                                                      if (libraryMenu.value.invalidate().value === presetNameOne) {
                                                          libraryMenu.popupMenuSelect({
                                                              menuPath: [presetNameTwo],
                                                          });
                                                      } else {
                                                          libraryMenu.popupMenuSelect({
                                                              menuPath: [presetNameOne],
                                                          });
                                                      }
                                                  
                                                      sf.ui.proTools.viewCloseFocusedFloatingWindow();
                                                  }
                                                  
                                                  togglePresets();
                                                  

                                                  Note: This script could be improved a bit by adding some code to open and close "Inserts F-J" if it is hidden. :-)

                                                  Rock on!

                                                  1. IIwan Morgan @Iwan_Morgan
                                                      2021-05-09 19:47:51.124Z

                                                      Thanks for this @Kitch I think it's close but not quite there. When i press the button to trigger the code I get a "Could not find selected track's insert button (SoundID Toggle: Line 13)

                                                      I tried changing line 13 to have th exact name of my master track (MasterMon) but I still get the same message. Any ideas?

                                                      Thanks again for your help.

                                                      Iwan

                                                      1. Kitch Membery @Kitch2021-05-09 19:57:04.507Z

                                                        Hi @Iwan_Morgan,

                                                        For this to work make sure that;

                                                        • Your master track is named "MasterMon" (Which you have done)
                                                        • Inserts F-J are displayed in the edit window?
                                                        • Your Sound ID insert is on insert J (the last insert slot) on your master track.
                                                        • You've created two presets "Correction Active" and "No Correction" with the relevant settings.

                                                        Rock on