Hi! This repo contains custom scripts, documentation, samples etc. for SoundFlow - the GUI automation software for macOS, specifically designed and optimized for users of Pro Tools, Cubase, etc.
SoundFlow allows you to write custom scripts to automate your Mac. To get you started, here's a list of some scripts that we find usable in our daily work as sound designers in Pro Tools and other apps.
sf.keyboard.press({
keys: 'alt+minus'
});
sf.ui.proTools.audioSuiteActivatePlugin({
category: 'Other',
name: 'Gain'
});
//Define the track names of our stems
var stems = ['DX STEM', 'FOLEY STEM', 'FG STEM', 'BG STEM', 'MX STEM'];
//Show our stems if they aren't already showing
sf.ui.proTools.trackShowByName({
names: stems
});
//Select our stems
sf.ui.proTools.trackSelectByName({
names: stems
});
//Define the track names of our stems
var stems = ['DX STEM', 'FOLEY STEM', 'FG STEM', 'BG STEM', 'MX STEM'];
//Show our stems if they aren't already showing
sf.ui.proTools.trackShowByName({
names: stems
});
//Select our stems
sf.ui.proTools.trackSelectByName({
names: stems
});
sf.keyboard.press({
keys: 'shift+i'
});
//Hold down option key
sf.keyboard.modifiers({
isOption: true
});
//Set automation mode to trim
sf.ui.proTools.selectedTrack.proToolsAutomationModeSet({
automationModeName: 'trim',
trackTargetMode: 'AllTracks'
});
//Release option key
sf.keyboard.modifiers();
sf.ui.proTools.selectedTrack.insertOrSendSelect({
insertOrSend: 'Insert',
pluginNumber: 1,
pluginPath: ['plug-in', 'EQ', 'Channel Strip (mono)'],
selectForAllSelectedTracks: true
});
var vol = Math.floor(Number(event.trigger.midiBytes[2]) / 127.0 * 100.0);
sf.system.execAppleScript({
script: 'set volume output volume ' + vol + ' --100%'
});
sf.system.execAppleScript({
script:
'set curVolume to get volume settings\n' +
'if output muted of curVolume is false then\n' +
' set volume with output muted\n' +
'else\n' +
' set volume without output muted\n' +
'end if'
});
sf.midi.send({
midiBytes: [
0x90, /* 0x90: Note On */
48, /* 48: C3 */
80 /* 80: Velocity */
],
outputNum: 1 /* Send out via SoundFlow Custom Midi Output 1 */
});
sf.ui.proTools.colorsSelect({
colorBrightness: 'Medium',
colorNumber: 4,
colorTarget: 'ClipsInTracks'
});
sf.ui.izotope.appActivateMainWindow();
var mainWin = sf.ui.izotope.mainWindow;
var mainWinGrp = mainWin.getFirstOf('AXGroup');
sf.ui.izotope.menuClick({ menuPath: ['File', 'Close All'] });
while(true)
{
var dlgRes = sf.ui.izotope.dialogWaitForManual({
dialogTitle: '',
timeout: 500,
}, function(err){});
if (dlgRes.dialog)
{
dlgRes.dialog.dialogClickButton({
buttonTitle: 'No'
});
}
else
break;
sf.wait({ intervalMs: 200 });
}
sf.ui.proTools.audioSuiteActivatePlugin({
category: 'Noise Reduction',
name: 'RX 6 Connect'
});
var win = sf.ui.proTools.getFloatingWindowWithTitleStartingWith("Audio Suite: RX 6 Connect");
win.getFirstWithTitle('Processing Input Mode').menuOpenPopupMenuFromElement().popupMenu.menuClickPopupMenu({
menuName: 'clip by clip'
});
win.getFirstWithTitle("Analyze").elementClick();
sf.ui.izotope.mainWindow.getFirstWithDescription('RX6 Main Window').getFirstWithDescription("Shuttle").elementClick();
var win = sf.ui.proTools.getFloatingWindowWithTitleStartingWith("Audio Suite: RX 6 Connect");
win.getFirstWithTitle("Render").elementClick();