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
Linked from:
- Christian Scheuer @chrscheuer2019-06-17 10:56:09.202Z
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).
Christian Scheuer @chrscheuer2019-06-17 11:12:26.292Z
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 });
Christian Scheuer @chrscheuer2019-06-17 11:12:59.631Z
Note this script might require a preview version of SoundFlow 3.0 to work - let me know if you need a link.
Christian Scheuer @chrscheuer2019-06-17 11:21:50.962Z
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 });
- In reply tochrscheuer⬆:Donny @Dreamcatcher_Studio
@chrscheuer Is there a reason that this wouldn't work for whatever is copied to clipboard... like an audio region for instance?
Christian Scheuer @chrscheuer2021-08-19 11:45:54.715Z
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.
- BIn reply tochrscheuer⬆:Ben Rauscher @Ben_Rauscher
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" }) );
Christian Scheuer @chrscheuer2025-01-31 21:59:08.355Z
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.- BBen Rauscher @Ben_Rauscher
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?
- BIn reply tochrscheuer⬆:Ben Rauscher @Ben_Rauscher
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.