Hello SoundFlow community!
In Pro Tools, one can select the group of tracks you want to cascade inputs or output assignments: Hold down Shift+Option+Command and select the input (or output) on first track. But sadly this is not possible to acheive on Master Fader tracks.
I'm wondering how it could be made possible to create an action to achieve a cascading assignment of a group of mono Master Faders.
Thanks for your help!
Curtis
- samuel henriques @samuel_henriques
Hello Curtis,
I managed something, it won't work with the items in "track" menu:
But it's working with the rest and I figured I should work mostly on mono outs but you'll have some issues with stereo ones. Since you said you are using mono outs, this should work for you.
So select all tracks you want this cascade,
then set the first track output
then run the script.If you get in trouble opening the menu but return error or it's opening the wrong thing, send me a video of it so I can try something.
Here you go,
/** * @param {array} restSelectedTracks - selected track names, excluding first * @param {number} pathIndex - index of first selected track's output path in array of menuItems * @param {array} allOutputs - menuItems */ function setOutput(restSelectedTracks, pathIndex, allOutputs) { for (let i = 0; i < restSelectedTracks.length; i++) { const track = sf.ui.proTools.trackGetByName({ name: restSelectedTracks[i] }).track try { // Scrool to view track.trackScrollToView() // set output track.outputPathButton.popupMenuSelect({ menuPath: allOutputs.map(x => x.path)[pathIndex + 1 + i] }); } catch (err) { } }; }; sf.ui.proTools.appActivateMainWindow() sf.ui.proTools.invalidate() // First selected track + rest of selected tracks const [firstSelectedTrackName, ...restSelectedTracks] = sf.ui.proTools.selectedTrackNames // Get full items from popup const allOutputs = sf.ui.proTools.trackGetByName({ name: firstSelectedTrackName }).track.outputPathButton.popupMenuFetchAllItems().menuItems const checkedOutput = allOutputs.filter(x => x.element.isMenuChecked)[0] sf.ui.proTools.appActivateMainWindow() // Get index of first selected track output const pathIndex = allOutputs.map(x => x.path).indexOf(checkedOutput.path) // Set output setOutput(restSelectedTracks, pathIndex, allOutputs)
- In reply tosamuel_henriques⬆:
samuel henriques @samuel_henriques
Updated above:
Improved code, there was a stupid mistake there. I think it's more stable now. Still won't work properly with "track" menus, but if the idea is work only with that menu, I think I can fix it.
Bus and output items are working well for me.
- In reply toCurtis_Macdonald⬆:Curtis Macdonald @Curtis_Macdonald
Thank you Samuel!
This script is working fairly well. An issue though is when there are many master faders, more so than can be viewed in a single window, the script stalls until I scroll further, and then skips assigning some tracks. Is there a way for the script to continue working assigning the outputs of the master faders that aren't on screen, for instance if you had 128 mono master faders that you'd like to assign?
Thanks again for your help!!
samuel henriques @samuel_henriques
Glad it's working. Sorry completely forgot about scrolling the tracks,
Just updated above.
Let me know if it's better.Curtis Macdonald @Curtis_Macdonald
Hi Samuel!
Sadly this script has broke with new PT updates, I believe. Now when I try to run it I get the following error (attached gif)
I'm trying to study the code to see what needs modifying, but I'm not seeing it yet. Any help would be greatly appreciated!
Am getting the following error:
Command Error: Cascade outputs on Master Faders Element is required (Cascade outputs on Master Faders: Line 37)
Thanks so much!
Curtissamuel henriques @samuel_henriques
Hey Curtis,
Sorry it's failing, what pt are you in?
could you do a screen recording so I might figure it out?samuel henriques @samuel_henriques
made different version, try this one. Still as long as you don't use the "track" submenu, should work for the other ones
/** * @param {array} restSelectedTracks - selected track names, excluding first * @param {string} firstOutName - name of first output */ function setOutput(restSelectedTracks, firstOutName) { for (let i = 0; i < restSelectedTracks.length; i++) { const track = sf.ui.proTools.trackGetByName({ name: restSelectedTracks[i] }).track try { // Scrool to view track.trackScrollToView() // set output track.outputPathButton.popupMenuSelect({ menuSelector: menuItems => menuItems[menuItems.indexOf(menuItems.find(out => out.path.slice(-1).join().split(" -> ")[0].trim().startsWith(firstOutName))) + 1 + i] }); } catch (err) { } }; }; sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.invalidate(); // First selected track + rest of selected tracks const [firstSelectedTrackName, ...restSelectedTracks] = sf.ui.proTools.selectedTrackNames; const firstOutName = sf.ui.proTools.selectedTrack.outputPathButton.value.invalidate().value.split(" -> ")[0].trim(); setOutput(restSelectedTracks, firstOutName);
Curtis Macdonald @Curtis_Macdonald
Thank you Samuel! will test this out when I have a moment. I'm currently running PT 2020.10
samuel henriques @samuel_henriques
Found the problem, fixed on both versions.
And the second version will work better now, with mono or stereo paths, or hardware. And any track type with output.Curtis Macdonald @Curtis_Macdonald
The first version is working like it used to, THANK YOU!
But this second one is behaving differently. It's skipping three tracks after the first one...
samuel henriques @samuel_henriques
On master tracks or other tracks?
Curtis Macdonald @Curtis_Macdonald
Oh just the master tracks…
samuel henriques @samuel_henriques
I might have updated the script without letting you know. could you copy+paste it again just to be sure?
samuel henriques @samuel_henriques
if it's still not working, make me a screen capture please.
Curtis Macdonald @Curtis_Macdonald
yeah problem persists in the second version.
trying to upload an animated gif but the forum blocks it...
https://img.imgy.org/-5JO.gifsamuel henriques @samuel_henriques
It works for me as well with larger than stereo paths
there should be something on the menu list I didn't consider
Could you please make a screenshot showing the menu items of that bus?samuel henriques @samuel_henriques
Your first menu is different, Just updated a slight change in the way it reads the menu path. try now
samuel henriques @samuel_henriques
Found the thing...
I bet you have the I/O menu organised by type, and the other two options work.
Let me figure out how to fix the scriptsamuel henriques @samuel_henriques
UPDATED: it should work on any I/O organise option
Curtis Macdonald @Curtis_Macdonald
very cool Samuel! It now works with "Type" IO menu option selected, but when I select "Type and Width" it now skips two of the master fader tracks before it changes the IO.
samuel henriques @samuel_henriques
pro tools is doing it's thing....
I don't know how you get this bed menu and what's inside:samuel henriques @samuel_henriques
anyway, the first script doesn't work either?
Curtis Macdonald @Curtis_Macdonald
the first script works great, I'm going with that for now!
I've been using that bed menu so that makes total sense
thank YOU so much
- In reply toCurtis_Macdonald⬆:Curtis Macdonald @Curtis_Macdonald
This script is working beautifully, a huge thank you Samuel !!
- EIn reply toCurtis_Macdonald⬆:Eli Crews @Eli_Crews
Hi @samuel_henriques, is there a way to make a similar script just for for stereo outputs, and always starting with the same output name? Basically I want to be able to cascade all selected tracks to busses, starting with Bus 1-2, second track to Bus 3-4, etc.
Thanks!
samuel henriques @samuel_henriques
Hello Eli Crews,
Here's an adapted script. It will set the output of all selected master faders to cascading busses starting on the first bus (name of the bus doesn't matter, only position on the list).
Let me know if this is it,/** * @param {array} selectedTracks - selected track names, excluding first * @param {number} pathIndex - index of first selected track's output path in array of menuItems * @param {array} busOuts - menuItems */ function setOutput(selectedTracks, pathIndex, busOuts) { for (let i = 0; i < selectedTracks.length; i++) { const track = sf.ui.proTools.trackGetByName({ name: selectedTracks[i] }).track try { // Scrool to view track.trackScrollToView() // set output track.outputPathButton.popupMenuSelect({ menuPath: busOuts.map(x => x.path)[pathIndex + i] }); } catch (err) { } }; }; function main() { sf.ui.proTools.appActivateMainWindow() sf.ui.proTools.invalidate() // First selected track + rest of selected tracks const selectedTrackNames = sf.ui.proTools.selectedTrackNames // Get full items from popup const allOutputs = sf.ui.proTools.trackGetByName({ name: selectedTrackNames[0] }).track.outputPathButton.popupMenuFetchAllItems().menuItems const allBusOutputs = allOutputs.filter(b => b.path[0].toLowerCase() === "bus") //const checkedOutput = allOutputs.filter(x => x.element.isMenuChecked)[0] sf.ui.proTools.appActivateMainWindow() // Set output setOutput(selectedTrackNames, 0, allBusOutputs) sf.ui.proTools.trackSelectByName({ names: selectedTrackNames }); } main();
- EEli Crews @Eli_Crews
Thank you for this, but it's including mono busses, so the first output is Bus 1-2, then it's Bus 1, then Bus 2, then Bus 3-4, then Bus 3, etc. If you can get it to skip the mono busses, it'll be exactly what I'm looking for. Thanks!
- EEli Crews @Eli_Crews
I don't know if employing the shift-option-command modifier keys would help, that's how I do it manually now and it selects only stereo busses.
samuel henriques @samuel_henriques
ahh, mine only shows the stereo.
But I can make a version with shift+option+cmd to see if it works for you. Just a momentsamuel henriques @samuel_henriques
could you post a screen shot showing the Bus 1-2 path?
Like this:- EEli Crews @Eli_Crews
samuel henriques @samuel_henriques
cool try this:
sf.ui.proTools.appActivateMainWindow() sf.ui.proTools.invalidate() const firstSelectedTrack = sf.ui.proTools.selectedTrackHeaders[0] firstSelectedTrack.outputPathButton.popupMenuSelect({ menuPath: ["bus", "Bus 1-2 (Stereo)"], isCommand: true, isOption: true, isShift: true });
- EEli Crews @Eli_Crews
Amazing, that works great, thank you!! So much simpler, too.
samuel henriques @samuel_henriques
I remember that this shortcut wouldn't work on master tracks.
I used to have visible mono and stereo bus but don't remember if I changed it manually or some pt option.
Great its working and it's much faster.
- In reply toEli_Crews⬆:EEli Crews @Eli_Crews
I suppose I could make a script to get rid of all the mono sub-paths in my I/O setup, but I'm curious if you have a better solution first, since I do use them sometimes.