I'm trying to implement an automation (when prepping sessions in Pro Tools) for routing the outputs of my tracks to specific busses (already in my session template), however the key "ingredient" here for me is the fact that I will NOT know the name of an audio track or tracks, as those will be different for each session.
I was able to get it close to working while using "Search Track Outputs", followed by typing the name of the bus I want to route it to; however if there's a way to do that without having to type it and have it automatically pre-written in the code it'd be awesome!
PS: If it helps, I also tried "Select Track Output" but I wasn't able to tweak it to bus outputs, only actual outputs; and I’ve also tried adding “type text” but no text would be added (so far both “type text” and “mouse click” don’t seem to work for me).
Thanks in advance!
Vic Cuccia
- Christian Scheuer @chrscheuer2020-12-07 20:13:40.862Z
Hi Vic,
Can you try to explain the rules it should follow? Ie. some examples of how it should find the busses? If you can show us the steps you'd manually take, it often simplifies talking about it.
Vic Cuccia @viccucciamusic
Absolutely. I got the macro to the point of simply needing to type the name of the bus I want it to be routed to; that being said, if I were to do it manually I’d either just type the name of the bus I want to route that group of tracks, such as “BASS”, or I’d hold Option + Shift and click on Output, then hover to “bus”, then in my case “bus menu 128”, then “BASS”.
Let me know if that helps, Christian! 👍
Christian Scheuer @chrscheuer2020-12-07 21:07:08.213Z
I don't think I understand the missing part then :)
Ie. are you trying to get a script to always route "bass" tracks to your "bass" bus – what should the matching rules be?Vic Cuccia @viccucciamusic
To put it simply I would like the macro to even type “BASS” for me, or route that automatically, so it’d all be just a single click. No big deal if it doesn’t work yet, just figured I’d ask (:
To give you a bit more context: I’ve created one macro for each main buss I have in my mix template, so think bass / kick / snare / etc; each macro is derived from Andrew Scheps groups & VCA package, so each macro will: 1) create a group; 2) assign the correct VCA for that group; 3) color each group accordingly; then, lastly, is when I wanted to apply this final routing rule to each so they’d end up routed as well.
Chris Shaw @Chris_Shaw2020-12-07 23:52:48.323Z
You can use track presets for this. Create a track preset that only stores the output routing of a track and name that preset "Bass". Then all you have to do is create a script that will recall that macro for your selected tracks. Create a track preset for each bus assignment you need then write a script(s) for each bus assignment you ned (GTRs, Drums, etc ) - A script template is perfect for this.
I have a page on my Stream Deck that has 12 track presets and I use them for a very similar purpose.Vic Cuccia @viccucciamusic
Great point, Chris! Any suggestions on how to create a script for recalling session data? I can't seem to find one in the editor?
Chris Shaw @Chris_Shaw2020-12-08 17:07:57.596Z
Here's the code for the Clear Sends script in my Track Data Utilities package in the store modified for your purpose. In the script, change the path in this line
menuPath: ['Recall Track Preset', 'SoundFlow', 'No Sends']
to the path of your presetsf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.mainWindow.invalidate(); var originallySelectedTrackNames = sf.ui.proTools.selectedTrackNames; function ensureFirstSelectedTrackIsVisible() { var originallySelectedTrackNames = sf.ui.proTools.selectedTrackNames; sf.ui.proTools.selectedTrack.trackScrollToView(); sf.ui.proTools.trackSelectByName({ names: originallySelectedTrackNames, deselectOthers: true }); } function recallTrackPreset() { sf.ui.proTools.selectedTrack.titleButton.popupMenuSelect({ isRightClick: true, menuPath: ['Recall Track Preset', 'SoundFlow', 'No Sends'] }); } function main() { if (sf.ui.proTools.getMenuItem('Window', 'Mix').isMenuChecked) { sf.ui.proTools.menuClick({ menuPath: ["Window", "Edit"], targetValue: "Enable", }); ensureFirstSelectedTrackIsVisible() recallTrackPreset(); sf.ui.proTools.menuClick({ menuPath: ["Window", "Mix"], targetValue: "Enable", }); sf.ui.proTools.trackSelectByName({ names: originallySelectedTrackNames, deselectOthers: true }); } else { ensureFirstSelectedTrackIsVisible(); recallTrackPreset(); sf.ui.proTools.trackSelectByName({ names: originallySelectedTrackNames, deselectOthers: true }); } } main();
Vic Cuccia @viccucciamusic
Thanks Chris, this is awesome. Not super familiar with coding/scripting yet but this is already super helpful, I see how to make it work now 🤘
- In reply toChris_Shaw⬆:
Vic Cuccia @viccucciamusic
Worked like a charm brother, thank you! Implementing further macros with it as well 🤘
Chris Shaw @Chris_Shaw2020-12-09 17:21:10.852Z
If you're copying the script to use different presets you may want to learn about using templates. That way you only have to use the script once and just swap in the path for each preset you want to use. Also, if you ever decide to add more functionality to the script you only have to modify one instead of multiple copies.
https://fb.watch/2gMh01yq5q/
Here's a tutorial on how to do it:Vic Cuccia @viccucciamusic
I actually came across templates by accident, exactly because I wanted to use them the way you mentioned. Definitely looking into expanding it, going to watch the tutorial. Thanks a lot, Chris! 🤘