No internet connection
  1. Home
  2. How to

Record Arm a Track AND record in one button?

By Digby Gillings @Digby_Gillings
    2023-02-06 03:01:42.828Z

    Hi all

    is there a way to record arm a track & have it start recording in one button for pro tools? atm I've found a script to record arm a track...then I've made another macro to "record" & "Play" but I can't figure out how to just have a button that arms the top track and starts recording straight away,

    thanks in advance for any help

    • 4 replies
    1. @Digby_Gillings, an oldie but goodie from my archives. Here ya go!

      function trackArmAndRecord({ trackName: name }) {
          const transportViewCluster = sf.ui.proTools.mainWindow
              .transportViewCluster.groups.whoseTitle.is("Normal Transport Buttons").first;
          const track = sf.ui.proTools.trackGetByName({ name }).track;
      
          if (!transportViewCluster.exists)
              throw "The Edit window transport is required.";
      
          // Arm record track
          if (!track.buttons.first.value.value)
              track.buttons.first.elementClick();
      
          // This wait is necessary. Without it, the print ends up with empty space
          // at the start of the printed clip
          sf.wait({ intervalMs: 500 });
      
          // Record
          transportViewCluster.buttons.whoseTitle.is("Record Enable").first.elementClick();
          transportViewCluster.buttons.whoseTitle.is("Play").first.elementClick();
      }
      
      trackArmAndRecord({ trackName: "Audio 1" })
      
      1. In reply toDigby_Gillings:
        Digby Gillings @Digby_Gillings
          2023-02-07 07:19:21.367Z

          thanks so much for this Raphael!

          I don't know why but I'm having so many issues with sound flow in the first few days of using it....no script I find on the forum seems to work...this is the error it's showing me when I try your script from above

          1. Hey @Digby_Gillings, I can see you just joined SoundFlow recently. Welcome!

            I forgot to point out that, for this script, you have put in the name of the track you want to record enable at the bottom section of the script, where it reads:

            trackArmAndRecord({ trackName: "Audio 1" });
            

            In this example, I put in "Audio 1" You can go ahead and replace that with your desired track name, which should clear up the error.

            As for the other issues you're experiencing, I think it might be a similar situation in which the scripts need to be modified slightly to work on your system. So please keep reaching out on the forum, we're here to help! Once you see the pattern, it'll be easier for you to identify the problem yourself.

            1. Digby Gillings @Digby_Gillings
                2023-02-08 05:57:44.755Z

                Oh the best!!

                Thanks for having me!!

                I’ll try this when I get home. Thanks again I can see everyone’s very friendly here, very happy to be onboard

                Thanks again Raphael 😀👍