How to change the output of a group of tracks using 'search'
I was given a nice section of code that allows me to select a group of tracks and change the output assignment via the output search function in Pro Tools. But it seems as it gets to the part of searching for the output Soundflow has a problem doing this. Should I use search or is there a better code to manually have SoundFlow find the appropriate bus or output?
// Make Sure Pro Tools is the active app
sf.ui.proTools.appActivateMainWindow();
sf.ui.proTools.mainWindow.invalidate();
// Make Sure Pro Tools is the active app
sf.ui.proTools.trackSelectByName({ deselectOthers: true, names: ["ALL C DRUMS SUM"] });
// sf.ui.proTools.selectedTrackListItems[0].children.allItems[1].popupMenuSelect({
// isRightClick: true,
// menuPath: [ 'Show' ]
// });
// Select The C Drums Tracks
sf.ui.proTools.trackSelectByName({ deselectOthers: true, names: ["C DRUMS SUBGP A", "C DRUMS SUBGP B", "C DRUMS SUBGP C", "C DRUMS SUBGP D" ] });
// Change the output of those tracks using the search menu, I'm using search because its a little bit faster that way
sf.ui.proTools.selectedTrack.trackOutputSelect({
outputPath: ["search..."],
selectForAllSelectedTracks: true,
});
// Here goes the name of the output
sf.keyboard.type({
text: "C Drums SUM",
});
sf.wait({
intervalMs: 500,
});
sf.keyboard.press({
keys: "return",
});
// Select The "C Drums Master" Track
sf.ui.proTools.trackSelectByName({ deselectOthers: true, names: ["C DRUMS MASTER" ] });
// Change the output "C Drums Master"
sf.ui.proTools.selectedTrack.trackOutputSelect({
outputPath: ["search..."],
selectForAllSelectedTracks: true,
});
sf.keyboard.type({
text: "C Drums SUM",
});
sf.wait({
intervalMs: 500,
});
sf.keyboard.press({
keys: "return",
});
In reply toMixed_By_D_LLC⬆:samuel henriques @samuel_henriquesSorry, misread your questions and posted the wrong thing.
In reply toMixed_By_D_LLC⬆:Mixed By D LLC. @Mixed_By_D_LLCMore specifically this line of code:
// Change the output "C Drums Master"
sf.ui.proTools.selectedTrack.trackOutputSelect({
outputPath: ["search..."],
selectForAllSelectedTracks: true,
});sf.keyboard.type({
text: "C DRUMS SUM",
});sf.wait({
intervalMs: 500,
});sf.keyboard.press({
keys: "return",
});Brings up this error:
Could not select output menu item 'search...'
samuel henriques @samuel_henriquesI don't get error if the search returns only one option, like this:
and don't need the wait.
Anyway is not a great option. Using Keyboard press should be used only as last resort, mostly for stability reasons.
I think you would be better off by actually choosing the menu. But these menus are annoying, some have spaces between words that aren't visible, so take your time finding the correct form.
And Check out Kitch's video, on posting code to the forum:
How to quote code in the SoundFlow forum.hope this helps
In reply toMixed_By_D_LLC⬆:Mixed By D LLC. @Mixed_By_D_LLCSo without using the 'search...' field what is the code for selecting an output path?
samuel henriques @samuel_henriquesHey @Mixed_By_D_LLC,
in this example:
the code would be:
sf.ui.proTools.selectedTrack.trackOutputSelect({ outputPath: ["Stereo", "bus", "REC BI DIAL ST"], selectForAllSelectedTracks: true, });