Assigning multiple tracks to two outputs?
By william wittman @william_wittman
I'm using this script to assign a track to two output buses.
But IS there a way to do this to all selected tracks instead of only to one?
thanks!
sf.ui.proTools.appActivateMainWindow();
sf.ui.proTools.selectedTrack.outputPathButton.popupMenuSelect({
menuPath: ["bus", "MIX BUS (Stereo)"]
});
sf.ui.proTools.selectedTrack.outputPathButton.popupMenuSelect({
isControl: true,
menuPath: ["bus", "rear (Stereo)"]
});
- Ben Rubin @Ben_Rubin
William,
I found this script somewhere on this forum. (I did not write it.) But it works great for me in tons of situations.
/** @param {{ action: function }} arg */ function doForEachSelectedTrack({ action }) { sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.mainWindow.invalidate(); const selectedTracksNames = sf.ui.proTools.selectedTracks.names; sf.ui.proTools.trackDeselectAll(); selectedTracksNames.forEach(selectedTrackName => { sf.ui.proTools.trackSelectByName({ names: [selectedTrackName] }); action(selectedTrackName); sf.ui.proTools.mainWindow.invalidate(); }); } doForEachSelectedTrack({ action: selectedTrackName => { // Insert the actions you'd like to perform on every track here!! } });
best,
bwilliam wittman @william_wittman
Thanks. Will give it a go!
Chris Shaw @Chris_Shaw2022-06-29 16:00:48.289Z
Ben's solution will work but it will make the assignments one track at a time. (But the script is really useful in other situations).
This will do them all at once://Activate and Invalidate Main window sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.mainWindow.invalidate(); // Get selected track Names const selTrackNames = sf.ui.proTools.selectedTrackNames // Select first track and ensure it is visible / scrolled in Edit window sf.ui.proTools.trackSelectByName({ names: [selTrackNames[0]] }) sf.ui.proTools.selectedTrack.trackScrollToView() // Reselect originally selected tracks sf.ui.proTools.trackSelectByName({ names: selTrackNames }) // Assign outputs sf.ui.proTools.selectedTrack.outputPathButton.popupMenuSelect({ menuPath: ["bus", "MIX BUS (Stereo)"], isShift: true, isOption: true }); sf.ui.proTools.selectedTrack.outputPathButton.popupMenuSelect({ isShift: true, isOption: true, isControl: true, menuPath: ["bus", "rear (Stereo)"] });
william wittman @william_wittman