We're currently seeing issues with posting on the forum. We're looking into this issue.
No internet connection
  1. Home
  2. How to

How to copy & paste volume gain and clip gain automation when using the field recorder package

First of all, I like and use the "protools field recorder" commands from the field recorder package, but...
Would it be possible to write and extended version that copied and pasted volume and gain automation for the individual clip?

Asked by @Oskar_Skriver

Solved in post #5, click to view
  • 10 replies
  1. Hi @Oskar_Skriver :)
    Thanks for asking this.
    I actually didn't notice that we're losing volume + clip gain info when doing this. Since Pro Tools only has a 1 level copy/paste buffer, I don't see us successfully copying both volume and clip gain for the entirety of the selection and then selectively pasting it after.
    What we could do would be to save a copy of the entire selection on a separate track before doing the channel swapping, and then post-process the new channel by stepping back & forth between the two tracks (copying from the track with the original volume+clip gain and pasting onto the new track that has the proper channel).
    That could be done, although it would be a little slow of course.

    Note we're also looking at automating some of this on a deeper level (AAF).

    1. Let's start by looking at the components of the complete script - eg. the separate steps.

      This script will copy the clip gain clip by clip from one track to the next as you can see here:

      function forEachClip() {
          sf.ui.proTools.getMenuItem('Edit', 'Copy Special', 'Clip Gain').elementClick();
      
          sf.ui.proTools.trackSelectByName({ names: [toTrackName], deselectOthers: true });
      
          sf.ui.proTools.getMenuItem('Edit', 'Paste').elementClick();
      
          sf.ui.proTools.trackSelectByName({ names: [fromTrackName], deselectOthers: true });
      }
      
      var fromTrackName = sf.ui.proTools.selectedTrackNames[0];
      var toTrackName = sf.ui.proTools.visibleTrackNames[sf.ui.proTools.visibleTrackNames.indexOf(fromTrackName) + 1];
      
      sf.ui.proTools.clipDoForEachSelectedClip({
          action: forEachClip
      });
      
      1. Note this script might require a preview version of SoundFlow 3.0 to work - let me know if you need a link.

        1. This version of the script first copies the entire automation from the old track to the new, then goes through to copy/paste all clip gain:

          function selectTrackDisplay(value) {
              var btn = sf.ui.proTools.selectedTrack.popupButtons.whoseTitle.is('Track View selector').first;
              var currentValue = btn.invalidate().value.value;
              if (currentValue !== value) {
                  sf.keyboard.press({ keys: 'minus' });
              }
              currentValue = btn.invalidate().value.value;
              if (currentValue !== value) {
                  sf.ui.proTools.selectedTrack.trackDisplaySelect({ displayPath: [value] });
              }
          }
          
          function forEachClip() {
              //Copy & paste clip gain
              sf.ui.proTools.getMenuItem('Edit', 'Copy Special', 'Clip Gain').elementClick();
              sf.ui.proTools.trackSelectByName({ names: [toTrackName], deselectOthers: true });
              sf.ui.proTools.getMenuItem('Edit', 'Paste').elementClick();
              sf.ui.proTools.trackSelectByName({ names: [fromTrackName], deselectOthers: true });
          }
          
          var fromTrackName = sf.ui.proTools.selectedTrackNames[0];
          var toTrackName = sf.ui.proTools.visibleTrackNames[sf.ui.proTools.visibleTrackNames.indexOf(fromTrackName) + 1];
          
          //Copy & paste automation
          selectTrackDisplay('volume');
          sf.ui.proTools.getMenuItem('Edit', 'Copy Special', 'All Automation').elementClick();
          selectTrackDisplay('waveform');
          sf.ui.proTools.trackSelectByName({ names: [toTrackName], deselectOthers: true });
          selectTrackDisplay('volume');
          sf.ui.proTools.getMenuItem('Edit', 'Paste').elementClick();
          selectTrackDisplay('waveform');
          sf.ui.proTools.trackSelectByName({ names: [fromTrackName], deselectOthers: true });
          
          sf.ui.proTools.clipDoForEachSelectedClip({
              action: forEachClip
          });
          
          ReplySolution
    2. In reply tochrscheuer:
      Donny @Dreamcatcher_Studio
        2021-08-19 01:18:28.047Z2021-08-19 01:48:29.902Z

        @chrscheuer Is there a reason that this wouldn't work for whatever is copied to clipboard... like an audio region for instance?

        1. Hi there,

          If you're having issues with this script, it's better to open a new thread as this one is already marked as solved :) I don't fully understand your question. The script copy/pastes automation and clip gain, not audio regions. It sounds like you may be trying to do something else.

        2. B
          In reply tochrscheuer:
          Ben Rauscher @Ben_Rauscher
            2025-01-31 02:32:39.067Z

            is there a way to retrieve the clip gain value from the Pro Tools clipboard? this command just logs a boolean...

            log ( sf.app.proTools.copySpecial({ automationData: "ClipGain" }) );
            
            1. I don't think Pro Tools copies this data to the global clipboard (codenamed pasteboard in macOS) but instead to Pro Tools' own internal clipboard, so the command you mention here would not give you the details.
              I don't think there's currently a way to retrieve this information, unfortunately.

              1. BBen Rauscher @Ben_Rauscher
                  2025-01-31 22:19:26.943Z

                  Yeah; I've been digging and nothing is returning the number, not even sf.keyboard. Is there a way to insert some sort of data-capture function between an AudioSuite window and the timeline -- like Defaulter or the Pro Loudness Analyzer -- to return that data output for further SF uses?

              2. B
                In reply tochrscheuer:
                Ben Rauscher @Ben_Rauscher
                  2025-02-01 16:44:24.692Z

                  Is there a way to tell if Pro Tools is not processing any commands resulting from an AudioSuite through uiObserver? If ProTools logs an idle state, the plugin has completed.