Record enable all visible tracks
Is there any macro out there for this? I have a window configuration that will just show my record tracks. Once I select that I just want everything that is visible to be record enabled. Is there a way to do that because I don't see. Maybe through a group?
- Ddanielkassulke @danielkassulke
Hi Chris, something like this should work:
const pT = sf.ui.proTools; pT.appActivateMainWindow(); pT.mainWindow.invalidate(); const visibleTrackNames = pT.visibleTrackNames; pT.trackSelectByName({ names: visibleTrackNames }); const recEnable = pT.selectedTrack.buttons.whoseTitle.is("Track Record Enable").first; recEnable.mouseClickElement({ anchor: "MidCenter", isShift: true, isOption: true }); sf.ui.proTools.trackDeselectAll();- CChris Testa @Chris_Testa
Ok so I tried it. It goes down the list of all the tracks and selects them but I get an error before it pops them into record. Not sure if the folders make it an issue. I included a picture. Any thoughts? thanks

- Ddanielkassulke @danielkassulke
Hi Chris,
It looks like this is for a specific template. Does this template get used often? Is there a reason you wouldn't just record enable tracks directly by name?
- CChris Testa @Chris_Testa4
Honestly I’m down to do it anyway I just want to add it to a script I have going so I can do it anyway that makes the most sense. And yes this is my normal print portion of my Atmos template
- Ddanielkassulke @danielkassulke
Are the comments within each print track spelled exactly the same as the track names?
- CChris Testa @Chris_Testa
they should be. If they aren't then that's a mistake.
- Ddanielkassulke @danielkassulke
There'll be someone smarter than me who offers the same functionality but in 2 lines, but I'd address the tracks by name directly, like this:
pT.appActivateMainWindow(); pT.mainWindow.invalidate(); // TRACK NAMES GO HERE ↓ var desiredTrackNames = ["PRINTMASTER 5_1_L", "PRINTMASTER 5_1_C", "PRINTMASTER 5_1_R", "PRINTMASTER 5_1_LFE", "PRINTMASTER 5_1_Ls", "PRINTMASTER 5_1_Rs", "PRINTMASTER 2_0_L", "PRINTMASTER 2_0_R"]; var trackNames = sf.ui.proTools.trackNames.filter(n => desiredTrackNames.includes(n)); if (trackNames.length > 0) { sf.ui.proTools.trackSelectByName({ names: trackNames }); } const recEnable = pT.selectedTrack.buttons.whoseTitle.is("Track Record Enable").first; recEnable.mouseClickElement({ anchor: "MidCenter", isShift: true, isOption: true }); sf.ui.proTools.trackDeselectAll();- CChris Testa @Chris_Testa
Right. It seems like such a simple thing and I know I can option click on all of them but I don't want to have to.
- In reply todanielkassulke⬆:CChris Testa @Chris_Testa
I'll definitely try this. I'll let you know. Thank you.
- CChris Testa @Chris_Testa
That doesn't work unfortunately. I'm getting this... not sure if it helps or means anything...
"<< Command: RECORD ENABLE [user:ckn9rrfcc00014y10wbej77h7:clwzvhbz60000l210iwkjv1w7]03.06.2024 21:02:56.52 [Backend]: [SF_FIREBASE_WS]: Sending keep-alive
- In reply toChris_Testa⬆:
Raphael Sepulveda @raphaelsepulveda2024-06-04 04:08:29.207ZJust in case, here is another option that will enable record on all audio tracks that are not hidden or inactive:
// Get track names of audio tracks that are not hidden or inactive const trackNames = sf.app.proTools.tracks.invalidate().allItems .filter(track => track.type === "Audio" && !track.isHidden && !track.isInactive ) .map(track => track.name); // Enable record sf.app.proTools.setTrackRecordEnableState({ trackNames, enabled: true });- CChris Testa @Chris_Testa
ok great. I just shut down but I'll try it in the morning. Thank you again for all your help.
- CIn reply toChris_Testa⬆:Chris Testa @Chris_Testa4
Great. I’ll try it soon. Thank You
In reply toChris_Testa⬆:Chris Shaw @Chris_Shaw2024-06-04 15:11:58.292ZIf you're running PT 2024.3 or higher this script will record enable all visible, active audio tracks:
sf.ui.proTools.appActivateMainWindow(); const tracks = sf.app.proTools.tracks.invalidate().allItems; const allVisibleAudioTracks = tracks.filter(t => !t.isHidden && t.type == "Audio") const allActiveVisibleAudioTracksNames = allVisibleAudioTracks.filter(t => !t.isInactive).map(t => t.name) allActiveVisibleAudioTracksNames.forEach(name => { let track = sf.ui.proTools.trackGetByName({ name }).track track.buttons.whoseTitle.is("Track Record Enable").first.elementClick() })
Chris Shaw @Chris_Shaw2024-06-04 15:14:49.263ZOops, I see @raphaelsepulveda beat me to it!
- CChris Testa @Chris_Testa
That worked. Thank you Chris! I was actually talking to a friend of mine yesterday who briefly worked with you at Greene St. back in the day. Thanks again. c