No internet connection
  1. Home
  2. Macro and Script Help

I want to toggle the input monitoring button on my track named "ROUGH

By Santiago Goyenechea @Santiago_Goyenechea
    2025-02-14 00:50:54.461Z

    Title

    I want to toggle the input monitoring button on my track named "ROUGH

    What do you expect to happen when you run the script/macro?

    I want to toggle the input monitoring button on my track named "ROUGH."

    Are you seeing an error?

    What happens when you run this script?

    don't know how to generate the command.

    How were you running this script?

    I used a Stream Deck button

    How important is this issue to you?

    5

    Details

    {
        "inputExpected": "I want to toggle the input monitoring button on my track named \"ROUGH.\"",
        "inputIsError": false,
        "inputWhatHappens": " don't know how to generate the command.",
        "inputHowRun": {
            "key": "-MpfwmPg-2Sb-HxHQAff",
            "title": "I used a Stream Deck button"
        },
        "inputImportance": 5,
        "inputTitle": "I want to toggle the input monitoring button on my track named \"ROUGH"
    }

    Source

    //Define the track names of our stems
    var stems = ['ROUGH'];
    
    //Show our stems if they aren't already showing
    sf.ui.proTools.trackShowByName({
    	names: stems
    });
    
    //Select our stems
    sf.ui.proTools.trackSelectByName({
    	names: stems
    });
    
    sf.keyboard.press({
    	keys: 'shift+i'
    });
    

    Links

    User UID: meB0nZd4uWbtQ38mxbSAwAnQIgy2

    Feedback Key: sffeedback:meB0nZd4uWbtQ38mxbSAwAnQIgy2:-OJ0vyRcHi_1gaOsidw7

    Feedback ZIP: SOuhy9FAUAVzYFyXomFL0AmYS7q1Iu0opAbin8kRIZf9i+5nJ/gtphd0AYG/LYxqKMb1NjekEwEcPjvo5/ffS9iiA2pA0f9Km6CR6SkvPSYOfTh9CBfWIHjAl/JCU5l1eI1OfTF+YWswneCqG/8TYn7wXWHU4XuaqKRr8pf8rRpXK7VTHe98l3BRWov7VbNVWjH+l/ToVprIH16xXKLyh96wQolRCdhYvKzMwefjvjhXqz3ll3ogvOvFAzk8Onyzs+o9nGGhpC2bNAXFqun3D+tDkB9rmVEJw29UVO6mQRXtOLobNbheVy8hgVzSmYvjp5yZ9s7Y5oxx1KuLZ+5UjlnPRml1Y57mEoY/3DVMSpw=

    • 7 replies
    1. Kitch Membery @Kitch2025-02-14 18:25:20.766Z

      Hi @Santiago_Goyenechea,

      This can be done for sure... Before I answer, are you wanting to toggle the input of more than one track or just the "ROUGH" track?

      1. For a single track only :) "ROUGH"

        1. Kitch Membery @Kitch2025-02-14 18:34:33.611Z

          Great, Then this should do the trick.

          const targetTrackName = "ROUGH";
          
          const track = sf.app.proTools.tracks.invalidate().allItems
              .find(t => t.name === targetTrackName);
          
          const isInputMonitorOn = track.isInputMonitoringOn;
          
          // Make the target track visible
          sf.app.proTools.setTrackHiddenState({
              trackNames: [targetTrackName],
              enabled: false,
          });
          
          // Toggle the Input Monitor on the target track
          sf.app.proTools.setTrackInputMonitorState({
              trackNames: [targetTrackName],
              enabled: !isInputMonitorOn,
          });
          
          1. Works Perfect!!! YEEEEI

            1. Kitch Membery @Kitch2025-02-14 18:43:51.779Z

              Awesome!

              1. Beat me to it!

                1. Kitch Membery @Kitch2025-02-14 18:46:02.275Z

                  Finally I beat you to it, @Chris_Shaw!