No internet connection
  1. Home
  2. How to

Accessing module presets in SpectraLayers Pro 11

By Bergatron Music @Bergatron_Music
    2025-02-17 22:40:22.224Z

    Hey SF.

    Chad posted a great YouTube video on how to Access Module Presets in RX using SF. I have also been wanting to do this in SpectraLayers Pro 11. I can't seem to get SF into the SpectraLayers module menus by holding the command key while using " Click UI Element" while I'm building the macro.

    Does anyone know how to build a macro to get into the Presets of the SpectraLayers Modules ?

    Thanks in advance!

    Mac OS 14.7.2 SpectraLayers Pro 11.0.60 Build 405 (arm64)
    SoundFlow v 5.10.1

    Solved in post #3, click to view
    • 9 replies
    1. Kitch Membery @Kitch2025-02-18 20:15:15.239Z

      Hi @Bergatron_Music

      I just downloaded a 30-day trial, I'll see if I can figure it out. It shouldn't be too difficult assuming the UI elements are accessible. :-)

      1. In reply toBergatron_Music:
        Kitch Membery @Kitch2025-02-18 22:18:15.957Z2025-02-18 23:21:01.269Z

        Hi @Bergatron_Music,

        Here is a video walkthrough on how to do this.

        Note: I noticed at the time of upload that the app is actually called SpectraLayers, and not Spectral Layers. So I fixed that in the script. ;-)

        Here is the final script, that could be converted into a command template.

        function applyModulePreset({ presetName, moduleName }) {
            const spectraLayers = sf.ui.app("com.Steinberg.SpectraLayers11");
        
            spectraLayers.appActivate();
        
            spectraLayers.menuClick({
                menuPath: ["Modules", `${moduleName}...`],
                targetValue: "Enable",
            });
        
            const moduleWindow = spectraLayers.windows.whoseTitle.is(moduleName).first;
        
            moduleWindow.elementWaitFor();
        
            const menuButton = moduleWindow.children.whoseRole.is("AXMenuButton").first;
        
            menuButton.elementClick();
        
            const list = menuButton.children.whoseRole.is("AXList").first;
        
            const rows = list.children.whoseRole.is("AXRow");
        
            const targetRow = rows.find(row => row.children.first.title.value === presetName);
        
            targetRow.children.first.mouseClickElement();
        
            sf.waitFor({
                callback: () => !list.invalidate().exists,
                timeout: 1000,
            });
        
            const applyButton = moduleWindow.buttons.whoseTitle.startsWith("Apply").first;
        
            applyButton.elementClick();
        
            moduleWindow.windowClose();
        
            moduleWindow.elementWaitFor({ waitForNoElement: true });
        }
        
        applyModulePreset({
            presetName: "Light",
            moduleName: "DeClick",
        });
        
        applyModulePreset({
            presetName: "Medium",
            moduleName: "DeEss",
        });
        
        Reply2 LikesSolution
        1. Bergatron Music @Bergatron_Music
            2025-02-18 22:20:00.981Z

            Aww! I hate when that happens! Thanks Kitch!

            Can't wait to try this and report back.

            1. Kitch Membery @Kitch2025-02-18 23:13:28.231Z

              Luckily, I was able to salvage it, I'll update the post above. :-)

              1. In reply toBergatron_Music:
                Kitch Membery @Kitch2025-02-18 23:21:34.044Z

                Updated :-)

                Enjoy!

                1. Bergatron Music @Bergatron_Music
                    2025-02-19 15:39:03.121Z

                    Kitch, thanks so much. The fact that you added the ability to apply multiple modules presets with one preset is incredible. I'm going to try and apply this to SpectraLayers Modulechain as well for an even more powerful use. You're the man!

                    1. Kitch Membery @Kitch2025-02-19 18:15:03.032Z

                      Yes yes yes!

                      Please share what you come up with. :-)

                      1. Bergatron Music @Bergatron_Music
                          2025-02-19 18:21:43.921Z

                          Hey Kitch.
                          Some of the modules like "Reverse" don't have a preset value. It's a "process only" module. For this, I modified your script to open and "Apply" the module then close the module. Pretty slick! Thanks to your video I was able to work this one out and actually understand what I'm doing. THANK YOU!

                          Cheers.

                          function applyModule({moduleName }) {
                              const spectraLayers = sf.ui.app("com.Steinberg.SpectraLayers11");
                          
                              spectraLayers.appActivate();
                          
                              spectraLayers.menuClick({
                                  menuPath: ["Modules", `${moduleName}...`],
                                  targetValue: "Enable",
                              });
                          
                              const moduleWindow = spectraLayers.windows.whoseTitle.is(moduleName).first;
                          
                              moduleWindow.elementWaitFor();
                          
                              const applyButton = moduleWindow.buttons.whoseTitle.startsWith("Apply").first;
                          
                              applyButton.elementClick();
                          
                              moduleWindow.windowClose();
                          
                              moduleWindow.elementWaitFor({ waitForNoElement: true });
                          }
                          
                          applyModule({
                              moduleName: "Reverse",
                          });
                          1. Kitch Membery @Kitch2025-02-19 18:34:22.716Z

                            Awesome! Teach a man to fish! :-)