No internet connection
  1. Home
  2. Script Sharing

Fully automated WaveRider (Quiet Art) workflow (for mono tracks)

By Robert Mallory @Robert_Mallory
    2024-01-23 00:14:18.997Z2024-02-09 15:57:12.239Z

    This script is a little specific to me personally but I figure if others use WaveRider to write volume automation (then convert it to clip gain like I do) then this script will make your life much easier, and can of course be tailored to your go-to workflow. With the push of one button, this script takes care of all the pre and post steps needed too. There a few a few caveats however: I had to build two different scripts, one for 1 track only, and another for 2 or more. Both are below. Full disclosure, I can't code from scratch, so, many thanks to the forum and others for posting and sharing their scripts online, which allowed me to design this WaveRider workflow. Some brief caveats:

    For the multiple track version:

    1. Groups must be Active. De-select Volume from (group) Globals.
    2. Place Cursor at start of audio, and select the tracks you want Waverider'd.
    3. Leave at least 1 sec free space before the start of the clips (so there's room to nudge back 500ms - cause of Averaging mode)
    4. The one part I couldn't automate: there'll be 5sec pause before playback commences so you can Choose each Track # within each Waverider plugin instance.

    For the single track version, steps 2 and 3 above apply.

    What this script does:
    0. Create a Temp Group (multiple track version only)

    1. Close all floating windows
    2. Disable Post Roll
    3. Sets Automation mode on Selected Tracks to Latch
    4. Toggles from Waveform view to Volume view
    5. Removes any inserts (on selected tracks) from Slot 1
    6. Adds Waverider (on selected tracks) to Slot 1
    7. Scrolls the first selected fader "into view," so it'll be the first fader in the virtual fader bank
    8. Highlights from the cursor til the end, then extends that area by a little on both sides
    9. Waits for 5secs, then plays
    10. Waits for playback to stop
    11. Waits 5sec because sometimes Waverider buffers a little at the end of a long session
    12. Closes all Insert Plugin Windows
    13. Sets Nudge Value to 500ms
    14. Highlights all the volume automation (on selected tracks)
    15. Nudges it back 500ms (due to WaveRider Averaging mode latency)
    16. Coalesce Volume Automation to Clip Gain
    17. Deletes volume automation
    18. Toggles back to Waveform view
    19. Toggles back to Automation Mode: Read (on selected tracks)
    20. Enables Post-Roll
    21. Removes WaveRider from Insert Slot 1 (on selected tracks)
    22. Adds Rx Mouth De-click to Insert Slot 1 (on selected tracks)
    23. Deletes Temp Group (multiple track version only)
    24. Closes all Insert Plugin Windows

    To WaveRider multiple tracks simultaneously:

    
    sf.ui.proTools.groupsTempCreate();
    
    sf.ui.proTools.viewCloseFloatingWindows();
    
    //Calling command "Disable: Post-Roll" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/cln0nxiji0000yp102352fxp9")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:cksb6k813000y7g1033sptv8k#cks81matw0001cu10wsz0c1a5',
        props: {}
    });
    
    //Calling command "Selected Tracks: Latch" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/cln0nxiji0000yp102352fxp9")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:ckux8btgj0000xq104p36odzz#ckux8s34i000cxq10q3dnbjx3',
        props: {}
    });
    
    sf.keyboard.press({
        keys: "minus",
    });
    
    //Calling command "Remove Insert from Slot 1:" from package "General PT Settings"
    sf.ui.proTools.selectedTrack.trackInsertOrSendSelect({
        insertOrSend: 'Insert',
        pluginNumber: 1,
        selectForAllSelectedTracks: true,
        pluginPath: ['no insert']
    });
    
    //Calling command "Add Insert to Slot 1: Waverider" from package "General PT Settings"
    sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.selectedTrack.trackInsertOrSendSelect({ pluginNumber: 1, pluginPath: ["plug-in", "Dynamics", "WaveRider (mono)"], 
    selectForAllSelectedTracks: true, });
    
    
    
    //Calling command "Scroll Into View" from package "General PT Settings"
    /**@param {string} trackName */
    function ptScrollToTrack(trackName) {
        sf.ui.proTools.menuClick({ menuPath: ['Track', 'Scroll to Track...'] });
    
        sf.ui.proTools.confirmationDialog.elementWaitFor();
    
        sf.ui.proTools.confirmationDialog.textFields.first.elementSetTextFieldWithAreaValue({
            value: trackName
        });
    
        sf.ui.proTools.confirmationDialog.buttons.whoseTitle.is('OK').first.elementClick();
    
        sf.ui.proTools.confirmationDialog.elementWaitFor({ waitType: 'Disappear' });
    };
    
    sf.ui.proTools.appActivateMainWindow();
    sf.ui.proTools.mainWindow.invalidate();
    
    // Get selected track name
    const selectedTrackName = sf.ui.proTools.selectedTrack.normalizedTrackName;
    
    // Scroll to Track
    ptScrollToTrack(selectedTrackName);
    
    sf.keyboard.press({
        keys: "semicolon",
    });
    
    sf.keyboard.press({
        keys: "alt+shift+return",
    });
    
    sf.keyboard.press({
        keys: "cmd+shift+numpad plus, cmd+shift+numpad plus, cmd+shift+numpad plus, cmd+shift+numpad plus, cmd+shift+numpad plus",
    });
    
    sf.keyboard.press({
        keys: "alt+shift+numpad minus, alt+shift+numpad minus",
    });
    
    log('Select WaveRider track #s now!');
    
    
    sf.wait({
        intervalMs: 5000,
    });
    
    //Calling command "Play" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/cln0nxiji0000yp102352fxp9")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:ckxz4ioil0009m1102yahtdkl',
        props: {}
    });
    
    //Calling command "Wait until Playback Stops" from package "General PT Settings"
    function waitUntilPlaybackStopped() {
        while (sf.ui.proTools.isPlaying) {
            sf.engine.checkForCancellation();
    
            sf.wait({ intervalMs: 100, });
        }
    }
    
    waitUntilPlaybackStopped();
    
    log('Playback is now stopped! Please hold.');
    
    sf.wait({
        intervalMs: 5000,
    });
    
    //Calling command "Close All Insert Plug-in Windows" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/cln0nxiji0000yp102352fxp9")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:ck1wlbrh200001n10xmexsuhd',
        props: {}
    });
    
    //Calling command "Set 500ms Nudge" from package "General PT Settings"
    function setMinSecNudge(value) {
    
        const clickCustomNudgeArea = () => sf.ui.proTools.mainWindow.gridNudgeCluster.textFields.whoseTitle.is("Nudge Custom Value").first.elementClick();
        const right = () => sf.keyboard.press({ keys: "right", fast: true });
        const zeroOut = () => sf.keyboard.press({ keys: "numpad 0", fast: true });
        const type = (text) => sf.keyboard.type({ text: text });
        const goToMin = () => sf.keyboard.press({ keys: "numpad equals", fast: true });
        const pressReturn = () => sf.keyboard.press({ keys: "return", });
    
        let [min, sec, msec] = value.split(/[:.]/)
    
        clickCustomNudgeArea();
        zeroOut();
    
        goToMin();
        type(min);
        right();
        type(sec);
        right();
        type(msec);
        pressReturn();
    
    };
    
    
    // get current time scale
    function getTimeScale(value) {
    
        let timeScale
        /// Bars Beats .  
        if (value.includes("|")) timeScale = "Bars|Beats"
        //  Min Secs .    
        else if (value.split(":").length == 2 && value.includes(".")) timeScale = "Min:Secs"
        //  Time code
        else if (value.split(":").length == 4) timeScale = "Timecode"
        //  Feet+Frames
        else if (value.includes("+")) timeScale = "Feet+Frames"
        //  Samples.     
        else timeScale = "Samples"
    
        return timeScale
    }
    
    function setNudge(value) {
    
        const curentNudgeValue = sf.ui.proTools.mainWindow.groups.whoseTitle.is("Grid/Nudge Cluster").first.textFields.first.value.invalidate().value
    
        const userTimeScale = getTimeScale(value)
        const currentTimeScale = getTimeScale(curentNudgeValue)
    
        if (currentTimeScale != userTimeScale) {
            sf.ui.proTools.mainWindow.groups.whoseTitle.is("Grid/Nudge Cluster").first.popupButtons.whoseTitle.is("Nudge value").first.popupMenuSelect({
                menuPath: [userTimeScale],
            });
        }
    
        if (userTimeScale === "Min:Secs") {
            setMinSecNudge(value)
        } else {
            sf.ui.proTools.nudgeSet({ value: value })
        }
    }
    
    
    
    //sf.ui.proTools.appActivateMainWindow()
    sf.ui.proTools.menuClick({ menuPath: ['Window', 'Edit'] });
    
    
    //  nudge value exactly as writen in pro tools
    setNudge("00:00.500");
    
    sf.keyboard.press({
        keys: "alt+shift+return",
    });
    
    sf.keyboard.press({
        keys: "numpad minus",
    });
    
    //Calling command "Automation - Coalesce Volume Automation to Clip Gain" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/cln0nxiji0000yp102352fxp9")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:ckt90h5f100008a10ilhfochy#ckt55avng00273n10nnr8jlxw',
        props: {}
    });
    
    sf.keyboard.press({
        keys: "backspace",
    });
    
    sf.keyboard.press({
        keys: "minus",
    });
    
    //Calling command "Selected Tracks: Read" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/cln0nxiji0000yp102352fxp9")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:ckux8btgj0000xq104p36odzz#ckux8rmcr000axq101c8gu30p',
        props: {}
    });
    
    //Calling command "Enable: Post-Roll" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/cln0nxiji0000yp102352fxp9")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:cksb6k813000y7g1033sptv8k#cks81mcxb0002cu10dbsr2e8u',
        props: {}
    });
    
    //Calling command "Remove Insert from Slot 1:" from package "General PT Settings"
    sf.ui.proTools.selectedTrack.trackInsertOrSendSelect({
        insertOrSend: 'Insert',
        pluginNumber: 1,
        selectForAllSelectedTracks: true,
        pluginPath: ['no insert']
    });
    
    //Calling command "Add Insert to Slot 1: Mouth DeClick" from package "General PT Settings"
    sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.selectedTrack.trackInsertOrSendSelect({ pluginNumber: 1, pluginPath: ["plug-in", "Noise Reduction", "RX 10 Mouth De-click (mono)"], 
    selectForAllSelectedTracks: true, });
    
    
    
    sf.ui.proTools.groupsTempDelete();
    
    //Calling command "Close All Insert Plug-in Windows" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/cln0nxiji0000yp102352fxp9")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:ck1wlbrh200001n10xmexsuhd',
        props: {}
    });
    
    
    
    

    To WaveRider only one track:

    
    sf.ui.proTools.viewCloseFloatingWindows();
    
    //Calling command "Disable: Post-Roll" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/cln0nxiji0000yp102352fxp9")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:cksb6k813000y7g1033sptv8k#cks81matw0001cu10wsz0c1a5',
        props: {}
    });
    
    //Calling command "Selected Tracks: Latch" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/cln0nxiji0000yp102352fxp9")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:ckux8btgj0000xq104p36odzz#ckux8s34i000cxq10q3dnbjx3',
        props: {}
    });
    
    sf.keyboard.press({
        keys: "minus",
    });
    
    //Calling command "Remove Insert from Slot 1:" from package "General PT Settings"
    sf.ui.proTools.selectedTrack.trackInsertOrSendSelect({
        insertOrSend: 'Insert',
        pluginNumber: 1,
        selectForAllSelectedTracks: true,
        pluginPath: ['no insert']
    });
    
    //Calling command "Add Insert to Slot 1: Waverider" from package "General PT Settings"
    sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.selectedTrack.trackInsertOrSendSelect({ pluginNumber: 1, pluginPath: ["plug-in", "Dynamics", "WaveRider (mono)"], 
    selectForAllSelectedTracks: true, });
    
    
    
    //Calling command "Scroll Into View" from package "General PT Settings"
    /**@param {string} trackName */
    function ptScrollToTrack(trackName) {
        sf.ui.proTools.menuClick({ menuPath: ['Track', 'Scroll to Track...'] });
    
        sf.ui.proTools.confirmationDialog.elementWaitFor();
    
        sf.ui.proTools.confirmationDialog.textFields.first.elementSetTextFieldWithAreaValue({
            value: trackName
        });
    
        sf.ui.proTools.confirmationDialog.buttons.whoseTitle.is('OK').first.elementClick();
    
        sf.ui.proTools.confirmationDialog.elementWaitFor({ waitType: 'Disappear' });
    };
    
    sf.ui.proTools.appActivateMainWindow();
    sf.ui.proTools.mainWindow.invalidate();
    
    // Get selected track name
    const selectedTrackName = sf.ui.proTools.selectedTrack.normalizedTrackName;
    
    
    // Scroll to Track
    ptScrollToTrack(selectedTrackName);
    
    
    sf.keyboard.press({
        keys: "alt+shift+return",
    });
    
    sf.keyboard.press({
        keys: "cmd+shift+numpad plus, cmd+shift+numpad plus, cmd+shift+numpad plus, cmd+shift+numpad plus, cmd+shift+numpad plus",
    });
    
    sf.keyboard.press({
        keys: "alt+shift+numpad minus, alt+shift+numpad minus",
    });
    
    sf.wait({
        intervalMs: 1000,
    });
    
    //Calling command "Play" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/cln0nxiji0000yp102352fxp9")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:ckxz4ioil0009m1102yahtdkl',
        props: {}
    });
    
    //Calling command "Wait until Playback Stops" from package "General PT Settings"
    function waitUntilPlaybackStopped() {
        while (sf.ui.proTools.isPlaying) {
            sf.engine.checkForCancellation();
    
            sf.wait({ intervalMs: 100, });
        }
    }
    
    waitUntilPlaybackStopped();
    
    log('Playback is now stopped! Please hold.');
    
    sf.wait({
        intervalMs: 5000,
    });
    
    //Calling command "Close All Insert Plug-in Windows" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/cln0nxiji0000yp102352fxp9")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:ck1wlbrh200001n10xmexsuhd',
        props: {}
    });
    
    //Calling command "Set 500ms Nudge" from package "General PT Settings"
    function setMinSecNudge(value) {
    
        const clickCustomNudgeArea = () => sf.ui.proTools.mainWindow.gridNudgeCluster.textFields.whoseTitle.is("Nudge Custom Value").first.elementClick();
        const right = () => sf.keyboard.press({ keys: "right", fast: true });
        const zeroOut = () => sf.keyboard.press({ keys: "numpad 0", fast: true });
        const type = (text) => sf.keyboard.type({ text: text });
        const goToMin = () => sf.keyboard.press({ keys: "numpad equals", fast: true });
        const pressReturn = () => sf.keyboard.press({ keys: "return", });
    
        let [min, sec, msec] = value.split(/[:.]/)
    
        clickCustomNudgeArea();
        zeroOut();
    
        goToMin();
        type(min);
        right();
        type(sec);
        right();
        type(msec);
        pressReturn();
    
    };
    
    
    // get current time scale
    function getTimeScale(value) {
    
        let timeScale
        /// Bars Beats .  
        if (value.includes("|")) timeScale = "Bars|Beats"
        //  Min Secs .    
        else if (value.split(":").length == 2 && value.includes(".")) timeScale = "Min:Secs"
        //  Time code
        else if (value.split(":").length == 4) timeScale = "Timecode"
        //  Feet+Frames
        else if (value.includes("+")) timeScale = "Feet+Frames"
        //  Samples.     
        else timeScale = "Samples"
    
        return timeScale
    }
    
    function setNudge(value) {
    
        const curentNudgeValue = sf.ui.proTools.mainWindow.groups.whoseTitle.is("Grid/Nudge Cluster").first.textFields.first.value.invalidate().value
    
        const userTimeScale = getTimeScale(value)
        const currentTimeScale = getTimeScale(curentNudgeValue)
    
        if (currentTimeScale != userTimeScale) {
            sf.ui.proTools.mainWindow.groups.whoseTitle.is("Grid/Nudge Cluster").first.popupButtons.whoseTitle.is("Nudge value").first.popupMenuSelect({
                menuPath: [userTimeScale],
            });
        }
    
        if (userTimeScale === "Min:Secs") {
            setMinSecNudge(value)
        } else {
            sf.ui.proTools.nudgeSet({ value: value })
        }
    }
    
    
    
    //sf.ui.proTools.appActivateMainWindow()
    sf.ui.proTools.menuClick({ menuPath: ['Window', 'Edit'] });
    
    
    //  nudge value exactly as writen in pro tools
    setNudge("00:00.500");
    
    
    sf.keyboard.press({
        keys: "alt+shift+return",
    });
    
    sf.keyboard.press({
        keys: "numpad minus",
    });
    
    //Calling command "Automation - Coalesce Volume Automation to Clip Gain" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/cln0nxiji0000yp102352fxp9")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:ckt90h5f100008a10ilhfochy#ckt55avng00273n10nnr8jlxw',
        props: {}
    });
    
    sf.keyboard.press({
        keys: "backspace",
    });
    
    sf.keyboard.press({
        keys: "minus",
    });
    
    //Calling command "Selected Tracks: Read" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/cln0nxiji0000yp102352fxp9")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:ckux8btgj0000xq104p36odzz#ckux8rmcr000axq101c8gu30p',
        props: {}
    });
    
    //Calling command "Enable: Post-Roll" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/cln0nxiji0000yp102352fxp9")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:cksb6k813000y7g1033sptv8k#cks81mcxb0002cu10dbsr2e8u',
        props: {}
    });
    
    //Calling command "Remove Insert from Slot 1:" from package "General PT Settings"
    sf.ui.proTools.selectedTrack.trackInsertOrSendSelect({
        insertOrSend: 'Insert',
        pluginNumber: 1,
        selectForAllSelectedTracks: true,
        pluginPath: ['no insert']
    });
    
    //Calling command "Add Insert to Slot 1: Mouth DeClick" from package "General PT Settings"
    sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.selectedTrack.trackInsertOrSendSelect({ pluginNumber: 1, pluginPath: ["plug-in", "Noise Reduction", "RX 10 Mouth De-click (mono)"], 
    selectForAllSelectedTracks: true, });
    
    
    
    sf.wait();
    
    //Calling command "Close All Insert Plug-in Windows" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/cln0nxiji0000yp102352fxp9")
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:ck1wlbrh200001n10xmexsuhd',
        props: {}
    });
    
    
    
    

    Thanks all! If anyone has better ideas of how to mod or improve this, please share!

    • 0 replies