No internet connection
  1. Home
  2. How to

clip gain reduction macro

By Mike Brown @Mike_Brown
    2022-03-03 02:21:23.196Z

    I need to create a custom macro for reducing breath sounds for an audio book session. I want to be able to select a section of audio then apply the macros. I understand how to pin to build the macros but didnt understand how to execute a clip gain reduction nudge.

    Seperate Clip> At Selection>clip gain reduction -18dB (prefs set to 6db increments) >Command F for crossfade at beginning and end of seperated clip

    • 3 replies
    1. this should do it:

      
      sf.ui.proTools.appActivateMainWindow();
      
      // separate Clip
      sf.ui.proTools.menuClick({
          menuPath: ["Edit","Separate Clip","At Selection"],
      });
      
      //press shortcut for lowering clip gain (3x  for -18 - assuming clip gain nudge is set for 6 db increments)
      sf.keyboard.press({
          keys: "ctrl+shift+down",
          repetitions: 3,
          fast: true,
      });
      
      //extend start of selection 
      sf.keyboard.press({
          keys: "alt+shift+numpad minus",
      });
      
      // extend end of selection
      sf.keyboard.press({
          keys: "cmd+shift+numpad plus",
      });
      
      //create fades (this assumes that your default fade settings are correct)
      sf.keyboard.press({
          keys: "f",
      });
      
      // move start of selection to original position
      sf.keyboard.press({
          keys: "alt+shift+numpad plus",
      });
      
      // move end of selection to original position
      sf.keyboard.press({
          keys: "cmd+shift+numpad minus",
      });
      1. SSimon Pedeanult @Simon_Pedeanult
          2025-01-21 15:53:03.555Z

          Hi Chris! Tanx for the script!
          How much gain reduction it applies?
          How can I make a deck with multiple icons to apply different amount of gain reduction?
          Example: -1db, -1.5db, -2db etc..

          I know how to make a custom deck but I wold like to know how to modify your script to create my macros.

          Thank you :)

        • R
          In reply toMike_Brown:
          Robert Mallory @Robert_Mallory
            2022-04-07 13:12:47.099Z

            Hi! Fairly new at this, and very very eager to learn ways to do this better. But here's how I've been doing this so far:

            Pro Tools has a shortcut for nudging clip gain: Shift Control Up-Arrow, or Shift Control Down-Arrow. It nudges based on the value you have set in Preferences... Editing...

            So I built a very basic macro using Press Keys to essentially put that pre-existing PT shortcut into a stream deck button. It'll nudge the clip gain for the region, or part of a region, you have highlighted.

            The script looks like this:

            sf.keyboard.press({
            keys: "ctrl+shift+down",
            });

            My next step is to do the same with the PT shortcut to fade/cut the clip gain line, (shift control x). This is basically what Command X does to a volume automation line, like when you want to smooth out a vertical automation move, but to do it in the clip gain line, the shortcut is shift control x, which is more fun to press via one stream deck button than the awkward claw shaped movement for the hand to make over the keyboard :)