No internet connection
  1. Home
  2. How to

Roundtrip audio from Pro Tools to Ableton Live and back

This script shows how to copy the current clip in Pro Tools to the clipboard and switch to Ableton Live:

sf.ui.proTools.clipConsolidateAndCopyToClipboard();

//Undo - this makes sure PT still has the original, non consolidated clip
sf.ui.proTools.menuClick({ menuPath: ['Edit', 'Undo'], looseMatch: true });

//Switch to Ableton Live
var live = sf.ui.app('com.ableton.live');
live.appActivateMainWindow();

Then inside Live, you can just hit Cmd+V to import the audio.
Now add the effects you want, or sample whatever you'd like.

When you're done to render the result and send back to Pro Tools, use this script:

//Helper function to get a unique id based on the current date and time
function getUid()
{
    var d = new Date();
    return ('000' + d.getFullYear()).slice(-4) + ('0' + (d.getMonth() + 1)).slice(-2) + ('0' + d.getDate()).slice(-2) + '-' + 
        ('0' + d.getHours()).slice(-2) + ('0' + d.getMinutes()).slice(-2) + ('0' + d.getSeconds()).slice(-2);
}

//Find Ableton and store it in the "live" variable
var live = sf.ui.app('com.ableton.live');
if (!live) throw 'Live is null';
live.appActivateMainWindow();

//Invoke Export
live.menuClick({ menuPath: ['File', 'Export Audio/Video...'] });

//Wait for the Export Audio/Video dialog to appear
var exportDlg = live.dialogWaitForManual({ dialogTitle: 'Export Audio/Video' }).dialog;
sf.keyboard.press({ keys: 'enter' });

//Wait for the Save dialog to appear
var saveDlg = live.dialogWaitForManual({ dialogTitle: 'Save' }).dialog;

//Find the Audio Files folder of your open Pro Tools session.
//We want to store the rendered file inside that
var audioFilesFolder = sf.ui.proTools.mainWindow.sessionPath.split('/').slice(0, -1).join('/') + '/Audio Files';

//Give it a unique filename based on the current date and time
var filename = 'live-' + getUid() + '.wav';

//Store the complete path for later use
var path = audioFilesFolder + '/' + filename;

//Enter our folder name and wait for the save dialog to be ready for the filename
sf.keyboard.type({ text: audioFilesFolder });
sf.keyboard.press({ keys: 'enter' });
while(true)
    try { saveDlg.getFirstOf('AXSheet'); } catch (err) { break; }
sf.wait({ intervalMs: 200 });

//Type the filename and Enter
sf.keyboard.type({ text: filename });
sf.wait({ intervalMs: 50 });
sf.keyboard.press({ keys: 'enter' });

//Wait for the render to finish
while(true)
{
    sf.wait({ intervalMs: 50 });
    var t = live.get('AXMainWindow').title.value;
    if (!(t == 'Export Audio/Video' || t == 'Export Audio...'))
        break;
}

//Copy the file to the clipboard
sf.file.copyToClipboard({ path: path });

//Switch back to Pro Tools
sf.ui.proTools.appActivateMainWindow();

Now back in Pro Tools, you can hit Ctrl+T to spot the file from the clipboard.

VoilĂ  !

  • 0 replies
  1. Progress
    with doing this idea
  2. @chrscheuer marked this topic as Planned 2018-07-17 19:24:40.165Z.
  3. @chrscheuer marked this topic as Started 2018-07-17 19:24:40.707Z.
  4. @chrscheuer marked this topic as Done 2018-07-17 19:24:41.285Z.