Choose a Track Preset Within the Output>New Track Dialog
Hi Geniuses of Soundflow!
I have a command that opens the "new track..." option from the Track Output drop down menu.
It works! It is this
sf.ui.proTools.selectedTrack.groups.whoseTitle.is("Audio IO").first.popupButtons.allItems[1].popupMenuSelect({
menuPath: ["new track..."],
isShift: true,
isOption: true,
});
the next step i can't seem to figure out:
I want to automatically select a specific track preset from within this pop up window
@raphaelsepulveda has some great tools to access track presets and even create new tracks with track presets, but none of them allow me to call those scripts within this specific pop-up window.
My overall goal is:
- Select An Existing Track
- Route It's Output to a New Track with a specific Track Preset selected.
If this works through the "new track..." output menu, it will auto create all the busses/namings properly.
Anyone help?
Thank you!
philip
- Raphael Sepulveda @raphaelsepulveda2023-06-02 22:00:18.000Z
Hey @Philip_weinrobe, thanks for checking out my utilities! I'll make a note to include this type of functionality.
In the meantime, here's a script that will do what you're looking for. Make sure to change the menuPaths to your desired track preset./** @param {{ menuPath1: string[], menuPath2: string[] }} args */ function outputNewTrackWithTrackPreset({ menuPath1, menuPath2 }) { const newTrackWin = sf.ui.proTools.windows.whoseTitle.is("New Track").first; sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.selectedTrack.groups.whoseTitle.is("Audio IO").first.popupButtons.allItems[1].popupMenuSelect({ menuPath: ["new track..."], isShift: true, isOption: true, }); newTrackWin.elementWaitFor(); newTrackWin.popupButtons.first.popupMenuSelect({ menuPath: menuPath1 }); newTrackWin.popupButtons.allItems[1].popupMenuSelect({ menuPath: menuPath2 }); newTrackWin.buttons.whoseTitle.is("Create").first.elementClick(); newTrackWin.elementWaitFor({ waitType: "Disappear" }); sf.ui.proTools.mainWindow.invalidate(); } outputNewTrackWithTrackPreset({ menuPath1: ["Track Presets", "Avid", "Channel Strips"], menuPath2: ["Elec Guitar"] });
- PPhilip weinrobe @Philip_weinrobe
working great!
- UIn reply toPhilip_weinrobe⬆:Udi Simhon @Udi_Simhon
Speaking of track presets...
Can you please adjust this script to add a new track from scratch out of those track presets:?
menuPath1: ["Track Presets", "Avid", "0_BF"],
menuPath2: ["Master 1"]
Thanks!Chad Wahlbrink @Chad2024-03-11 16:52:14.777Z
Hey @Udi_Simhon !
First, to tweak the original script to Output to a New Track with a Track Preset with your desired settings, I would tweak the script like this:
/** @param {{ menuPath1: string[], menuPath2: string[] }} args */ function outputNewTrackWithTrackPreset({ menuPath1, menuPath2 }) { const newTrackWin = sf.ui.proTools.windows.whoseTitle.is("New Track").first; sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.selectedTrack.groups.whoseTitle.is("Audio IO").first.popupButtons.allItems[1].popupMenuSelect({ menuPath: ["new track..."], relativePosition: { x: 2, y: 2 }, isShift: true, isOption: true, }); newTrackWin.elementWaitFor(); newTrackWin.popupButtons.first.popupMenuSelect({ relativePosition: {x:5, y:5}, menuPath: menuPath1 }); newTrackWin.popupButtons.allItems[1].popupMenuSelect({ relativePosition: {x:5, y:5}, menuPath: menuPath2 }); newTrackWin.buttons.whoseTitle.is("Create").first.elementClick(); newTrackWin.elementWaitFor({ waitType: "Disappear" }); sf.ui.proTools.mainWindow.invalidate(); } outputNewTrackWithTrackPreset({ menuPath1: ["Track Presets", "Avid", "0_BF"], menuPath2: ["Master 1"] });
↑ This is just swapping the
menuPath1
andmenuPath2
fields in the original script.- In reply toUdi_Simhon⬆:
Chad Wahlbrink @Chad2024-03-11 16:55:53.334Z
Secondly, here is the script to Create a New Track with a track preset from scratch.
/** @param {{ menuPath1: string[], menuPath2: string[] }} args */ function createNewTrackWithTrackPreset({ menuPath1, menuPath2 }) { const newTracksWin = sf.ui.proTools.windows.whoseTitle.is("New Tracks").first; sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.menuClick({ menuPath: ['Track', 'New...'], }); newTracksWin.elementWaitFor(); newTracksWin.popupButtons.allItems[1].popupMenuSelect({ relativePosition: { x: 5, y: 5 }, menuPath: menuPath1, }); newTracksWin.popupButtons.whoseDescription.is("Track format").first.elementWaitFor({ waitType: "Disappear" }); sf.ui.proTools.windows.whoseTitle.is("New Tracks").first.popupButtons.first.popupMenuSelect({ relativePosition: { x: 5, y: 5 }, menuPath: menuPath2, }) newTracksWin.buttons.whoseTitle.is("Create").first.elementClick(); newTracksWin.elementWaitFor({ waitType: "Disappear" }); } createNewTrackWithTrackPreset({ menuPath1: [ "Track Presets", "Avid", "0_BF" ], menuPath2: ["Master 1"] });
↑ This requires us to treat a few items differently. First, the UI window is
New Tracks
instead ofNew Track,
and theNew Tracks
dialog has a few more fields to account for. - In reply toUdi_Simhon⬆:
Chad Wahlbrink @Chad2024-03-11 16:59:22.675Z
Finally, here's a video demoing how I treated these tweaks:
- UIn reply toPhilip_weinrobe⬆:Udi Simhon @Udi_Simhon
Thanks @Chad !!
That was incredibly helpful!