Infinite Clip-Gained clips on to be muted on Pro Tools.
Hello guys, not sure if anyone has managed to develop something like this already. I figured maybe SoundFlow could help me achieve this though. I received an AAF with some clips, with their clip-gain pulled all the way down to infinite (as a way to mute the clips). I know this can be easily converted to volume automation. But I'm more after converting them to MUTED/grey clips instead, with no clip-gain or volume automation for a clean start, whilst preserving the intention of the editor. Any ideas as to how one could go about doing this?? I had to do this manually the last time and it was a royal pain
- Chris Shaw @Chris_Shaw2021-12-04 02:52:53.916Z2021-12-04 14:09:08.335Z
I don’t think that this possible. Unfortunately, there is no way for SF to determine the value of the clip gain in a clip.
- DDenis Estevez @Denis_Estevez
Is that really so @chrscheuer & @poterukha ? I was thinking that using some or part of the script from the Defaulter package could help, perhaps (as it somehow determines previos clip based gain - though I'm aware it uses a plugin to achieve this!). Any clever ideas not explored before, perhaps, chaps?
Christian Scheuer @chrscheuer2021-12-04 13:11:47.555Z
This is something I would like us to be able to automate as well, but right now the shipping version of SF does not have this ability. Hopefully we'll be able to do these kinds of things in the future.
- LLouis BART @Louis_BART
Hi Christian
Any news on this ?
I am craving for this feature... as i'm working on a show where the editor went with A LOTS of those infinite clip-gained clips, in order to keep many alternative takes from the set edited on his timeline ...Right now, i think i will go with the CLIP GAIN / BYPASS menu, that's the best thing i'm thinking of for now...
- OOwen Granich-Young @Owen_Granich_Young
I Mean it's not automated but at least this is it on a button?
var menu = sf.ui.proTools.clipOpenContextMenu().popupMenu; menu.menuClickPopupMenu({ menuPath: ['Clip Gain', 'Clear'], }); sf.ui.proTools.menuClick({ menuPath: ["Edit","Mute Clips"], });
So at least one button press clears clip gain then mutes. Change Clear to Bypass if that's preffered.
- LLouis BART @Louis_BART
WOW !!!
Thank you so much Owen, that is exactly what i need !!!! - In reply toOwen_Granich_Young⬆:DDenis Estevez @Denis_Estevez
But how do I use this? Is it a matter of copying the script into sf and then assigning it a button? What must I do with it? This looks MEGA indeed. A good start if nothing else :)!
Chris Shaw @Chris_Shaw2022-03-10 01:12:29.321Z
Yep. Copy it into a script and assign a trigger
- DDenis Estevez @Denis_Estevez
I shall try this tomorrow then :)! Unfortunately this only seems to clear the Clip gain from each Clip I’d select, and mutes the clip. So I suspect that for my op purpose, it’s as good as me muting each clip manually first, then selecting all the clips and bulk clearing the clip gain. So it doesn’t solve much. Not to sound ungrateful though! It’s a good option for anyone that needs this instead. But I need something that will look at all the clips of each track or selection and determine their Clip gain, then mute all the clips where their Clip gain equals infinite.
- OOwen Granich-Young @Owen_Granich_Young
Yeah doesn't do it for you everywhere but at least it's one click to do it whenever you see it. It is indeed only on clips you select, not smart to detect if clip gain to infinite is present.
- In reply toDenis_Estevez⬆:LLouis BART @Louis_BART
"it’s as good as me muting each clip manually first, then selecting all the clips and bulk clearing the clip gain"
Not exactly the same... because how do you select all clips and clear the clip gain if there are others clips not concerned on the same tracks ?
- DDenis Estevez @Denis_Estevez
My workflow is to find each infinite gain Clip and muting this and then clear all the clip based gain for every clip (for the entire timeline and across all tracks of the aaf), so I have a complete clean start of the original raw files with no gain options set. But I still want to preserve and visualise what the editor intended to fully mute or strip out (but also so I can check the waveforms to ensure editors haven’t muted something or someone crucial without realising, and with the infinite-gain I can’t see any waveforms to verify stuff). So I can just easily mute the clips set to infinite that I need, then batch clip gain clear all. So That’s what I mean when I say I still can’t use this script for my purpose (though it’s awesome nevertheless!). So I still can’t automate what I need using the above script. granted it’s a great option instead, when you wanted to preserve the clip based gain of all other remaining clips surrounding the infinite clip gain clips, and just mute and clear or bypass the clip gain of just the clips which are set to infinite. Regardless you still have to scan through the timeline, and that’s exactly what’s most time consuming. You could batch select all clips with the selector tool perhaps, then in one hit clear the clip based gain and mute them. But it still doesn’t avoid me having to go with a fine tooth comb through the entire timeline to find all these particular clips. But If this is what you needed for your particular workflow, I’m glad this post has led you to a workable solution :)! By the way, An alternative would be that “something” (sf script?) were to find infinite VOLUME automation, and muted the clip pertaining to it. This way I could convert all clip based gain clips to volume automation, then detect which clips needed muting, and then I could strip out/delete all volume automation for everything at the end. That would also tackle my workflow fast turnaround needs.
- LLouis BART @Louis_BART
May i ask why do you want to clear all clip gains ? If you aim to keep editor's intentions, you'd rather keep all the clips gains as they are ?
- DDenis Estevez @Denis_Estevez
editors have pre-selected mic choices and usually they are good, or muted swear words etc. but their volume automation/clip-gain setting is just a mix-guide, so pretty useless and fights/clips with what i need to do on it.
- In reply toDenis_Estevez⬆:LLouis BART @Louis_BART
or this other solution could be to ask editor's asistant to drag all infinite clip-gains clips onto the same tracks :)))
But you're idea about converting first clip-gain to volume automation is good. Maybe easier to script then !- DDenis Estevez @Denis_Estevez
easier said than done when they don't have an assistant and resources to do this. also hard to convey and relay to freelancer editors that just come in for a day etc. automation is the way to go i'm afraid!
Chris Shaw @Chris_Shaw2022-03-10 16:36:58.747Z
Is there any volume automation on the tracks where you want to apply this workflow?
- DDenis Estevez @Denis_Estevez
Sometimes there is some done by the editor, but the idea is to delete the volume automation and the clip-gain of the aaf anyways, and just leaving the infinite clip-gain clips muted/greyed out. So technically no..??
Chris Shaw @Chris_Shaw2022-03-10 21:07:01.003Z2022-03-10 21:32:41.088Z
I don't have the time to write a script (perhaps @raphaelsepulveda or @samuel_henriques could script it) but the script could do something like this:
-
On the selected track, switch to volume automation view
-
delete the volume automation and set track output to zero
-
convert the clip gain to volume automation
-
select each clip (one at a time) and check if the output of the track is set to infinite or below 120 db( or thereabouts)
-
if so mute the clip
-
do this for each clip on the timeline
-
once the end of the track has been reached, select the whole track and delete the clip gain and volume automation then set the output of the track to zero
-
move on to the next track
-- rinse / repeat as necessary
If the original volume automation needs to be kept then start by using "Save Copy In" to save only the selected tracks as a session and once all tracks have been processed, use import track data / match tracks (chose only volume data) to restore the original volume data.
OR
A temporary audio track can be created below the selected track, copy the volume automation to it, process the selected track, then copy the volume automation from the temp track back to the selected track. Then delete the temp trackRaphael Sepulveda @raphaelsepulveda2022-03-11 17:18:50.199Z
I can tackle this later in the weekend—unless @samuel_henriques beats me to it! 😆
Raphael Sepulveda @raphaelsepulveda2022-03-14 00:59:33.080Z
Alright, here's what I came up with:
This will mute all clips with neg infinite clip gain for each selected track. In the process, all automation is cleared and you're left with all tracks at unity.
Unfortunately, this script can't handle fades. So I'm hoping your "clean start" involves removing fades as well.
Make sure the following things are in place before running it:
- Link Track and Edit Selection is on
- IO tab is open
- Track size for all tracks needs to be "small" or larger
Usually I'd script these safeties in, but ran out of coding time for now lol
Here it is!
/** @param {'volume'|'waveform'} trackView */ function setTrackViewSelectorTo(trackView) { const selectedTrack = sf.ui.proTools.selectedTrack; const trackViewSelectorPopupButton = selectedTrack.popupButtons.whoseTitle.is("Track View selector").first; if (trackView === 'volume' && !['volume', 'vol'].includes(trackViewSelectorPopupButton.value.value)) { trackViewSelectorPopupButton.popupMenuSelect({ menuPath: ['volume'] }); } if (trackView === 'waveform' && !['waveform', 'wave'].includes(trackViewSelectorPopupButton.value.value)) { trackViewSelectorPopupButton.popupMenuSelect({ menuPath: ['waveform'] }); } } /** * Alternative to Edit > Select All, since there is a bug that sometimes selects all tracks when automating that menu item. */ function selectAllClips() { // Shortcut to bring edit selection to start of session sf.keyboard.press({ keys: "return", }); // Shortcut to extend edit selection to end of session sf.keyboard.press({ keys: "alt+shift+return", }); } function clearAllVolumeAutomation() { setTrackViewSelectorTo('volume'); selectAllClips(); sf.ui.proTools.menuClick({ menuPath: ['Edit', 'Clear'] }); } function setMainTrackOutputWindowFaderToUnity() { try { sf.ui.proTools.mainTrackOutputWindow.sliders.whoseTitle.is("Volume").first.elementClick(); } catch (e) { } } function openOutputWindowForTrack({ trackName }) { function getTrackOutputWindow() { return sf.ui.proTools.floatingWindows.find(fw => fw.buttons.whoseTitle.is(`Track selector\n${trackName}`).first.exists); } let outputWindow = getTrackOutputWindow(); if (!outputWindow) { sf.ui.proTools.trackGetByName({ name: trackName }).track.outputWindowButton.elementClick(); outputWindow = sf.waitFor({ callback: () => getTrackOutputWindow() }).result; } return { outputWindow }; } function convertClipGainToVolumeAutomation() { sf.ui.proTools.menuClick({ menuPath: ['Edit', 'Automation', 'Convert Clip Gain to Volume Automation'] }); sf.ui.proTools.menuClick({ menuPath: ['Edit', 'Automation', 'Thin'] }); } function main() { sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.invalidate(); sf.ui.proTools.selectedTrackNames.forEach(track => { sf.ui.proTools.trackSelectByName({ names: [track], deselectOthers: true }); sf.ui.proTools.selectedTrack.trackScrollToView(); clearAllVolumeAutomation(); openOutputWindowForTrack({ trackName: sf.ui.proTools.selectedTrack.normalizedTrackName }); setMainTrackOutputWindowFaderToUnity(); selectAllClips(); convertClipGainToVolumeAutomation(); setTrackViewSelectorTo('waveform'); sf.ui.proTools.clipDoForEachClipInTrack({ action: () => { if (sf.ui.proTools.mainTrackOutputWindow.textFields.whoseTitle.is("Volume Numerical").first.value.invalidate().value === '-∞') { sf.ui.proTools.menuClick({ menuPath: ['Edit', 'Mute Clips'] }); } }, }); clearAllVolumeAutomation(); setTrackViewSelectorTo('waveform'); }); log('Finished muting clips.') } main();
Chris Shaw @Chris_Shaw2022-03-14 02:22:30.175Z
Nice!
- In reply toraphaelsepulveda⬆:DDenis Estevez @Denis_Estevez
Oh Wow! Blimey. This is absolutely MEGA @raphaelsepulveda ! What a time saver this will be moving forwards! I'm really grateful for this..truly!! What a Legend!!
You are absolutely right in that it catches you out if you do not have the IO tab open (but you are prompted for it by SF, with an error of some sort). I always have my tracks in small or larger and the Link Track And Edit selection always on as well, so for me those have not been an issue.
The AAF clips which are not "clean" and are therefore crossfaded do portrait an anomaly, whereby it still does apply the mute/grey state - but applies this onto the subsequent clip instead rather than onto its own (sort of like a delayed state by one clip). I more often than not preserve the edits/fades that the editor supplies on the dialogue, as chances are they may have worked on it a bit, and I just have to finesse them if they are not quite there. Saying that, the editors have also gotten it very wrong quite often as well - and find myself deleting their work/fades and start from scratch again - so it's not that much of a deal breaker i guess..
But if there was a way to have the option to have it code-corrected just for those particular cases, that would be absolutely amazing as well. Somehow I doubt you can do anything about this perhaps, as I think the 'DoForEachClip' SF command doesn't handle fades well, if I recall well from another suggestion elsewhere (I think this was discussed in the Defaulter Package support page, as it utilises the same very command to achieve a similar process).
When the AAF contains a few crossfades, and a lot of clip-gain mutes, this is not an issue because i can always replicate/copy easily the original x-fade. If the fades need to be preserved though, and there are loads of crossfades across the timeline, but just very few mutes, i guess it is easy to do the muting manually in this case. The worst case scenario would be to have loads of both :D (which it does happen from time to time :( )!
From a visual point of view it's much neater to spot the delayed/wrong clips being muted, than figuring out which clips have been indeed infinite clip-gained (because of the inactive grey clips vs active clips PT colour scheme). The latter being a corrective process, which feels much easier to do, whereas the former is an investigative and organisation one (hence the very time consuming nature of the original problem presented here).
But perhaps because the anomaly is always consistent, there is still hope it could be rectified/fixed? (i.e. the script always mutes the next clip when it finds a fade/x-fade). So it would go something like "if clip automation is infinite and was faded or x-faded don't mute the next clip, and mute the previous (correct) one."
But again, this is stellar work, and very impressive indeed!
Also, as a second variant alternative, do you think a similar script could also be made whereby the clip-gain is not converted into volume automation first? (So as to preserve the original volume automation the editor supplies). You could duplicate the AAF and then copy it over on top at the end i guess (as i think it was already suggested here above). So probably this is daft request anyways?
How about a third variant of the script whereby the clip-gain and the automation are both preserved but the clip state (mute/unmuted) still follows the clip-gain infinite variable?
Or is your script the only and best way to try to achieve the intended workflow, perhaps O:-)?
(With the above, I was just trying to think of alternate workflows where variants of the same script could be useful, depending on the nature of the show and its needs, basically)
I do repeat that this is superb work at its finest though! Thank you, thank you, thank you!! (you should publish this btw!)
Raphael Sepulveda @raphaelsepulveda2022-03-15 01:02:22.194Z
Thanks for the kind words and thorough analysis! Just following the great workflow laid out by @Chris_Shaw 🤘🏼
I think the 'DoForEachClip' SF command doesn't handle fades well
After thinking about it for a bit and consulting with @Kitch, I may have a way to deal with fades. Just will need some time to put it together.
Also, as a second variant alternative, do you think a similar script could also be made whereby the clip-gain is not converted into volume automation first? (So as to preserve the original volume automation the editor supplies).
I may be able to just copy it and then paste it right back after it's done going through all the clips. As long as the clipboard is not cleared in the process, this should work. I'll give it a shot.
How about a third variant of the script whereby the clip-gain and the automation are both preserved but the clip state (mute/unmuted) still follows the clip-gain infinite variable?
We could pull this off by duplicating the track with the clips and then muting the clips from that copy! But one thing at a time... lol
I do repeat that this is superb work at its finest though! Thank you, thank you, thank you!!
Thank you! I have a busy week ahead but when I get some time I'll see if I can make all this work!
- DDenis Estevez @Denis_Estevez
I'd absolutely appreciate it! Looking forwards to it when you can :)
- In reply toraphaelsepulveda⬆:DDenis Estevez @Denis_Estevez
Hi @raphaelsepulveda @Chris_Shaw & @Kitch ! I'm still grateful for all your initial input and script. I'm now back to receiving tonnes of idiotic offline editors that seem to extensively utilise/supply the infinite clip based gain on their AAF/timeline. Is there a way I could kindly ask you to have a look at the suggestions I made for this script to be improved upon? Namely, I'd find it really useful for the script to handle fades and crossfades well, so that these can be preserved (as originally intended in the edit). Second, it would be tremendous to get a 2nd and 3rd variants of the scripts all as mentioned before above (perhaps as a selectable option at the start?? Or otherwise, by having 3 different texts/scripts is also fine if that is too complicated to develop). 1st variant: exactly as it is working now. 2nd variant: preserves the original volume automation the editor supplies. 3rd variant: both clip-gain plus the initial editor's volume automation is preserved except for the infinite gain clips.
Finally, I would also find it extremely useful to have it scripted when editors use a combination of infinite clip-based gain, plus an extra very low value clip-based gain as well (this is the worst nightmare scenario btw). So that the script would go: "mute infinite clip-based gain clips, plus also mute clips if/when clip-based gain is lower than -XdB (e.g. X=-30dB).
What do you reckon?
(It may also be worth coding in the safeties you once mentioned (i.e.conditionals for this to work), as I had not used this script for a bit, and forgot i needed to have the IO tab opened and was giving me the error at Line52 when not shown)
I can also think of an idea for time optimisation for this process that could be done to save time and avoid the script taking as long. No idea if this is possible though! At the moment it runs through each clip one by one in every track to determine whether that clip's volume has infinite volume turned down.. (with a 3000 clip AAF timeline that can take a while to run through - and though it is better than nothing or having to do it manually), I'm wondering if it could skip all clips of at an above XdB level specified above (higher than X), and then only tackle/mute those with that value setting or lower?
Raphael Sepulveda @raphaelsepulveda2022-09-30 17:10:10.745Z
Hey @Denis_Estevez, I'm currently deep in the trenches of a project. Hopefully, one of the other guys can jump in and help you with this!
- DDenis Estevez @Denis_Estevez
I'd be happy to wait for you.. Otherwise, maybe @Kitch, @samuel_henriques @chrscheuer or @Chris_Shaw could kindly step in and have a look at the improvements I suggested? Not sure who else can script though, and this has had no further replies since O:-)
samuel henriques @samuel_henriques
Hello Denis,
I took Raphael' work and tried to change it as you requested.
This will work clip by clip and ignore fades.
This is taking care of the safeties as well.
It will select all track, work clip by clip and all selected tracks.As original select all track and clear volume automation.
As last request, mute all clips with clip gain lower than -30dB including -minus infinite.
I've read you would like variants of the script so I tried to set it up so its easier to implement (hopefully)
Let me know what variants you want,.Its not thoroughly tested, so let me know how it works.
/** @param {'volume'|'waveform'} trackView */ function setTrackViewSelectorTo(trackView) { const selectedTrack = sf.ui.proTools.selectedTrack; const trackViewSelectorPopupButton = selectedTrack.popupButtons.whoseTitle.is("Track View selector").first; if (trackView === 'volume' && !['volume', 'vol'].includes(trackViewSelectorPopupButton.value.value)) { trackViewSelectorPopupButton.popupMenuSelect({ menuPath: ['volume'], isShift: true, isOption: true }); } if (trackView === 'waveform' && !['waveform', 'wave'].includes(trackViewSelectorPopupButton.value.value)) { trackViewSelectorPopupButton.popupMenuSelect({ menuPath: ['waveform'], isShift: true, isOption: true }); } } /** * Alternative to Edit > Select All, since there is a bug that sometimes selects all tracks when automating that menu item. */ function selectAllClips() { // Shortcut to bring edit selection to start of session sf.keyboard.press({ keys: "return", }); // Shortcut to extend edit selection to end of session sf.keyboard.press({ keys: "alt+shift+return", }); }; function clearAllVolumeAutomation() { setTrackViewSelectorTo('volume'); selectAllClips(); sf.ui.proTools.menuClick({ menuPath: ['Edit', 'Clear'] }); }; function setMainTrackOutputWindowFaderToUnity() { try { sf.ui.proTools.mainTrackOutputWindow.sliders.whoseTitle.is("Volume").first.elementClick() } catch (e) { } }; function setTrackSize(track) { let isTrackTooSmall = (track.frame.h <= 43) ? true : false; if (isTrackTooSmall) { const f = sf.ui.proTools.selectedTrack.frame const popupMenu = sf.ui.proTools.selectedTrack.popupMenuOpenFromElement({ relativePosition: { x: f.w - 10, y: 5 }, isOption: true, isShift: true, }).popupMenu; popupMenu.menuClickPopupMenu({ menuPath: ["small"] }); } }; function timeCounter() { // get current counter const mainCounter = sf.ui.proTools.getCurrentTimecode().stringValue let originalTimeCounter /// Bars Beats . if (mainCounter.includes("|")) originalTimeCounter = "Bars|Beats" // Min Secs . else if (mainCounter.includes(":") && mainCounter.includes(".")) originalTimeCounter = "Min:Secs" // Time code else if (mainCounter.split(":").length == 4) originalTimeCounter = "Timecode" // Feet+Frames else if (mainCounter.includes("+")) originalTimeCounter = "Feet+Frames" // Samples. else originalTimeCounter = "Samples" return originalTimeCounter } function setSafeties() { const menusToEnable = [ ["Options", "Link Track and Edit Selection"], ["View", "Edit Window Views", "I/O"], ["Options", "Link Timeline and Edit Selection"] ] menusToEnable.forEach(menu => { sf.ui.proTools.menuClick({ menuPath: menu, targetValue: "Enable" }) }); }; function openTrackOutput() { const selectedTrackName = sf.ui.proTools.selectedTrackNames[0] const isOutputWinOpen = sf.ui.proTools.mainTrackOutputWindow.exists let isSelectedTrackOutputWin try { isSelectedTrackOutputWin = sf.ui.proTools.mainTrackOutputWindow.buttons.first.value.invalidate().value === selectedTrackName } catch (err) { } if (!isOutputWinOpen || !isSelectedTrackOutputWin) { sf.ui.proTools.selectedTrack.trackOutputToggleShow(); }; }; function getClipInfo() { let clipGainValue const isClipMuted = sf.ui.proTools.getMenuItem("Edit", "Unmute Clips").isEnabled sf.ui.proTools.menuClick({ menuPath: ["Edit", "Automation", "Convert Clip Gain to Volume Automation"] }); clipGainValue = sf.ui.proTools.mainTrackOutputWindow.textFields.whoseTitle.is("Volume Numerical").first.value.invalidate().value sf.ui.proTools.menuClick({ menuPath: ["Edit", "Undo Convert Clip Gain to Volume Automation"] }); clipGainValue === "-∞" ? clipGainValue = -143 : clipGainValue return { clipGain: clipGainValue, isClipMuted }; }; function getOriginalToolSelection() { // Get original Tools Selection const originalToolSelection = sf.ui.proTools.mainWindow.cursorToolCluster.buttons.filter(btn => btn.title.value == "Smart tool" || btn.title.value == "Trim tool" || btn.title.value == "Selector tool" || btn.title.value.startsWith("Grabber tool") ).filter(btn => btn.value.invalidate().value === "Selected") return originalToolSelection }; function setOriginalToolSelection(originalToolSelection) { ///Set Original Tools Selection originalToolSelection.map(selBtn => selBtn.title.value).indexOf("Smart Tool") > 0 ? originalToolSelection.filter(selBtn => selBtn.title.value === "Smart Tool")[0].elementClick() : originalToolSelection[0].elementClick() }; /** * @param {Object} clipInfo * @param {string} clipInfo.clipGain * @param {boolean} clipInfo.isClipMuted */ function doWithClip(clipInfo) { function muteClips() { if (sf.ui.proTools.getMenuItem("Edit", "Mute Clips").isEnabled) { sf.ui.proTools.menuClick({ menuPath: ["Edit", "Mute Clips"] }) }; }; if (+clipInfo.clipGain < -30 && !clipInfo.isClipMuted) { muteClips(); } }; function clipDoForEachSelectedClipWitFades(doAction) { sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.invalidate(); setSafeties() let error = [] let currentSelectionStart let mainCounter let lastSelectionStart const selectedTracksH = sf.ui.proTools.selectedTrackHeaders; const originalToolSelection = getOriginalToolSelection() const isOutputWinOpen = sf.ui.proTools.mainTrackOutputWindow.exists let originalTimeCOunter = timeCounter() sf.ui.proTools.mainCounterSetValue({ targetValue: "Samples" }) // Dor for each selected track selectedTracksH.map(track => { sf.ui.proTools.menuClick({ menuPath: ["File", "Save"] }); // Track select & scroll to view track.trackSelect(); track.trackScrollToView(); setTrackSize(track); clearAllVolumeAutomation(); selectAllClips(); const originalSelection = sf.ui.proTools.selectionGet() setTrackViewSelectorTo('waveform'); openTrackOutput(); setMainTrackOutputWindowFaderToUnity(); sf.engine.runInBackground(() => { while (true) { try { //Move to next clip sf.keyboard.press({ keys: "ctrl+tab" }); //Check selection to end loop or continue selecting next clip currentSelectionStart = sf.ui.proTools.invalidate().selectionGetInSamples().selectionStart if (lastSelectionStart === currentSelectionStart) break; // Last clip if (currentSelectionStart > originalSelection.selectionEnd) break; //Last selected clip(for manual initial selection variant) //Save this iteration start to compare with the next lastSelectionStart = currentSelectionStart if (sf.ui.proTools.getMenuItem("Edit", "Mute").exists) continue;// Skip if it's a fade // Get main couter for error log mainCounter = sf.ui.proTools.getCurrentTimecode().stringValue.trim() // Do to clip doAction(getClipInfo()) } catch (err) { error.push(track.normalizedTrackName + " - " + mainCounter) } sf.wait({ intervalMs: 20 }) } }); // Select original selection sf.ui.proTools.selectionSet({ selectionStart: originalSelection.selectionStart, selectionEnd: originalSelection.selectionEnd }); // Center start selection sf.keyboard.press({ keys: "left" }); }); // Set original couter sf.ui.proTools.mainCounterSetValue({ targetValue: originalTimeCOunter }) // Set original Tool Selection and Track Selection setOriginalToolSelection(originalToolSelection); // Set original selected tracks sf.ui.proTools.trackSelectByName({ names: selectedTracksH.map(n => n.normalizedTrackName) }); if (!isOutputWinOpen) { sf.ui.proTools.selectedTrack.trackOutputToggleShow(); } if (error.length > 0) { alert(error.join("\n")) } else { alert("Finished without errors.") } }; clipDoForEachSelectedClipWitFades(doWithClip);
- DDenis Estevez @Denis_Estevez
Thank you a million for stepping in. This seems just to go track by track and delete the automation for the entirety of the show. It doesn't seem to go clip by clip. Not sure if I'm missing anything. Or whether I needed to combine the old script and add your extra lines on top?
samuel henriques @samuel_henriques
No combining, you just need to select the tracks you want to process and run the script.
Could you make a screen recording so I can try to see if I'm missing something?- In reply toDenis_Estevez⬆:DDenis Estevez @Denis_Estevez
@samuel_henriques I had another go at it, and this time it seemed to go tonnes better (and behave similar to the 1st version). But it somehow gives up about 5 minutes into the show (of a 40mins program). Could it be, or am I still doing something wrong?
samuel henriques @samuel_henriques
If you have big clips, I guess it could be.
But, check if the -30db and - infinite clips are all getting muted.
And you can send me a screen capture and I might be able to see something- DDenis Estevez @Denis_Estevez
Sorry chap. I must had a weird one earlier. I copied and pasted your code exactly as posted. And now the same behaviour as initially replied occurs: It just goes track by track first, and just deletes the automation. Then says the process is complete. If I copy the original script it restores the original functionality.
samuel henriques @samuel_henriques
could you create a new script, paste my script and try again?
- DDenis Estevez @Denis_Estevez
Ok. I've done that now to comply with your request, But the same behaviour occurs. It doesn't seem to do anything other than delete the automation track by track and then stops to say the process was completed successfully.
samuel henriques @samuel_henriques
ok, thank you.
Could you do a video screen capture and I might be able to see something.
Here's how it works for me.You can't see any muting in this example, because there are no <30dB clips. But on my test it works well
- DDenis Estevez @Denis_Estevez
Ah. I think we are getting lost in translation then. From your video, you already have some clips that are greyed out/muted in the timeline? In my AAF I have none, and I only have just clips turned down to infinite or -30dB (and lower) to signify a greyed out state of mute by the editor (which is what i want to convert into, muted greyed out clips from clips that were originally at infinite or at -30dB or lower). The original script does this magnificently. Can't see what your script achieves though atm? But at least it does go clip by clip, which atm with your copy it does not in any case. How can i screen grab? best software for that on the Mac? I can then wetransfer and post a link here?
samuel henriques @samuel_henriques
Yeah sorry,
Could you check if both link timeline and link track are enabled? I have one in the script but no the other, I'll add it now
- DDenis Estevez @Denis_Estevez
Yes i have both enabled like in the picture.
- In reply toDenis_Estevez⬆:
samuel henriques @samuel_henriques
Sorry I found another issue here.
- DDenis Estevez @Denis_Estevez
Standing by then :)
samuel henriques @samuel_henriques
Updated.
Fixed a few things. Let me know how it goes.samuel henriques @samuel_henriques
Here's a video
https://www.youtube.com/watch?v=qOCR3blVnWw- In reply tosamuel_henriques⬆:DDenis Estevez @Denis_Estevez
I think if there's a reason why I'm able to reply to your message this early and right now, it's honestly really because this script is working superbly! WOW, I'm impressed once again (and feeling so so grateful to you right now). I've not had a chance to test it thoroughly, mind you. So I will eventually come back to you with that intel. But on the last try I did I was laughing all the way through seeing it go and do it's thing (and get it absolutely spot on). One thing I'd like it to do, is for me to be able to modify the -30dB setting to another value at will (whatever is appropriate for the show/editor, basically?). Any ideas how i could change that value within your script?
samuel henriques @samuel_henriques
Awesome to hear,
on line 173 you can replace the -30 with a different value.
If I get a bit, I'll change the script so this value can be changed in a better place than in the middle of the code.- DDenis Estevez @Denis_Estevez
Actually, that is perfect :)! Thank you. I'm happy that it is there for now whilst I'm testing it with my current workflow with everything else ;). This way I can report back and we can tweak everything in one go, if it is even necessary.
-
- In reply toOwen_Granich_Young⬆:SStijn Jacobs @Stijn_Jacobs
Anything changed since PT23.9 or SF 5.5.2?
I used this script for a long time but after an update I get this error:Could not right-click clip to open context menu (Clear Clip Gain: Line 1)
Popup menu was not found
Popup window was not found after waiting 2000ms