No internet connection
  1. Home
  2. How to

Toggle Mute/Solo on Specified Track Issue

By Jim Stewart @Jim_Stewart5
    2022-10-12 15:35:50.462Z

    I have this script for toggling between the rough and active mix, which works most of the time.

    sf.ui.proTools.trackGetByName({ name: "Rough Mix", makeVisible: false }).track.trackSelect();
    if (sf.ui.proTools.selectedTrack.isMuted)
    {
    sf.ui.proTools.selectedTrack.trackSetSolo({ targetValue: 'Enable' });
    sf.ui.proTools.selectedTrack.trackSetMute({ targetValue: 'Disable' });
    }
    else if (sf.ui.proTools.selectedTrack.isSoloed)
    {
    sf.ui.proTools.selectedTrack.trackSetSolo({ targetValue: 'Disable' });
    sf.ui.proTools.selectedTrack.trackSetMute({ targetValue: 'Enable' });
    }

    Occasionally though, it will select the track NEXT to the Rough Mix track, and I have to manually select the rough mix and then run the script (triggered from my stream deck) for it to function as usual. Once I've selected another track, the script will still only select the track NEXT to the rough mix until I restart pro tools. It will function normally for a time and then this process will start again.

    Any options to make this more stable?

    • 2 replies
    1. You may just need to put sf.ui.proTools.mainWindow.invalidate() at the top of your script to refresh SF's cache. Adding/deleting tracks can cause issues like the one you're having.

      1. JJim Stewart @Jim_Stewart5
          2022-10-12 18:26:26.996Z

          Great thanks I'll give that a try!