No internet connection
  1. Home
  2. How to

Cascade outputs on Master Faders

By Curtis Macdonald @Curtis_Macdonald
    2021-07-13 17:15:04.925Z

    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

    Solved in post #2, click to view
    • 35 replies

    There are 35 replies. Estimated reading time: 14 minutes

    1. samuel henriques @samuel_henriques
        2021-07-15 21:19:32.537Z2022-11-15 18:40:03.262Z

        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)
        
        
        Reply2 LikesSolution
        1. samuel henriques @samuel_henriques
            2021-07-16 16:14:41.490Z

            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.

          • Curtis Macdonald @Curtis_Macdonald
              2021-07-23 17:23:39.401Z

              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!!

              1. samuel henriques @samuel_henriques
                  2021-07-23 17:51:10.487Z

                  Glad it's working. Sorry completely forgot about scrolling the tracks,
                  Just updated above.
                  Let me know if it's better.

                  1. Curtis Macdonald @Curtis_Macdonald
                      2022-11-14 23:39:15.506Z

                      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!
                      Curtis

                      1. samuel henriques @samuel_henriques
                          2022-11-15 11:52:42.594Z

                          Hey Curtis,
                          Sorry it's failing, what pt are you in?
                          could you do a screen recording so I might figure it out?

                          1. samuel henriques @samuel_henriques
                              2022-11-15 12:34:24.660Z2022-11-17 23:20:34.585Z

                              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);
                              
                              1. Curtis Macdonald @Curtis_Macdonald
                                  2022-11-15 15:43:24.187Z

                                  Thank you Samuel! will test this out when I have a moment. I'm currently running PT 2020.10

                                  1. samuel henriques @samuel_henriques
                                      2022-11-15 18:40:27.813Z2022-11-15 19:06:30.952Z

                                      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.

                                      1. Curtis Macdonald @Curtis_Macdonald
                                          2022-11-17 20:50:46.700Z

                                          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...

                                          1. samuel henriques @samuel_henriques
                                              2022-11-17 21:02:00.927Z

                                              On master tracks or other tracks?

                                              1. Curtis Macdonald @Curtis_Macdonald
                                                  2022-11-17 21:03:17.498Z

                                                  Oh just the master tracks…

                                                  1. samuel henriques @samuel_henriques
                                                      2022-11-17 21:13:23.566Z

                                                      I might have updated the script without letting you know. could you copy+paste it again just to be sure?

                                                      1. samuel henriques @samuel_henriques
                                                          2022-11-17 21:29:27.669Z

                                                          if it's still not working, make me a screen capture please.

                                                          1. Curtis Macdonald @Curtis_Macdonald
                                                              2022-11-17 22:25:10.823Z

                                                              yeah problem persists in the second version.

                                                              trying to upload an animated gif but the forum blocks it...
                                                              https://img.imgy.org/-5JO.gif

                                                              1. samuel henriques @samuel_henriques
                                                                  2022-11-17 22:29:56.870Z2022-11-17 22:37:48.255Z

                                                                  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?

                                                                  1. samuel henriques @samuel_henriques
                                                                      2022-11-17 22:47:53.120Z

                                                                      Your first menu is different, Just updated a slight change in the way it reads the menu path. try now

                                                                      1. samuel henriques @samuel_henriques
                                                                          2022-11-17 23:03:43.218Z

                                                                          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 script

                                                                          1. samuel henriques @samuel_henriques
                                                                              2022-11-17 23:21:18.001Z

                                                                              UPDATED: it should work on any I/O organise option

                                                                              1. Curtis Macdonald @Curtis_Macdonald
                                                                                  2022-11-18 00:23:17.060Z

                                                                                  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.

                                                                                  1. samuel henriques @samuel_henriques
                                                                                      2022-11-18 01:53:28.555Z

                                                                                      pro tools is doing it's thing....
                                                                                      I don't know how you get this bed menu and what's inside:

                                                                                      1. samuel henriques @samuel_henriques
                                                                                          2022-11-18 01:56:20.316Z

                                                                                          anyway, the first script doesn't work either?

                                                                                          1. Curtis Macdonald @Curtis_Macdonald
                                                                                              2022-11-18 04:55:06.536Z

                                                                                              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

                                                      2. Curtis Macdonald @Curtis_Macdonald
                                                          2021-07-26 17:31:04.407Z

                                                          This script is working beautifully, a huge thank you Samuel !!

                                                          1. E
                                                            Eli Crews @Eli_Crews
                                                              2024-02-17 17:24:22.058Z

                                                              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!

                                                              1. samuel henriques @samuel_henriques
                                                                  2024-02-18 11:47:59.570Z

                                                                  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();
                                                                  
                                                                  1. EEli Crews @Eli_Crews
                                                                      2024-02-19 18:25:42.007Z

                                                                      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!

                                                                      1. EEli Crews @Eli_Crews
                                                                          2024-02-19 18:27:01.117Z

                                                                          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.

                                                                          1. samuel henriques @samuel_henriques
                                                                              2024-02-19 18:31:03.648Z

                                                                              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 moment

                                                                              1. samuel henriques @samuel_henriques
                                                                                  2024-02-19 18:33:37.960Z

                                                                                  could you post a screen shot showing the Bus 1-2 path?
                                                                                  Like this:

                                                                                  1. EEli Crews @Eli_Crews
                                                                                      2024-02-19 18:49:13.168Z
                                                                                      1. samuel henriques @samuel_henriques
                                                                                          2024-02-19 18:50:18.390Z

                                                                                          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
                                                                                          });
                                                                                          
                                                                                          1. EEli Crews @Eli_Crews
                                                                                              2024-02-19 18:54:07.460Z

                                                                                              Amazing, that works great, thank you!! So much simpler, too.

                                                                                              1. samuel henriques @samuel_henriques
                                                                                                  2024-02-19 18:56:19.451Z

                                                                                                  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.

                                                                                              2. In reply toEli_Crews:
                                                                                                EEli Crews @Eli_Crews
                                                                                                  2024-02-19 18:50:35.032Z

                                                                                                  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.