No internet connection
  1. Home
  2. How to

Pro Tools - Clip Gain Nudge Value

By Gary Keane @Gary_Keane
    2024-03-26 12:48:12.723Z

    Hi all, is there a way for Sound Flow to pop up a window to set the clip gain nudge value?

    Here's what I normally have to do:

    1. Select Pro Tools Menu
    2. Select Preferences
    3. Select Editing Tab
    4. Enter Clip Gain Nudge Value
    5. Select Ok

    Ideally, it would be great to press a button on the stream-deck and a SoundFlow window pops up saying 'enter clip gain nudge value' and I just enter it and hit return and its set.

    Any ideas?

    Solved in post #3, click to view
    • 4 replies
    1. O

      You'll just need to do a prompt for value instead of a fixed value.

      1. Here you go:

        // Get new value from user as array
        const newNudgeValue = sf.interaction.displayDialog({
            prompt:"Enter new nudge value\n(Format: #.#)",
            defaultAnswer:"1.0",
            onCancel:"Abort"
        }).text.split(".")
        
        
        // Open Prefs > Editing tab
        sf.ui.proTools.menuClick({
            menuPath:["Setup","Preferences..."]
        })
        const prefWindow = sf.ui.proTools.windows.whoseTitle.is("Pro Tools Preferences").first;
        
        prefWindow.elementWaitFor();
        
        prefWindow.radioButtons.whoseTitle.is("Editing 3 of 9").first.elementClick();
        
        // Click Nudge value text box
        const nudgeValueField = prefWindow.groups.whoseTitle.is("Clips").first.textFields.whoseTitle.is("4").first
        
        nudgeValueField.elementClick()
        
        // Type new value
        sf.keyboard.press({
            keys: newNudgeValue[0]
        });
        
        sf.keyboard.press({keys:"left"})
        
        sf.keyboard.press({
            keys: newNudgeValue[1]
        });
        
        //Close prefs window
        prefWindow.buttons.whoseTitle.is("OK").first.elementClick()
        
        prefWindow.elementWaitFor({waitType:"Disappear"})
        
        Reply3 LikesSolution
        1. Now if only we could do this with an sdk and not have to open the preferences to adjust it... would give us so many other clip gain powers too.

          1. In reply toChris_Shaw:
            GGary Keane @Gary_Keane
              2024-03-27 09:35:49.819Z

              Chris you absolute hero!