No internet connection
  1. Home
  2. How to

Pro Tools 2023.6 - "Target Track for Markers" button

By Olivier Mortier @Mix7
    2023-06-10 19:41:30.077Z

    Hi, there,

    I would like to use the new track markers to make sound editing notes on dedicated tracks (Foley, FX, Music, ...).
    I use the Soundflow fonction "Select Track by Name" for this. But the "Target Track for Markers" button doesn't follow this track selection.
    Can you check this?

    Olivier

    • 13 replies
    1. Raphael Sepulveda @raphaelsepulveda2023-06-11 02:18:19.614Z2023-08-08 15:26:47.495Z

      @Mix7, give this a try. Just provide the name of the track at the bottom:

      function selectTrackAndMarkerTarget({ name }) {
          const track = sf.ui.proTools.trackGetByName({ name }).track;
          const trackMarkerTargetButton = track.groups.whoseTitle.is("Markers View").first
              .buttons.whoseTitle.is("Target Track for Markers").first
      
          track.trackSelect();
      
          if (trackMarkerTargetButton.exists && trackMarkerTargetButton.value.invalidate().value === "off") {
              trackMarkerTargetButton.elementClick();
          }
      }
      
      selectTrackAndMarkerTarget({ name: "TRACK NAME GOES HERE" });
      
      1. In reply toMix7:
        Brenden @nednednerb
          2023-06-11 19:44:14.014Z

          Hey there, that was not working for me in 2023.6.

          I did a couple edits, and this is working for me now, plus I added the prompt function which made it easy to type the "BGs" or "Diag" track name, etc, as I ran the script:

          function selectTrackAndMarkerTarget({ name }) {
              const track = sf.ui.proTools.trackGetByName({ name }).track;
              const trackMarkerTargetButton = track.groups.whoseTitle.is("Markers View").first
                  .buttons.whoseTitle.is("Add Marker").first;
          
              track.trackSelect();
              if (trackMarkerTargetButton.exists) trackMarkerTargetButton.elementClick();
          }
          
          selectTrackAndMarkerTarget({ name: prompt("Enter Track Name to Add Marker") });
          
          1. Hey @nednednerb, the script I posted is meant to select the desired track as well as its "Target Track for Markers" button, which, interestingly enough, does not get engaged when selecting the track using automation—in normal operation, the "Target Track for Markers" button follows track selection.

            Your alternative selects the "Add Marker" button, which is a different button that opens up the New Memory Location window to create Track Markers.

            Just wanted to clarify that distinction so that future readers know what each script does.

            1. Brenden @nednednerb
                2023-06-11 23:44:08.879Z

                Ah, I see the distinction. I thought the desire was to add the marker. I now see about the follow versus target being different concept.

                Cool!

            2. M
              In reply toMix7:
              Olivier Mortier @Mix7
                2023-06-11 21:48:20.027Z

                @raphaelsepulveda It's Perfect ... Thank you

                1. N
                  In reply toMix7:
                  Nick Leyers @Nick.Leyers
                    2023-08-08 07:15:58.740Z

                    This will work perfect if you use it 1 time. If you launch it the second time, when you are already at the selected track, the target button is already on and it will be turned off again. So that will result in a non-track marker.
                    I think there is no way to check the state of a target button?
                    Going back to the previous selected track is a workaround but maybe there is a better way?

                    1. @Nick.Leyers good catch!

                      Yes, it's possible to grab the state of the target button. Just updated the script above 👍🏼

                    2. C
                      In reply toMix7:
                      Chris Testa @Chris_Testa
                        2023-08-24 18:11:36.835Z

                        Man I'd really love to get this script working. I can really use it for this show I'm on. I can't get it working for some reason. Am I doing something wrong?
                        The track name is the only thing I'm adding in the last line. My last line looks like this...

                        selectTrackAndMarkerTarget({ name: "DIA ALL" });

                        Is there a format error in that? thanks

                        1. @Chris_Testa, that looks correct. It should select the track titled "DIA ALL".
                          What are you seeing?

                          1. CChris Testa @Chris_Testa
                              2023-08-26 21:17:03.569Z

                              Thanks for getting back. All it does is select that "DIA ALL" track but the marker window doesn't pop up or anything else.

                              1. Just so that we're on the same page, all this script does is select the desired track as well as its Marker Target, nothing else (see screenshot below). The reason why is because the regular trackSelect method does not select the Marker Target along with the track.

                                What were you hoping it would do?

                                1. CChris Testa @Chris_Testa
                                    2023-08-27 15:16:10.796Z

                                    Hey,

                                    I thought it was selecting the track and then "somehow" changing the marker properties in the markers ruler from "main ruler" to "track". I would imagine there is a way to add that?

                            • C
                              In reply toMix7:
                              Chris Testa @Chris_Testa
                                2023-08-27 21:46:02.269Z

                                I got it. Just added to it.

                                function selectTrackAndMarkerTarget({ name }) {
                                const track = sf.ui.proTools.trackGetByName({ name }).track;
                                const trackMarkerTargetButton = track.groups.whoseTitle.is("Markers View").first
                                .buttons.whoseTitle.is("Target Track for Markers").first

                                track.trackSelect();
                                
                                if (trackMarkerTargetButton.exists && trackMarkerTargetButton.value.invalidate().value === "off") {
                                    trackMarkerTargetButton.elementClick();
                                }
                                

                                }

                                selectTrackAndMarkerTarget({ name: "DIA ALL" });

                                sf.keyboard.press({
                                keys: "cmd+numpad enter",
                                });