No internet connection
  1. Home
  2. How to

Building a DynAssist workflow

By Peter Rydberg @Peter_Rydberg
    2025-05-08 15:42:34.090Z

    Hi there -

    I do a lot of dialogue editing and DynAssist just sped up my work flow exponentially. But now I'd like it to go even faster. I'm building a script that will duplicate the track playlist, instantiate the DynAssist ARA, and then render the ARA process. Since DynAssist takes some time to scan the audio in the playlist and calculate the changes, I need to figure out how to wait for this process to finish before rendering. Since some tracks have more content than others, I'd like to be able to render after the scan is complete rather than a specific amount of time with a 'wait' function.

    Any assistance with this would be much appreciated! Here's what I have so far, with a gap in Line 60 before the render function kicks in:

    / script
    
    sf.ui.proTools.appActivateMainWindow();
    sf.ui.proTools.mainWindow.invalidate();
    
    // substitute "New..." with "Duplicate Main Playlist..." to duplicate track
    const trackAction = "Duplicate Main Playlist..."
    
    //Get selected Track Names
    const originalSelectedTracks = sf.ui.proTools.selectedTrackNames;
    
    //Select first track and make sure it is scrolled into view
    sf.ui.proTools.trackSelectByName({
        names: [originalSelectedTracks[0]]
    })
    
    sf.ui.proTools.selectedTrack.trackScrollToView()
    
    //Reselect originally selected tracks
    sf.ui.proTools.trackSelectByName({ names: originalSelectedTracks })
    
    //Duplicate or Create New Tracks depending on value of `trackAction`
    sf.ui.proTools.selectedTrack.popupButtons.whoseTitle.is("Playlist selector").first.popupMenuSelect({
        isShift: true,
        isOption: true,
        menuPath: [trackAction]
    })
    
    //Delete everything below this line if you want to name the playlist
    //otherwise the script will automatically click "OK" to close confirmation dialog
    
    
    //If only one track is originally selected, wait for the confirmation dialog
    sf.wait({ intervalMs: 300 })
    
    const confDialog = sf.ui.proTools.confirmationDialog
    
    //close conmf dialog
    if (confDialog.exists && originalSelectedTracks.length == 1) {
        sf.ui.proTools.windows.first.buttons.whoseTitle.is("OK").first.elementClick()
    }
    //SELECT DYNASSIST
    
    function setElasticAudioPlugin({ plugin }) {
        const track = sf.ui.proTools.selectedTrack;
        const elasticAudioOrAraPlugInSelector = track.popupButtons.whoseTitle.is("Elastic Audio or ARA Plugin selector").first
    
        elasticAudioOrAraPlugInSelector.popupMenuSelect({
            menuPath: [plugin],
            isOption: true,
            isShift: true,
        });
    }
    
    sf.ui.proTools.appActivateMainWindow();
    
    setElasticAudioPlugin({
        plugin: 'DynAssist'
    });
    
    
    
    //RENDER DynAssist
    
    sf.ui.proTools.selectedTrack.titleButton.popupMenuSelect({
        isRightClick: true,
        isShift: true,
        isOption: true,
        menuPath: ['DynAssist', 'Render']
    
    
    • 0 replies