"No Input" for all Audio Tracks
Hi,
on large post-pro sessions I often want all "Audio Tracks" to have "No Input", except Aux etc, only "real" Audio Tracks.
But I can´t figure out how to build such a script.
Thanks!
- Ingo Pusswald @ingo_luftrausch
There must be something like "Select Tracks by Type". But I can only find "Sort Tracks by Type".... Hmmm
- In reply toingo_luftrausch⬆:Khonnor Wallace @Khonnor_Wallace
Hi Ingo! You can use this:
Hope it works!
Khonnor
- In reply toingo_luftrausch⬆:Ingo Pusswald @ingo_luftrausch
I´m getting very close, I think...
The last Step I´m missing is how to "Click Popup Menu" with modifiers "Option+Shift" to apply "no input" for all selected Tracks. - In reply toingo_luftrausch⬆:Ingo Pusswald @ingo_luftrausch
Ok,
it seems to be more complicated cause the Track Size (mono, stereo etc...) also comes into count. If the first selected track is for e.g. stereo, ProTools selects "no input" only to other selected stereo tracks. - In reply toingo_luftrausch⬆:Khonnor Wallace @Khonnor_Wallace
You can try with this code:
sf.ui.proTools.appActivateMainWindow();
const popupMenu = sf.ui.proTools.trackOpenListPopupMenu().popupMenu;
popupMenu.menuClickPopupMenu({
menuPath: ["Show Only","Audio Tracks"],
});const names = sf.ui.proTools.trackGetVisibleTracks().names;
sf.ui.proTools.trackSelectByName({
names: names,
});sf.ui.proTools.selectedTrack.trackInputSearch();
Ingo Pusswald @ingo_luftrausch
Good Idea, but same behaviour :-(
First Track is Master, if its mono, only other selected mono tracks will change to "no input". All other formats will be skipped.
- In reply toingo_luftrausch⬆:Christian Scheuer @chrscheuer2020-04-17 17:47:51.788Z2020-04-17 17:55:22.374Z
Try this:
function isAudioTrack(trackName) { var track = sf.ui.proTools.trackGetByName({ name: trackName }).track; return track.title.value.indexOf('Audio Track') >= 0; } function getTrackWidth(trackName) { var track = sf.ui.proTools.trackGetByName({ name: trackName }).track; var width = track.groups.whoseTitle.is('Audio IO').first.sliders.whoseTitle.contains('Pan').count; return width; } function showAllTracks() { sf.ui.proTools.mainWindow.trackListPopupButton.popupMenuSelect({ menuPath: ['Show All Tracks'] }); sf.ui.proTools.mainWindow.invalidate(); } function setTrackHeightForAllTracks(size) { var track = sf.ui.proTools.visibleTrackHeaders[0]; track.trackScrollToView(); track.trackSelect(); var f = track.frame; var popupMenu = track.popupMenuOpenFromElement({ relativePosition: { x: f.w - 10, y: 5 }, isOption: true, }).popupMenu; popupMenu.menuClickPopupMenu({ menuPath: [size] }); } function selectAllAudioTracksOfWidth(width) { var names = sf.ui.proTools.trackNames.filter(isAudioTrack).filter(t => getTrackWidth(t) === width); if (names.length === 0) return; sf.ui.proTools.trackGetByName({ name: names[0] }).track.trackScrollToView(); sf.ui.proTools.trackSelectByName({ names: names, deselectOthers: true }); } function selectInputForAllSelected(inputPath) { if (sf.ui.proTools.selectedTrackCount == 0) return; //Scroll first track to view and select "no input" for all selected tracks sf.ui.proTools.selectedTrack.trackInputSelect({ inputPath: inputPath, selectForAllSelectedTracks: true, }); } function main() { sf.ui.proTools.appActivateMainWindow(); //Make sure all tracks are shown showAllTracks(); //Make sure all tracks are medium sized so we can read if they're mono or stereo setTrackHeightForAllTracks('medium'); //Select all mono->mono tracks and set their input selectAllAudioTracksOfWidth(0); selectInputForAllSelected(['no input']); //Select all mono->X tracks and set their input selectAllAudioTracksOfWidth(1); selectInputForAllSelected(['no input']); //Select all stereo->X tracks and set their input selectAllAudioTracksOfWidth(2); selectInputForAllSelected(['no input']); } main();
It is quite complex because Pro Tools will only set input for selected tracks of the same width (mono or stereo) as the selected track.
- KKevin madigan @Kevin_madigan
Hi Christian. Would it be possible for you to modify the above code for just a range of selected tracks and not all tracks please.
I have tried
sf.ui.proTools.selectedTrack.trackInputSelect({
inputPath: ['no input'],
selectForAllSelectedTracks: true
});
but if the first track is not visible in the edit window it does not work.Christian Scheuer @chrscheuer2021-12-22 21:46:26.587Z
Hey Kevin,
On my way to have a bit of Christmas vacation, but feel free to ping me on the other side.
Try searching for trackScrollToView, that will help you focus the first selected track. Then you'd need to get the selected track names before you call trackScrollToView, and then restore that selection afterwards.
- KKevin madigan @Kevin_madigan
Thanks, will give it a shot
- In reply tochrscheuer⬆:
Ryan DeRemer @Ryan_DeRemer
Hey @chrscheuer ,
I playing with the script you provided about, and I wonder if there's a way to add an exemption to it? For example, excluding a Print track.