Audio Track outputs NOT assigining to Folder Track Input
Title
Audio Track outputs NOT assigining to Folder Track Input
What do you expect to happen when you run the script/macro?
Macro is supposed to select the audio tracks inside a folder track, and then set the output of those audio tracks to the respective input of the folder track.
PS: Worked perfectly fine before latest update
Are you seeing an error?
Either it says "consider selecting link edit and track selection", which is already linked;
or it says "cannot read property titleButton of null (select Audio tracks in current FOLDER line 6)
What happens when you run this script?
It does select all the audio tracks inside the folder, but then when it's time to assign the outputs of those audio tracks to the input of the folder tracks it fails
How were you running this script?
I used a Stream Deck button
How important is this issue to you?
5
Details
{ "inputExpected": "Macro is supposed to select the audio tracks inside a folder track, and then set the output of those audio tracks to the respective input of the folder track.\n\nPS: Worked perfectly fine before latest update", "inputIsError": true, "inputError": "Either it says \"consider selecting link edit and track selection\", which is already linked;\n\nor it says \"cannot read property titleButton of null (select Audio tracks in current FOLDER line 6)", "inputWhatHappens": "It does select all the audio tracks inside the folder, but then when it's time to assign the outputs of those audio tracks to the input of the folder tracks it fails", "inputHowRun": { "key": "-MpfwmPg-2Sb-HxHQAff", "title": "I used a Stream Deck button" }, "inputImportance": 5, "inputTitle": "Audio Track outputs NOT assigining to Folder Track Input" }
Source
//Macro converted to script
sf.keyboard.press({
keys: "semicolon",
});
//Calling command "Scroll Into View" from package "VIC Session Prep 2021.6"
sf.soundflow.runCommand({
commandId: 'package:ckq75nbdm001j9j103cjpxs0p',
props: {}
});
//Calling command "Select Audio Tracks in Current FOLDER" from package "VIC Session Prep 2021.6"
sf.soundflow.runCommand({
commandId: 'package:ckq75vumk001k9j10ymcdkc2x',
props: {}
});
//Calling command "Chris / Vic Audio OUT to Folder IN" from package "VIC Session Prep 2021.6"
sf.soundflow.runCommand({
commandId: 'package:ckqa029yb0000t210zwsiw03r',
props: {}
});
/* sf.wait({
intervalMs: 500,
}); */
Links
User UID: ts9UvupFaLPwJESD715UM7Fll4I2
Feedback Key: sffeedback:ts9UvupFaLPwJESD715UM7Fll4I2:-N10jOJSM-T33o60DgF4
Linked from:
- Kitch Membery @Kitch2022-05-02 02:49:32.733Z
Hi @viccucciamusic,
I believe there was a change to the way Pro Tools labels their UI elements for folder tracks.
Could you try updating to the latest version of SoundFlow from the following link?
https://my.soundflow.org/install
I believe it is version 5.1.3
Note: you may need to reset and reassign the "Folder" parameter for the presets that are not working for them to work correctly.
If the issue persist let me know and I'll investigate further. :-)
Vic Cuccia @viccucciamusic
Hey Kitch,
Yea I'm already on Soundflow 5.13. And do you mean delete, and re-create the folders?
Kitch Membery @Kitch2022-05-02 18:02:46.512Z
Hi @viccucciamusic,
My apologies, looking at your logs further, it seems the error is to do with the script named "Chris / Vic Audio OUT to Folder IN" from package "VIC Session Prep 2021.6"
I think this may be a script that @Chris_Shaw helped you with in the following thread?
Selected Track (s) output & Color to the respective routing folder@Chris_Shaw let. me know if you have time to take a look at it. :-)
- In reply toviccucciamusic⬆:
Kitch Membery @Kitch2022-05-02 19:38:16.443Z
Just took a quick look at the script on the post from mid last year...
Assuming I've understood correctly what the script is meant to do, here is a refactored version that does not require scrolling up the tracks to find the folder name.
function getPreviosFolderTrack(trackName) { const track = sf.ui.proTools.trackGetByName({ name: trackName }).track; const trackType = track.title.invalidate().value.split(" - ").pop().trim(); const inputPath = track.inputPathButton.value.invalidate().value;; return { trackName, trackType, inputPath, } } function main() { sf.ui.proTools.appActivateMainWindow(); const visibleTrackNames = sf.ui.proTools.visibleTracks.names; const selectedTrackName = sf.ui.proTools.selectedTrack.normalizedTrackName; const priorTracks = visibleTrackNames.slice(0, visibleTrackNames.indexOf(selectedTrackName)); const priorRoutingFolderTrack = priorTracks.map(getPreviosFolderTrack).filter(tn => tn.trackType === "Routing Folder Track").pop() const folderInput = priorRoutingFolderTrack.inputPath; sf.ui.proTools.selectedTrack.trackOutputSelect({ outputSelector: items => items.filter(p => p.path[1] && p.path[1].split("(").slice(0, 1).join("(") === folderInput)[0], selectForAllSelectedTracks: true }); } main();
@viccucciamusic give this script a try in place of the "Chris / Vic Audio OUT to Folder IN" from package "VIC Session Prep 2021.6" script.
Rock on!
- PPhilip weinrobe @Philip_weinrobe
just want to report here that this script is working BEAUTIFULLY!
Kitch Membery @Kitch2022-05-02 20:13:52.700Z
Great to hear @Philip_weinrobe :-)
Rock on!
- In reply toPhilip_weinrobe⬆:PPhilip weinrobe @Philip_weinrobe
oh hi @Kitch !
just realized the script fails at line 38 if the folder isn't a top level folder. any nested folder causes a failure.
can this script be made to work with a folder one (or many) layers down?thank you!
philip- DDaniel Knobler @Daniel_Knobler
I'm having the same issue. Failure at line 38:
const inputPath = track.inputPathButton.value.invalidate().value;;
It works if the destination folder is top level but fails if it is not. This would be incredibly useful if that could be fixed.
Thank you!
Kitch Membery @Kitch2022-05-04 08:19:13.752Z
Hi @Philip_weinrobe & @Daniel_Knobler,
Ah yes I see that the folder names have an
.1
,.2
etc suffix added depending on their depth.I'll should be able to work it out this weekend. :-)
I'll report back. :-)
Rock on!- In reply toDaniel_Knobler⬆:
Kitch Membery @Kitch2022-05-05 22:50:30.141Z
Hi @Philip_weinrobe, @Daniel_Knobler, @viccucciamusic & @Chris_Shaw
This should fix the issue where the next Routing Folder is nested and the input does not match the Track name.
function getPreviousFolderTrack(trackName) { const track = sf.ui.proTools.trackGetByName({ name: trackName }).track; const trackType = track.title.invalidate().value.split(" - ").pop().trim(); const inputPath = track.inputPathButton.title.invalidate().value.split("\n").pop().slice(1, -1); return { trackName, trackType, inputPath, } } function main() { sf.ui.proTools.appActivateMainWindow(); const visibleTrackNames = sf.ui.proTools.visibleTracks.names; const selectedTrackName = sf.ui.proTools.selectedTrack.normalizedTrackName; const priorTracks = visibleTrackNames.slice(0, visibleTrackNames.indexOf(selectedTrackName)); const priorRoutingFolderTrack = priorTracks.map(getPreviousFolderTrack).filter(tn => tn.trackType === "Routing Folder Track").pop(); const folderInput = priorRoutingFolderTrack.inputPath; sf.ui.proTools.selectedTrack.trackOutputSelect({ outputSelector: items => items.filter(p => p.path[1] && p.path[1].split("(").slice(0, 1).join("(").trim() === folderInput)[0], selectForAllSelectedTracks: true }); } main();
Let me know if it works for you guys. :-)
Rock on!- DDaniel Knobler @Daniel_Knobler
Thanks, @Kitch. I tried this out but I'm still getting this error if the folder is not base level:
Could not find Audio IO (AxPtTrackInputPathButton) (Route to Host Folder: Line 5)
It works sometimes when the destination folder is base level but sometimes I get a different error. It's not consistent. Even in identical test situations sometimes it works fine and sometimes it throws an error. Like I just made three new tracks (one stereo and two mono) and ran the same command three times. The first two worked and third one threw this error:
Could not select output menu item: '' (Route to Host Folder: Line 25)
Kitch Membery @Kitch2022-05-06 08:25:21.410Z
Thanks @Daniel_Knobler,
I'll have to do some more extensive testing when I have a change. Hopefully on the weekend :-)
- In reply toDaniel_Knobler⬆:
Kitch Membery @Kitch2022-05-06 08:44:40.605Z
Here is a slight alteration (Although I've not tested it fully)
function getPreviousFolderTrack(trackName) { const track = sf.ui.proTools.trackGetByName({ name: trackName }).track; const trackType = track.title.invalidate().value.split(" - ").pop().trim(); const inputPath = track.inputPathButton.title.invalidate().value.split("\n").pop().slice(1, -1); return { trackName, trackType, inputPath, } } function main() { sf.ui.proTools.appActivateMainWindow(); const visibleTrackNames = sf.ui.proTools.visibleTracks.names; const selectedTrackName = sf.ui.proTools.selectedTrack.normalizedTrackName; const priorTracks = visibleTrackNames.slice(0, visibleTrackNames.indexOf(selectedTrackName)); const priorRoutingFolderTrack = priorTracks.map(getPreviousFolderTrack).filter(tn => tn.trackType === "Routing Folder Track").pop(); const folderInput = priorRoutingFolderTrack.inputPath + " "; sf.ui.proTools.selectedTrack.trackOutputSelect({ outputSelector: items => items.filter(p => p.path[1] && p.path[1].split("(").slice(0, 1).join("(") === folderInput)[0], selectForAllSelectedTracks: true }); } main();
If this version does not work, if you could give me a run down of a scenario that sometimes fails (or better yet always fails), with a screen shot of the Edit window and let me know the exact input path to each of the folder tracks. eg
Folder Name : Folder 2
Folder Name Input Path: ["bus","Folder2.1"]
Folder Track Width: (Mono)This will hopefully give me the information I need to solve the issue.
Thanks in advance :-)- DDaniel Knobler @Daniel_Knobler
So this newest one seems to work consistently when the destination folder is base level, but still gives me an error when the destination folder is not.
Here's a screen shot of me testing it:
If I run the script on tracks "Audio 1" through "Audio 4" it will work just fine. If I run the script on "Audio 6" I'll get that error.
And here's a screen shot of my normal mixing configuration where almost all audio tracks are at least two basic folders and one routing folder deep:
So a typical configuration where I'd like the script to work would be:
Basic Folder: *
Basic Folder: DRUMS
Routing Folder: Drums
Routing Folder Input Path: ["bus","Drums"]
Routing Folder Width: (Stereo)I have commands that automatically move and route audio tracks to certain folders when I'm doing mix prep, but it'd be super helpful to have this flexible automatic command to assign the routing to whatever folder the track is in.
Thanks so much for all of your help!
Kitch Membery @Kitch2022-05-09 08:22:40.932Z
Hi @Daniel_Knobler,
Thanks for that information. The "Basic Folder Tracks" have no input path button which was causing the script to fail. Try this;
function getPreviousFolderTrack(trackName) { const oldTrackSelection = sf.ui.proTools.selectedTrackNames; const track = sf.ui.proTools.trackGetByName({ name: trackName }).track; const trackType = track.title.invalidate().value.split(" - ").pop().trim(); const inputPath = track.inputPathButton.exists ? track.inputPathButton.title.invalidate().value.split("\n").pop().slice(1, -1) : ""; sf.ui.proTools.trackSelectByName({ names: oldTrackSelection }); return { trackName, trackType, inputPath, } } function main() { sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.mainWindow.invalidate(); const visibleTrackNames = sf.ui.proTools.visibleTracks.names; const selectedTrackName = sf.ui.proTools.selectedTrack.normalizedTrackName; const priorTracks = visibleTrackNames.slice(0, visibleTrackNames.indexOf(selectedTrackName)); const priorRoutingFolderTrack = priorTracks.map(getPreviousFolderTrack).filter(tn => tn.trackType === "Routing Folder Track").pop(); const folderInput = priorRoutingFolderTrack.inputPath + " "; sf.ui.proTools.selectedTrack.trackOutputSelect({ outputSelector: items => items.filter(p => p.path[1] && p.path[1].split("(").slice(0, 1).join("(") === folderInput)[0], selectForAllSelectedTracks: true }); } main();
Let me know how it goes for you.
Rock on!- DDaniel Knobler @Daniel_Knobler
Thanks, Kitch.
When I first tried this update I got the following error a few times, but now it seems to be working!
No track selected (in Track List View)
Consider turning on Link Edit and Track Selection (Route to Host Folder: Line 30)(Link Edit and Track Selection is on and a track is selected when I run the command.)
I'll keep using it and hopefully it'll keep working.
Thanks so much for all of your help!
Kitch Membery @Kitch2022-05-09 20:49:29.919Z
My pleasure @Daniel_Knobler,
I'm glad it's working now. :-)
- DDaniel Knobler @Daniel_Knobler
Sorry to keep bugging you about this, but now I'm back to this script failing with the error:
No track selected (in Track List View)
Consider turning on Link Edit and Track Selection (Route to Host Folder: Line 30)When I run the command whatever track is selected gets UN-selected, the color palette window pops open, and I get that error.
Thanks again.
- Dan
Kitch Membery @Kitch2022-05-10 19:35:10.429Z
Hi @Daniel_Knobler,
This issue seems like it may not be related to the script. Do you by chance have another command that is being triggered by the same trigger eg keyboard shortcut?
To rule out the script, can you run the script I posted from the "Run Command" button in the SoundFlow editor?
- DDaniel Knobler @Daniel_Knobler
Same error when run directly from the SoundFlow editor
Kitch Membery @Kitch2022-05-10 19:42:08.068Z
Could you do a screen recording? That may help me work out what’s going wrong.
- DDaniel Knobler @Daniel_Knobler
Kitch Membery @Kitch2022-05-10 20:31:57.926Z
Thanks @Daniel_Knobler,
I'm not sure how that happened and I can't reproduce it here, however, I did notice some redundant code in the script that is the only thing that I believe could be causing the issue.
Try this.
function getPreviousFolderTrack(trackName) { const track = sf.ui.proTools.trackGetByName({ name: trackName }).track; const trackType = track.title.invalidate().value.split(" - ").pop().trim(); const inputPath = track.inputPathButton.exists ? track.inputPathButton.title.invalidate().value.split("\n").pop().slice(1, -1) : ""; return { trackName, trackType, inputPath, } } function main() { sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.mainWindow.invalidate(); const visibleTrackNames = sf.ui.proTools.visibleTracks.names; const selectedTrackName = sf.ui.proTools.selectedTrack.normalizedTrackName; const priorTracks = visibleTrackNames.slice(0, visibleTrackNames.indexOf(selectedTrackName)); const priorRoutingFolderTrack = priorTracks.map(getPreviousFolderTrack).filter(tn => tn.trackType === "Routing Folder Track").pop(); const folderInput = priorRoutingFolderTrack.inputPath + " "; sf.ui.proTools.selectedTrack.trackOutputSelect({ outputSelector: items => items.filter(p => p.path[1] && p.path[1].split("(").slice(0, 1).join("(") === folderInput)[0], selectForAllSelectedTracks: true }); } main();
Note: Just in case SoundFlow is for some reason stuck in an incorrect state, It might be a good troubleshooting step to quit SoundFlow from the icon up by the clock and restart it from the Applications folder.
Rock on!
- In reply toKitch⬆:
Vic Cuccia @viccucciamusic
None of the ones above work for me (using Routing Folders) for the purpose of routing the output of audio tracks in side those folders, to the folders' respective inputs. Was working perfectly fine before the latest Pro Tools updates.
Kitch Membery @Kitch2022-05-15 23:25:10.218Z
Hi Vic,
Have you updated SoundFlow to the latest version? If not you can find it here.
https://my.soundflow.org/install
If you have already updated to the latest version, be sure to use the "Script/Macro Help" workflow shown in the following article bit.ly/sfscripthelp.
This way I'll get the information I need to investigate the issue further.
Thanks in advance.
- In reply toviccucciamusic⬆:
Kitch Membery @Kitch2022-05-15 23:26:40.150Z
Bes sure to use the script from the following thread post.
Vic Cuccia @viccucciamusic
Yup, been testing on latest version and restarting sound flow/computer a few times. With luck it works once or twice, then stops. Here's what I'm looking to do in order, perhaps we can start from a clean slate to keep things simple and easy to pinpoint any potential issues:
-
Select ALL audio tracks inside a Routing Folder
-
Assign the output of those Audio tracks to the INPUT of the respective Routing Folder
BONUS:
3. Create a group with those Audio tracks named the same as the Routing Folder;- Color those Audio tracks the same color as the Routing Folder.
PS: I had it working up until point #3 (and on loop) prior to the latest Pro Tools update so I know it can be done.
Thanks in advance for all your guys' help! Let me know if you need any further info from me.
Best,
Vic Cuccia @viccucciamusic
Correction:
BONUS:
3. Create a group with those Audio tracks named the same as the Routing Folder;
4. Color those Audio tracks the same color as the Routing Folder.- In reply toviccucciamusic⬆:
Kitch Membery @Kitch2022-05-16 00:11:07.216Z
Thanks, @viccucciamusic,
Right now I don't have the information I need to troubleshoot the issue, as I can't recreate the issue here. As you mentioned it works a few times and then stops working, so I need to know what change has caused it to stop working.
By following the steps in the following link bit.ly/sfscripthelp, I'll get the information I need to look into the issue further.
Also, if you could provide a video of the script failing, that would be very helpful.
Hopefully, we can get it sorted. but for now, it would be best if we isolate the issue by testing the following script before we start adding additional features.
function getPreviousFolderTrack(trackName) { const track = sf.ui.proTools.trackGetByName({ name: trackName }).track; const trackType = track.title.invalidate().value.split(" - ").pop().trim(); const inputPath = track.inputPathButton.title.invalidate().value.split("\n").pop().slice(1, -1); return { trackName, trackType, inputPath, } } function main() { sf.ui.proTools.appActivateMainWindow(); const visibleTrackNames = sf.ui.proTools.visibleTracks.names; const selectedTrackName = sf.ui.proTools.selectedTrack.normalizedTrackName; const priorTracks = visibleTrackNames.slice(0, visibleTrackNames.indexOf(selectedTrackName)); const priorRoutingFolderTrack = priorTracks.map(getPreviousFolderTrack).filter(tn => tn.trackType === "Routing Folder Track").pop(); const folderInput = priorRoutingFolderTrack.inputPath; sf.ui.proTools.selectedTrack.trackOutputSelect({ outputSelector: items => items.filter(p => p.path[1] && p.path[1].split("(").slice(0, 1).join("(").trim() === folderInput)[0], selectForAllSelectedTracks: true }); } main();
-
- In reply toviccucciamusic⬆:
Kitch Membery @Kitch2022-05-15 23:43:06.788Z
It would also be great if you could upload a screen recording so I can recreate your folder setup when testing. :-)
Vic Cuccia @viccucciamusic
All sounds great, @Kitch ! Thank you for the quick reply and thorough explanation. I'll get it testing here and update the thread asap.
Kitch Membery @Kitch2022-05-16 00:16:18.516Z
Rock on Champion! :-)
- In reply toviccucciamusic⬆:Vic Cuccia @viccucciamusic
Just checking in! I posted the updated thread (through Need Help as requested) yesterday, attaching the link to it here also:
Looking forward to getting this up and running again (:
- PIn reply toviccucciamusic⬆:Philip weinrobe @Philip_weinrobe
i'm not sure if people are still in this discussion, but the script is working perfect for me. thanks @Kitch !
one thing everyone should note with ALL custom scripts (this one included) is that you need to make sure you are on the right window. i sandwich every single script with chris shaw's tool to help with that.
super important stuff.
Vic Cuccia @viccucciamusic
Hey Philip,
I'm still testing it out with mixed results, perhaps that's the reason why? Could you expand on what you meant by "sandwiched the scripts", and what tool that is?
Thanks in advance, man!
- PPhilip weinrobe @Philip_weinrobe
chris shaw has a package in the store called "mix Window Compatibility Helper Script" which, i find, is critical for vitually every script i use.
search for it in the store, and follow the instructions.
also if you are on pro tools 2022.5 you MUST be on SF 5.1.5.
2022.5 changed how output paths work and all my output path based scripts broke until i updated SFVic Cuccia @viccucciamusic
Ha, there ya go! Thanks for sharing about this, Philip, I wasn't aware of it! Will definitely give it a shot 🤘