No internet connection
  1. Home
  2. Support

Help writing a Spectral Repair script

By Carlo Scrignaro @Carlo_Scrignaro
    2019-09-25 15:37:02.051Z

    Hi all,

    I'm seeking some help writing a script for Spectral Repair in RX7. I am able to get it open with the help of someone elses script, but I want to be able to change/select settings within the Window. For example, I press a button on Stream Deck, Spectral Repair opens and Stream Deck goes into a Folder which contains "Vertical", "Horizontal", "Render", etc., and the ability to select the other tabs in SR (Replace, Pattern, and Partials + Noise). Basically I want to have the SR interface layed out on my Stream Deck and need some help coding it.

    I hope that makes sense!

    Solved in post #6, click to view
    • 11 replies
    1. That's a great idea!

      The way to do this would be to create a new Deck and to create some new macros, all specifically for Spectral Repair.
      Each of these macros should do what you want to do, for example click Vertical or Horizontal, Render etc.
      This should be doable mostly with the "Click UI Element" action.

      Now when you have those macros made, you can add them to the Deck.

      Last thing is to make a macro that opens Spectral Repair and shows the Deck.

      1. CCarlo Scrignaro @Carlo_Scrignaro
          2019-09-26 15:07:10.945Z

          Awesome! I was trying to script it the whole time lol the UI macro is much much easier. How would I do control value changes like Strength up and down, etc.?

          1. @Carlo_Scrignaro I would start with the other macros, and get it working with a deck. Adjusting values would require some more advanced scripts, I'd be happy to help you when you get there. But start with button presses etc., that's a better (simpler) place to get started on this :)

            1. CCarlo Scrignaro @Carlo_Scrignaro
                2019-09-26 15:38:09.756Z

                Thanks Christian, got the deck and Macros made layed out :) Ready to move ahead with scripting - which is currently beyond my capabilties.

                I have two sort of side questions while I have you:

                • I'd like to be able to trigger a folder AND at the same time run a command, currently I can only do one or the other. For example, I have a Deck layout appear when RX is my targeted program and I would like to be able to press Spectral Repair which opens the module in RX AND opens the folder I've created with the Macros. Is this possible?

                • Second question - how do I get images to display on StreamDeck after I select Paste from Clipboard? It shows up on the Deck view in SF, but doesn't appear on my StreamDeck. Not sure what I'm doing wrong there.

                Hope that all makes sense! Really starting to love this workflow by the way. It has made my work much more fluent so far. Still in trial, but likely will switch over to a subscription after the trial expires.

                1. For example, I have a Deck layout appear when RX is my targeted program and I would like to be able to press Spectral Repair which opens the module in RX AND opens the folder I've created with the Macros. Is this possible?

                  You'll need the "Show Deck on Stream Deck" action in your macro.
                  So you should build a macro that has 2 actions:

                  • Show Deck on Stream Deck - set this to the appropriate Deck and the Stream Deck Device
                  • Show the Spectral Repair module
                  ReplySolution
                  1. Second question - how do I get images to display on StreamDeck after I select Paste from Clipboard? It shows up on the Deck view in SF, but doesn't appear on my StreamDeck. Not sure what I'm doing wrong there.

                    Have you clicked "Show Deck"? Does the Stream Deck properly show normal titles? Can you show other Decks onto your Stream Deck?
                    If not, it could be that your SoundFlow plugin is not fully set up in the Stream Deck app. Do you have the "SoundFlow Full Screen" profile installed on the Stream Deck? If not, go to the SD app, choose More Actions, find the Soundflow plugin and click "Install Profiles"

                    1. CCarlo Scrignaro @Carlo_Scrignaro
                        2019-09-26 15:50:39.660Z

                        Ah I figured out the problem, it was because the images I copied were Vectors. Only solid images will display

                        1. Cool :)

                          Wrt the "Strength up and down" - take a look at the source code of my "iZotope Slider #1 +" script (and related) in the Dialog Editing iZotope package (click View Source on the command once installed). Also quoted here:

                          
                          function setSliderValueDelta(sliderNum, deltaValue) {
                          
                              var moduleWin = sf.ui.izotope.floatingWindows.whoseDocument.isNullOrEmpty.first;
                              if (!moduleWin.exists) throw 'Module not found';
                          
                              var panel = moduleWin.groups.whoseDescription.contains('EffectPanel').first;
                              if (!panel.exists) throw 'Could not find EffectPanel';
                          
                              var slider = panel.children.allItems.filter(function(c){ return c.role == 'AXSlider' })[sliderNum - 1];
                              if (!slider || !slider.exists) throw 'Could not find slider';
                          
                              var intDelta = Math.floor(deltaValue * 10);
                              var absDelta = Math.abs(intDelta);
                          
                              if (intDelta > 0) {
                                  for (var i = 0; i < absDelta; i++)
                                      slider.elementClick({ actionName: 'AXIncrement' });
                              } else if (intDelta < 0) {
                                  for (var i = 0; i < absDelta; i++)
                                      slider.elementClick({ actionName: 'AXDecrement' });
                              }
                          }
                          
                          setSliderValueDelta(1, 0.2);
                          

                          This might help you along the way.

                          1. CCarlo Scrignaro @Carlo_Scrignaro
                              2019-09-26 16:29:31.525Z

                              Thanks Christian, got it all sorted now! Only thing that's bugging me is click UI for Attenuate, Replace, etc. keep changing. I'll select Replace and it will switch to Pattern or one of the others. Not sure why it is doing this. I have the macros set correctly; one macro for each (ex. Attenuate marco = click attenuate, etc.). It starts off correctly then on second open they get messed up. Any ideas?

                              1. Are you talking about making 4 buttons, one for Attenuate, one for Replace, one for Pattern etc?
                                How does your macro look, can you attach a screenshot?

                                1. CCarlo Scrignaro @Carlo_Scrignaro
                                    2019-09-26 16:37:12.381Z

                                    Disregard, got it sorted lol there was a weird thing happening with Radio Button #x and I switched it over to the correct command/tab - thanks!