No internet connection
  1. Home
  2. How to

Toggle input monitor of selected track

By Eric Sanderson @Eric_Sanderson6
    2021-10-04 14:54:35.860Z

    Hello,

    I would like to toggle the input monitor of a selected track. Can you help me with a script? I will use this on my print track to reference other mixes. I don't want the Track Name to be required becase the name is always changing. Make sense?

    Thank you

    • 5 replies
    1. Ben Rubin @Ben_Rubin
        2021-10-04 15:26:14.760Z

        Hey @Eric_Sanderson6

        I use a similar workflow and this works for me. Chooses the Input of the track rather than the Track Name.

        
        sf.ui.proTools.trackGotoByInputName({
            inputName: "PRINT",
        });
        
        sf.keyboard.press({
            keys: "shift+i",
        });
        
        

        best
        b

        1. Ben Rubin @Ben_Rubin
            2021-10-05 12:38:16.949Z

            If it's unclear, "PRINT" is the name of my print track. So should be changed to reflect the name of your print track.

          • S
            In reply toEric_Sanderson6:
            Sebastian @Sebastian
              2025-02-11 11:14:53.570Z2025-02-13 10:06:02.922Z

              Hi, I was using this script for a long time to toggle input monitoring on my last track in the session but somehow it stop working. Can somebody help me why?

              function toggleInput(trackName) {
                  var track = sf.ui.proTools.invalidate().trackGetByName({
                      name: trackName,
                      makeVisible: true,
                  }).track;
              
                  var inputBtn = track.buttons.whoseTitle.is('TrackInput Monitor').first;
                  inputBtn.elementClick();
              }
              
              function toggleInputOfLastTrack() {
                  var lastTrackName = sf.ui.proTools.trackNames.slice(-1)[0];
                  toggleInput(lastTrackName);
              }
              
              toggleInputOfLastTrack();
              
              1. B
                In reply toEric_Sanderson6:
                Brian Gluf @Brian_Gluf
                  2025-03-07 03:04:57.367Z

                  I was also using this. Something in an update changed what the Input Monitor button is called in the script.

                  Change line 7 to this:

                   var inputBtn = track.buttons.whoseTitle.startsWith('Input monitoring').first;
                  

                  Whole thing should be

                  function toggleInput(trackName) {
                      var track = sf.ui.proTools.invalidate().trackGetByName({
                          name: trackName,
                          makeVisible: true,
                      }).track;
                  
                      var inputBtn = track.buttons.whoseTitle.startsWith('Input monitoring').first;
                      inputBtn.elementClick();
                  }
                  
                  function toggleInputOfLastTrack() {
                      var lastTrackName = sf.ui.proTools.trackNames.slice(-1)[0];
                      toggleInput(lastTrackName);
                  }
                  
                  toggleInputOfLastTrack();
                  

                  This video is what helped me figure it out:

                  1. Thanks, had the same problem - this soved it!!