No internet connection
  1. Home
  2. How to

Command to Un-Mute All Selected Tracks

By Daniel Knobler @Daniel_Knobler
    2022-07-23 07:14:21.763Z

    Hello,

    Anyone have a quick and easy command to unmute all selected tracks? If I have a group where some tracks are muted and some aren't there's not a particularly streamlined way to clear those mutes (without clearing the mutes for any non-selected tracks).

    I know I can shift+option click on one of the muted tracks while the group is selected, but it's hard to write a command if I don't specifically know in advance which track will be muted.

    Thanks!

    • Dan
    • 4 replies
    1. Mitch Willard @Mitch_Willard
        2022-07-23 12:29:41.313Z

        Hi @Daniel_Knobler

        This should do the trick for you.

        function unmuteSelectedTracks() {
            sf.ui.proTools.appActivateMainWindow();
        
            const selectedTracks = sf.ui.proTools.selectedTracks.trackHeaders;
        
            selectedTracks.forEach(track => {
                const muteBtn = track.buttons.whoseTitle.is('Mute').first;
                const isMuted = muteBtn.value.invalidate().value === "on state";
        
                if (isMuted) muteBtn.elementClick();
            });
        };
        
        unmuteSelectedTracks();
        
        

        Cheers

        Mitch

        1. D
          In reply toDaniel_Knobler:
          Daniel Knobler @Daniel_Knobler
            2022-07-26 18:41:40.895Z

            Thank you!

            1. D
              In reply toDaniel_Knobler:
              David Yaffe @David_Yaffe
                2023-04-12 21:39:26.592Z

                This is good, however, I need to build a button to MUTE ALL TRACKS. Can anyone help?

                Also, using PT Studio 2023 version, the Sound Flow macro for "Go To Previous Marker" doesn't work on this version. Could use some help with this one too. (while I'm at it, if it can toggle Mute and Unmute ALL tracks, that would be better) Thanks in advance.

                1. DDavid Yaffe @David_Yaffe
                    2023-04-12 21:39:53.174Z

                    Using OSX