No internet connection
  1. Home
  2. How to

Synch FabFilter Pro-L 2's Attack and Release to Song's Tempo

By Nathan Salefski @nathansalefski
    2023-04-24 23:25:04.110Z

    Something I do very often, that I learned from Nicolas De Porcel, is set my final limiter's attack and release to the song's tempo. Currently I'm doing so by using the Delay & Reverb Time Calculator on anotherproducer.com and manually inputting it. Upon browsing the forum I noticed Kitch mentioned working on a Delay & Reverb Time Calculator script but I could not find a published version. Since it seems to be possible to run that calculation locally, I'd love a macro that could read the session's tempo, calculate 1/8, 1/4 and 1/2 delay times and input those values into Pro-L 2.

    Any push in the right direction would be greatly appreciated!

    Thanks!
    Nathan

    Solved in post #5, click to view
    • 8 replies
    1. Kitch Membery @Kitch2023-04-24 23:41:40.500Z

      It's finished but I've not published it yet. I'll try and get it out in the next few weeks. :-)

      1. Nathan Salefski @nathansalefski
          2023-04-24 23:50:08.374Z

          Awesome thank you!

          1. In reply toKitch⬆:
            Nathan Salefski @nathansalefski
              2023-08-10 03:33:49.127Z

              👀

              1. Kitch Membery @Kitch2023-08-11 06:50:07.122Z

                Hi @nathansalefski,

                I still plan to publish my "Delay & Reverb Calculators" Package into the store as soon as I find time. I'll let you know when it's published.

                1. Nathan Salefski @nathansalefski
                    2023-08-11 07:05:18.761Z

                    May have beat you to it. Would love you to check it out and let me know!

              2. Nathan Salefski @nathansalefski
                  2023-08-10 22:50:18.932Z2023-08-10 23:48:20.976Z

                  For anyone interested here's how I did it:

                  sf.ui.proTools.appActivate();
                  sf.ui.proTools.mainWindow.invalidate();
                  
                  ////////////////////////////////////////////////////////////////////////////////////////////////////
                  
                  function getTempo() {
                      //Make Reference to Tempo Change Window
                      const tempoWin = sf.ui.proTools.windows.whoseTitle.is("Tempo Operations").first
                  
                      //Tempo Operation
                      sf.ui.proTools.menuClick({ menuPath: ["Event","Tempo Operations","Constant..."],});
                  
                      //Get Tempo
                      const tempoValue = tempoWin.textFields.whoseTitle.is("NumericEntryText").allItems[2].value.invalidate().value
                  
                      //Close Tempo Window
                      tempoWin.windowClose();
                  
                      const tempo = Number(tempoValue);
                  
                      return tempo
                  }
                  
                  const bpm = getTempo();
                  
                  //1/8 ATTACK
                  let attackTime = ((60000/bpm)/2).toFixed(2)
                  
                  //1/16 RELEASE
                  let releaseTime = ((60000/bpm)/4).toFixed(2)
                  
                  if (bpm > 150) {
                      //1/4 ATTACK
                      attackTime = ((60000/bpm)).toFixed(2)
                      //1/8 RELEASE
                      releaseTime = ((60000/bpm)/2).toFixed(2)   
                  } else if (bpm < 75) {
                      //1/16 ATTACK
                      attackTime = ((60000/bpm)/4).toFixed(2)
                      //1/32 RELEASE
                      releaseTime = ((60000/bpm)/8).toFixed(2)    
                  }
                  
                  ////////////////////////////////////////////////////////////////////////////////////////////////////
                  
                  const pluginWin = sf.ui.proTools.windows.whoseTitle.is("Plug-in: FabFilter Pro-L 2").first
                  
                  function clickAttack() {
                      let position = sf.mouse.getPosition().position;
                      let f = pluginWin.frame;
                  
                      sf.mouse.setPosition({
                          position: { x: f.x + 253, y: f.y + 580 }
                      });
                  
                      sf.mouse.doubleClick({
                          position: { x: f.x + 253, y: f.y + 580 }
                      });
                  
                      sf.mouse.setPosition({position});
                  }
                  
                  function clickRelease() {
                      let position = sf.mouse.getPosition().position;
                      let f = pluginWin.frame;
                  
                      sf.mouse.setPosition({
                          position: { x: f.x + 333, y: f.y + 580 }
                      });
                  
                      sf.mouse.doubleClick({
                          position: { x: f.x + 333, y: f.y + 580 }
                      });
                  
                      sf.mouse.setPosition({position});
                  }
                  
                  ////////////////////////////////////////////////////////////////////////////////////////////////////
                  
                  function setParameters() {
                  
                      function setAttack() {
                  
                          //Click Attack
                          clickAttack();
                  
                          //Wait
                          sf.wait({intervalMs: 50})
                  
                          //Type Attack Time
                          sf.keyboard.type({ text: `${attackTime}`});
                  
                          //Press Return
                          sf.keyboard.press({ keys: "return"});
                  
                      }
                  
                      function setRelease() {
                  
                          //Click Release
                          clickRelease();
                  
                          //Wait
                          sf.wait({intervalMs: 50})
                  
                          //Type Release Time
                          sf.keyboard.type({ text: `${releaseTime}`});
                  
                          //Press Return
                          sf.keyboard.press({ keys: "return"});
                  
                      }
                  
                      setAttack(); setRelease();
                  }
                  
                  ////////////////////////////////////////////////////////////////////////////////////////////////////
                  
                  function main() {   
                      //Select Monitor Track
                      sf.ui.proTools.trackSelectByName({ names: ["STEREO BUS"],});
                      
                      //Open "Insert 1"
                      sf.ui.proTools.selectedTrack.trackInsertToggleShow({ insertNumber: 10,});
                  
                      //Wait for Plugin Window to Appear
                      pluginWin.elementWaitFor({waitType: "Appear"});
                  
                      //Attack and Release Function
                      setParameters();
                  
                      //Close "Insert 1"
                      sf.ui.proTools.selectedTrack.trackInsertToggleShow({ insertNumber: 10,});
                  
                      //Wait for Plugin Window to Disappear
                      pluginWin.elementWaitFor({waitType: "Disappear"});
                  }
                  
                  main();
                  
                  ReplySolution
                  1. Hello just reviving this, I tried to use it but get errors, has it been updated recently? or should work?

                  2. Nathan Salefski @nathansalefski
                      2023-08-10 23:49:06.707Z2023-08-11 03:02:27.411Z

                      Equally cool, I remade the beloved Delay & Reverb Time Calculator below into a package. Find it in the store!

                      (https://anotherproducer.com/online-tools-for-musicians/delay-reverb-time-calculator/)