Analyze next Render AudioSuite for each clip on track
Hey everyone! Today Sound-Radix have released Auto-Align Post https://www.soundradix.com/products/auto-align-post/ - kind of an AudioSuite version of their original Auto-Align version, focused on aligning in postproduction. I'd like to make its workflow little snappier. There are some separate "How to..." topics I want like to discuss.
Firstly, the script must run A-A Post across all clips on a track. The Clips can have fades so I think this part of the script might look like:
//Select Clip (possible clip with fades or crossfaded clips)
var snapToNext=sf.ui.proTools.hasMenuItem('Edit', 'Snap To', 'Next');
if var snapToNext=false
sf.keyboard.press({ keys: 'ctrl+shift+tab'}
else
sf.keyboard.press({keys: 'up'})
//Go to Next Clip
sf.keyboard.press ({ keys: 'ctrl+tab'});
The second part is about A-A post itself.
//Open Auto-Align Post AudioSuite plugin to Analyze, set Clip by Clip/Individual files and correct guide Boom Track
var asWin = sf.ui.proTools.audioSuiteOpenPlugin({
category: 'Other',
name: 'Auto-Align Post'
}).window;
asWin.audioSuiteSetOptions({
processingInputMode: "ClipByClip",
processingOutputMode: "CreateIndividualFiles"
//??select correct guide Boom Track from side-chain input menu
});
//??set handle size to 0 to Analyze only selection
asWin.getFirstWithTitle("Analyze").elementClick();
//??Wait till analyze done
//??back handle size to the preferred value
//Render clip
var win = sf.ui.proTools.getFloatingWindowWithTitleStartingWith("Auto-Align Post");
win.getFirstWithTitle("Render").elementClick();
Finally, that two parts must be glued together with Do... While and If... Else loops.
Do you have any suggestions how to do it?
- Christian Scheuer @chrscheuer2018-08-21 18:50:30.509Z
This is a great request. Do they have a demo for the plugin?
SF already supports actions on all selected clips (or all clips on a track), seesf.ui.proTools.clipDoForEachSelected
(or something like that). See also my latest How To that shows this in action.Vladimir @poterukha
Yes, you have to register at their web-site, download the installer and ask for a demo during Pro Tools start up
- In reply topoterukha⬆:Christian Scheuer @chrscheuer2018-08-21 19:14:18.040Z
Here's a starting point - completely untested:
function setHandleSize(asWin, handleText) { var handleField = asWin.textFields.whoseTitle.startsWith("Processing Handle Length").first; handleField.elementClick(); sf.keyboard.type({ text: handleText }); sf.keyboard.press({ keys: 'enter' }); } function processClip() { //Open Auto-Align Post AudioSuite plugin to Analyze, set Clip by Clip/Individual files and correct guide Boom Track var asWin = sf.ui.proTools.audioSuiteOpenPlugin({ category: 'Other', name: 'Auto-Align Post' }).window; asWin.audioSuiteSetOptions({ processingInputMode: "ClipByClip", processingOutputMode: "CreateIndividualFiles" }); //??select correct guide Boom Track from side-chain input menu asWin.popupButtons.whoseTitle.is('Key Input').first.popupMenuSelect({ menuPath: ['Boom'] }); //??set handle size to 0 to Analyze only selection setHandleSize(asWin, '0'); asWin.getFirstWithTitle("Analyze").elementClick(); //Wait till analyze done sf.ui.proTools.waitForNoModals(); //??back handle size to the preferred value setHandleSize(asWin, '5'); //Render clip & wait til it's done asWin.audioSuiteRender(); } /* Uncomment this once you have tested process clip works sf.ui.proTools.clipDoForEachClipInTrack({ action: processClip }); */ processClip(); //Comment this out when you switch do the script working on all clips
Vladimir @poterukha
Works fine, but when the clipDoForEachClipInTrack is activated it executes in infinite loop
Christian Scheuer @chrscheuer2018-08-22 10:51:03.915Z
@poterukha if you want my help developing this script I'll need a little more detail please. What exactly happens? What do you mean by an infinite loop? I was just trying to give you a starting point for you to work from, I was not trying to develop the entire script for you.
If you can a screen recording of what's going on would be helpful.Vladimir @poterukha
By "infinite loop" I mean that after the last clip on the track script returns to session start and repeat processing once again. I can't reproduce the "infinite" situation on the screencast it stops on the 2nd loop.
https://yadi.sk/i/uvU7mjgE3aTmWv
And few other bugs I have found
https://yadi.sk/i/s1W8DHjp3aTmjc
https://yadi.sk/i/O-Jf8KQa3aTmm5Christian Scheuer @chrscheuer2018-08-22 14:52:58.181Z
Wonderful, thanks - great stuff these screen recordings. Wow!! Can't believe we're already so close. It will probably take just as long, if not a lot longer, to fix the corner cases in this, but it seems to already be something you can use in your sessions, if you are a little careful.
Imagine doing this on a whole feature.. wow.
Let's keep this thread open to work on those corner cases one by one, to classify them and track the bugs - I don't think it's anything that we can fix quickly unfortunately - the logic to select clip by clip is extremely complicated ;)Vladimir @poterukha
@chrscheuer Tried the script little bit more today. I have found Pro Tools says “No audio was Selected” and returns to session start is due to Function setHandleSize. It presses return key not for AS window, but for the whole session. The script works much smoother without that part of the code.
- In reply tochrscheuer⬆:DDavide Favargiotti @dieffe
May I suggest one workflow change that I feel will speed up the workflow?
Instead of changing the source track in AAPost, why don't you copy the source material (obviously with a SF script :) ) to a dedicated track?
I've been doing that and I think it's a better workflow than having to check if AAPost is looking to the correct source track each time or constantly changing it in the plugin.Also why are you changing the handles? I didn't notice any change in performance if AAPost analyse the clips with or without handles.
Vladimir @poterukha
I agree, it is unnecessary to select side-chain for each clip and preview/render with different handles. This were just my first thoughts on this. The most important thing for this script is to solve the fade out/crossfade issue.
- DDavide Favargiotti @dieffe
If the problem is that it doesn't process the last clip, I think that can be easily solved by creating a temporary clip group at the end of the track. (with some space after the last clip you want to process)
- DDavide Favargiotti @dieffe
Ah sorry... I just look at the script better, and my comment works only if you use the method you wrote in the first post (checking if you can snap to the next region or not).
If you use the method cheistin wrote, I have no clue how to stop it :)