No internet connection
  1. Home
  2. How to

Record Arm selected track(s)?

By Audio Remote @Audio_Remote
    2021-09-22 00:18:51.437Z

    Is it possible to build a key that will arm and disarm selected pro tools tracks?

    • 2 replies
    1. P
      Philip weinrobe @Philip_weinrobe
        2021-09-22 14:51:09.990Z

        the built in pro tools shortcut for this is shift-r

        1. A
          In reply toAudio_Remote:
          Andrew Downes @Andrew_Downes
            2021-09-22 21:52:13.268Z

            Hi There
            Here i a script I use to do just that!
            Replace my track names with the ones you want to arm.
            Cheers

            function selectTracksByNameWithWildcard(trackNames = []) {
            
                function matchWildcard(str, rule) {
                    var escapeRegex = (str) => str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
                    return new RegExp("^" + rule.split("*").map(escapeRegex).join(".*") + "$", "i").test(str);
                }
            
                var allNames = sf.ui.proTools.trackNames;
            
                var namesToSelect = allNames.filter(n => trackNames.some(tn => matchWildcard(n, tn)));
            
                sf.ui.proTools.trackSelectByName({
                    names: namesToSelect,
                    deselectOthers: true,
                });
            }
            
            selectTracksByNameWithWildcard([
                '*Mix*',
                'EMT*',
                'SPX 990*',
                'Aphex Type B*',
                'SDE 2500*',
            ]);
            
            sf.keyboard.press({
                keys: "shift+r",
            });