No internet connection
  1. Home
  2. How to

I want to trim track volume by buttom +0.1 or -0.1

By Yujiro Yonetsu @Yujiro_Yonetsu
    2020-10-26 18:07:28.806Z

    Hello.

    I want to create a script that allows me to raise or lower the volume of all the selected tracks by pressing a button.
    I want to be free of the ⌘ dragging motion when adjusting 0.1.

    But I have no idea on the script to manipulate the volume.
    To be able to do that, would I have to change the track view to "volume" and then drag the end of the automation with the Trim tool to make it work for automation-written tracks as well?

    In order to work on multiple tracks, would it be necessary to create a temporary group and raise or lower it in that group...

    I'm never tired of worrying about it.

    Please help me.

    • 5 replies
    1. Unfortunately, I believe SoundFlow cannot currently control Pro Tools faders with a precision better than 0.5 dB :/

      1. Ah, wait, that's not true. I do think you could simulate writing the fader's value with some keyboard automation.

        You'd use this technique for keyboard simulation:

        And this technique to get the current value of the fader's dB value (the green text below the fader):

        You should start by getting this to work for a single track, then you can later automate creating a temp group for all selected tracks to do it on them all at the same time.

        1. You can also see this post for an example of how to read a value and increment it with a number:

          1. A couple of things to keep in mind. If you have any automation on those tracks then entering the volume information in the fader window won't work because the fader will snap back. If you have PT Ultimate with Trim automation your workflow could be:
            • if any of the selected tracks are trim enabled then you need to consolidate the automation on those tracks.
            • set all selected tracks' automation mode to Trim
            • enter the value that you want to raise/lower by in each tracks' fader window

      2. In reply toYujiro_Yonetsu:
        Yujiro Yonetsu @Yujiro_Yonetsu
          2020-10-26 20:01:45.672Z

          Thank you for many advise.

          For now, I simply built a script for one track. What do you think?

          
          sf.ui.proTools.selectedTrack.trackOutputToggleShow();
          
          
          sf.ui.proTools.mainTrackOutputWindow.mouseClickElement({
              relativePosition: {"x":49,"y":497},
              anchor: "TopLeft",
              isRightClick: false,
              clickType: "DownAndUp",
              isControl: false,
              isCommand: true,
          });
          
          sf.keyboard.press({
              keys: "cmd+c",
          });
          
          let textFromClipboard = sf.clipboard.getText().text;
          
          let textAsNumber = Number(textFromClipboard.trim());
          
          let newNumber = textAsNumber + 0.1;
          
          sf.clipboard.setText({ text: newNumber + '' });
          
          sf.keyboard.press({
              keys: "cmd+v",
          });
          
          sf.keyboard.press({
              keys: "numpad enter",
          });
          

          There is a problem of not being able to do continuous processing.
          Maybe the problem is that the first line is toggle, can you give me a solution?