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

Printmaster Mode for Pro Tools Track Control Deck

By William Harp @William_Harp
    2022-06-01 01:27:13.072Z

    It would be great to be able to assign a track to be a "printer master" so that it is also recorded whenever any of the other tracks in the control deck are recorded so it can be used for recording stems in a film setting.

    • 3 replies
    1. S
      SoundFlow Bot @soundflowbot
        2022-06-01 01:27:14.739Z

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

        Please note, that the best way to get help with a script, macro or other content installed from the Store is to select the script you installed, then click the red Need help button, and then click "Get help with this script or macro".
        By using this workflow, the developer of the package will get access to more information so they'll be able to help you quicker.
        You can read more about how to best get help in this article: bit.ly/sfscripthelp

        1. In reply toWilliam_Harp:

          Great idea!

          1. W
            In reply toWilliam_Harp:
            William Harp @William_Harp
              2022-06-02 01:52:53.132Z

              I've put together this script which serves as a workaround for "Printmaster Mode" for the Track Control Deck:

              const trackName = {
                  track1: "Track 1",
                  track2: "Track 2",
                  track3: "Track 3",
                  track4: "Track 4",
                  trackPM: "PM",
              }
              const trackArmed = "track punch enabled and armed"
              
              function armPrintMaster() {
                  sf.ui.proTools.trackGetByName({ name: trackName.trackPM }).track.buttons.whoseTitle.is("Track Record Enable").first.elementClick();
              }
              
              function printMasterMode() {
                  
                  const track1 = sf.ui.proTools.trackGetByName({ name: trackName.track1 }).track.buttons.whoseTitle.is("Track Record Enable").first.invalidate().value.value
                  const track2 = sf.ui.proTools.trackGetByName({ name: trackName.track2 }).track.buttons.whoseTitle.is("Track Record Enable").first.invalidate().value.value
                  const track3 = sf.ui.proTools.trackGetByName({ name: trackName.track3 }).track.buttons.whoseTitle.is("Track Record Enable").first.invalidate().value.value
                  const track4 = sf.ui.proTools.trackGetByName({ name: trackName.track4 }).track.buttons.whoseTitle.is("Track Record Enable").first.invalidate().value.value
                  const trackPM = sf.ui.proTools.trackGetByName({ name: trackName.trackPM }).track.buttons.whoseTitle.is("Track Record Enable").first.invalidate().value.value
              
                  //Checks for record arm state and arms Printmaster accordingly
                  if (trackPM !== trackArmed && (track1 == trackArmed || track2 == trackArmed || track3 == trackArmed || track4 == trackArmed)) {
                      armPrintMaster()
                  } else if (track1 !== trackArmed && track2 !== trackArmed && track3 !== trackArmed && track4 !== trackArmed && trackPM == trackArmed) {
                      armPrintMaster()
                  }
              }
              
              function loop(action, interval = 250, timeout = 5000, name = "PrintMaster") {
                  var now = (new Date).valueOf();
                  if (now - globalState[name] < timeout) throw 0; //Exit if we were invoked again inside the timeout
                  globalState[name] = now;
                  sf.engine.runInBackground(function () {
                      try {
                          while (true) {
                              sf.engine.checkForCancellation();
                              action()
                              sf.wait({ intervalMs: interval, executionMode: 'Background' });
                          }
                      } finally {
                          globalState[name] = null;
                      }
                  });
              }
              
              loop(printMasterMode)