No internet connection
  1. Home
  2. How to

How to change the output of a group of tracks using 'search'

By Mixed By D LLC. @Mixed_By_D_LLC
    2021-02-06 11:29:29.955Z

    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",
    });

    • 5 replies
    1. In reply toMixed_By_D_LLC:
      samuel henriques @samuel_henriques
        2021-02-06 12:40:49.033Z

        Sorry, misread your questions and posted the wrong thing.

        1. In reply toMixed_By_D_LLC:
          Mixed By D LLC. @Mixed_By_D_LLC
            2021-02-06 20:09:05.447Z

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

            1. samuel henriques @samuel_henriques
                2021-02-06 20:59:32.985Z

                I 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_LLC
                  2021-02-06 21:39:21.172Z

                  So without using the 'search...' field what is the code for selecting an output path?

                  1. samuel henriques @samuel_henriques
                      2021-02-06 23:25:31.730Z

                      Hey @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,
                      });