No internet connection
  1. Home
  2. How to

Possible to have a macro to coalesce read-trim for all tracks?

By Tom Greenwood @Tom_Greenwood9
    2023-01-10 11:55:19.643Z

    This is something I do a lot, would love a button on my stream deck for it but can't figure out how to do it.

    I started my demo of soundflow a few days and am really enjoying it, will definitely become a subscriber. My main issue is it's a bit addictive, spending more time playing with rather than actually mixing....!

    • 2 replies
    1. Chris Shaw @Chris_Shaw2023-01-10 18:06:53.215Z2023-01-11 00:41:48.759Z

      this should do it.
      This script will coalesce trim data on all tracks in the session (including hidden tracks):

      sf.ui.proTools.appActivateMainWindow();
      
      //Refresh SF cache
      sf.ui.proTools.mainWindow.invalidate();
      
      // Get selected tracks
      const originalSelectedTracks = sf.ui.proTools.selectedTrackNames
      
      // Show all Tracks
      sf.ui.proTools.trackListMenu({
          menuItemName: "Show All Tracks"
      })
      
      //Refresh SF cache (becuase we changed the number of tracks visible in the edit window)
      sf.ui.proTools.mainWindow.invalidate()
      
      //Select all tracks
      sf.ui.proTools.trackSelectByName({
          names: sf.ui.proTools.visibleTrackNames
      })
      
      // Refresh main menus
      sf.keyboard.press({
          keys: "n",
          fast: true,
          repetitions: 2
      })
      
      //Coalesce all trim tracks
      sf.ui.proTools.menuClick({
          menuPath: ["Track", "Coalesce Trim Automation"]
      })
      
      //Restore Previously shown tracks
      sf.ui.proTools.trackListMenu({
          menuItemName: "Restore Previously Shown Tracks"
      })
      
      //Focus main window (in case track list menu popup is stuck open)
      sf.ui.proTools.appActivateMainWindow()
      
      //reselect originally selected tracks
      sf.ui.proTools.trackSelectByName({
          names: originalSelectedTracks
      })
      
      1. TTom Greenwood @Tom_Greenwood9
          2023-01-11 20:37:16.875Z

          Thank you! Very kind of you.