No internet connection
  1. Home
  2. Packages
  3. Pro Tools

on protools 2024.10, The command is being made in stereo, not mono. (soundflow default pro tools command) However, there is no problem with the other commands that make the track.

By Min Kyu Kang @Min_Kyu_Kang
    2024-11-12 01:41:17.924Z

    Title

    on protools 2024.10, The command is being made in stereo, not mono. (soundflow default pro tools command)

    However, there is no problem with the other commands that make the track.

    What do you expect to happen when you run the script/macro?

    on protools 2024.10, The command is being made in stereo, not mono. (soundflow default pro tools command)

    However, there is no problem with the other commands that make the track.

    Are you seeing an error?

    on protools 2024.10, The command is being made in stereo, not mono. (soundflow default pro tools command)

    However, there is no problem with the other commands that make the track.

    What happens when you run this script?

    on protools 2024.10, The command is being made in stereo, not mono. (soundflow default pro tools command)

    However, there is no problem with the other commands that make the track.

    How were you running this script?

    I used a Stream Deck button

    How important is this issue to you?

    3

    Details

    {
        "inputExpected": "on protools 2024.10, The command is being made in stereo, not mono. (soundflow default pro tools command)\n\nHowever, there is no problem with the other commands that make the track.",
        "inputIsError": true,
        "inputError": "on protools 2024.10, The command is being made in stereo, not mono. (soundflow default pro tools command)\n\nHowever, there is no problem with the other commands that make the track.",
        "inputWhatHappens": "on protools 2024.10, The command is being made in stereo, not mono. (soundflow default pro tools command)\n\nHowever, there is no problem with the other commands that make the track.",
        "inputHowRun": {
            "key": "-MpfwmPg-2Sb-HxHQAff",
            "title": "I used a Stream Deck button"
        },
        "inputImportance": 3,
        "inputTitle": "on protools 2024.10, The command is being made in stereo, not mono. (soundflow default pro tools command)\n\nHowever, there is no problem with the other commands that make the track."
    }

    Source

    //Preset converted to script
    
    
    //Invoking preset "Routing Folder - Mono" of template "Create New Track(s)" in package "Pro Tools"
    sf.soundflow.runCommand({
        commandId: 'user:ckp49i4j60000a2100yfwywgf:ckumdk025000hph10fohx90lw',
        props: {
            trackFormat: "Mono",
            trackType: "Routing Folder",
        },
    })
    

    Links

    User UID: c7tteZE4TbTTqymoVle68yljlJv2

    Feedback Key: sffeedback:c7tteZE4TbTTqymoVle68yljlJv2:-OBT132HqThkp63l55xw

    Feedback ZIP: M4InlYVNc16GgWrGxOhNFeI/coafLkUdUWocnrnUsQbtXuPCn3I6xJcvjX+kN5QXzHUjK6qYgJM09GE/HxCKW31uOHzuibCmIJUVlHyWxzjSmtSZlJGdIVl+XrWwO4uqRus2g6n9aRX4P8WkRGs15phAi9Q4iFXUp/gk5D8FDrPb+QjCPWootWKzx1b9nYvcogYlEgVUjDt9DFvzYTL2YmLcgk4C+hzkAGO1aQBoQFBVDzHE+wHWUIPpqSm1Kz9/YpYOTJu2kxKIfh6aDX5mZsLR0yBvksaMVIMg3seSSECyaTt5u9lP2chMCsMR71G39aiSmChr/csASY8dF0INsg==

    Solved in post #8, click to view
    • 7 replies
    1. S
      SoundFlow Bot @soundflowbot
        2024-11-12 01:41:19.766Z

        Thanks for posting a question or an issue related to the 'Pro Tools' package.
        This package is made by @chrscheuer. We're auto-tagging them here so that they will hopefully be able to help you.

        1. cc @Chad
          Can you help reproduce this and look into a potential bug fix in the code?

        2. In reply toMin_Kyu_Kang:
          Chad Wahlbrink @Chad2024-11-12 20:23:33.967Z

          Hi @Min_Kyu_Kang,

          Thanks for this report!

          I believe this is an issue with macOS 14 and 15 (Sonoma and Sequoia). Have you recently updated to one of those versions?

          The issue may be that the script reads the value of the 'Track format' popup menu as 'Mono.'

          Before the UI updates to "Routing Folder," when it switches to "Stereo."

          This causes the script to continue without changing the 'Track format' to 'Mono.'

          The following modified script does work. However, I have to use a sf.waitFor() call at line 88 to wait for the Track type popup menu's value to update.

          
          /**
           * @param {string} description
           * @param {string} path
           */
          function setTrackPopupOption(description, path) {
              let win = sf.ui.proTools.windows.whoseTitle.is("New Tracks").first;
          
              if (win.popupButtons.whoseDescription.is(description).first.title.invalidate().value !== path) {
          
                  win.popupButtons.whoseDescription.is(description).first.popupMenuSelect({
                      menuPath: [path],
                  }, `Could not select the "${description}" : ${path}`);
              }
          }
          
          /**
           * @param {AxElement} numberField
           * @param {string} targetValue
           */
          function setNumberFieldValue(numberField, targetValue) {
              if (numberField.value.invalidate().value.trim() !== targetValue) {
          
                  const oldClipboardText = sf.clipboard.getText().text;
          
                  try {
                      const text = targetValue + '';
                      /* sf.clipboard.setText({ text: text }); */
          
                      sf.ui.proTools.appActivateMainWindow();
          
                      numberField.mouseClickElement({ relativePosition: { x: 5, y: 5 } });
          
                      /* sf.keyboard.press({ keys: "cmd+v", }); */
                      sf.keyboard.type({ text: text });
          
                      var i = 0;
          
                      do {
                          sf.wait({ intervalMs: 10 });
          
                          i++
          
                          if (i >= 20) { throw `Could not update the number field` }
                      } while (numberField.value.invalidate().value !== targetValue);
          
                  } finally {
                      sf.clipboard.setText({ text: oldClipboardText });
                  }
              }
          }
          
          const trackSettings = {
              numberOfNewTracks: 1,
              trackFormat: "Mono",
              trackType: "Routing Folder",
              clickCreate: true,
          };
          
          
          /**
           * @param {object} trackSettings
           * @param {number} trackSettings.numberOfNewTracks
           * @param {string} trackSettings.trackFormat
           * @param {string} trackSettings.trackType
           * @param {string} trackSettings.trackTimebase
           * @param {string} trackSettings.trackName
           * @param {boolean} trackSettings.clickCreate
           */
          function createNewTrack(trackSettings) {
              const { numberOfNewTracks, trackFormat, trackType, trackTimebase, trackName, clickCreate } = trackSettings;
          
              sf.ui.proTools.menuClick({ menuPath: ["Track", "New..."] });
          
              const win = sf.ui.proTools.windows.whoseTitle.is('New Tracks').first;
          
              win.elementWaitFor();
          
              const numberOfNewTracksField = win.textFields.whoseTitle.is("Number of new tracks").first;
          
              //Set number of tracks
              setNumberFieldValue(numberOfNewTracksField, numberOfNewTracks.toString());
          
              //Set track type
              setTrackPopupOption('Track type', trackType);
          
              // Wait for Track Type to Update
              sf.waitFor({
                  callback: () => {
                      return sf.ui.proTools.windows.whoseTitle.is("New Tracks").first.popupButtons.whoseDescription.is("Track type").first.value.value === trackType;
                  },
                  timeout: 1000
              }, `Failed waiting`);
          
              //Set track format
              if (trackFormat && trackType !== "Basic Folder" && trackType !== "VCA Master" && trackType !== "MIDI Track") {
                  setTrackPopupOption('Track format', trackFormat);
              }
          
              //set track timebase
              if (trackTimebase && trackType !== "Basic Folder") {
                  setTrackPopupOption('Track Timebase', trackTimebase);
              }
          
              //Set track Name
              if (trackName) {
                  win.textFields.whoseTitle.is('Track Name').first.elementSetTextFieldWithAreaValue({
                      value: trackName,
                  });
              }
          
              if (clickCreate === true) {
                  //Click Create
                  win.buttons.whoseTitle.is('Create').first.elementClick();
          
                  //Wait for window to disappear
                  win.elementWaitFor({ waitType: "Disappear" });
              }
          }
          
          function main(settings) {
              const { numberOfNewTracks, trackFormat, trackType, trackTimebase, trackName, clickCreate } = settings;
          
              if (!sf.ui.proTools.isRunning) throw `Please open Pro Tools`;
          
              sf.ui.proTools.appActivateMainWindow();
          
              createNewTrack({
                  numberOfNewTracks,
                  trackFormat,
                  trackType,
                  trackTimebase,
                  trackName,
                  clickCreate,
              });
          }
          
          main(trackSettings);
          
          
          
          1. Chad Wahlbrink @Chad2024-11-12 20:39:37.954Z

            I confirmed that the "Create New Track(s): Routing Folder - Mono" command works as expected on Pro Tools 2024.10 for my macOS 12.7.6 system.

            1. MMin Kyu Kang @Min_Kyu_Kang
                2024-11-13 02:31:54.634Z

                HI, i checked too. it works.
                It's been a while since I updated my Mac to Sonoma, so I think it's an issue that probably occurred in the Pro Tools 2024.10 version.

                1. Thank you! I've updated the Pro Tools package in version 1.1.2 to include this fix.

                  Reply1 LikeSolution
            2. S
              In reply toMin_Kyu_Kang:
              SoundFlow Bot @soundflowbot
                2024-11-12 20:24:39.965Z

                This issue is now tracked internally by SoundFlow as SF-1504