Export Clips as Files error and does not end up in the Bounce Files folder
Title
Export Clips as Files error and does not end up in the Bounce Files folder
What do you expect to happen when you run the script/macro?
This macro is suppose to "Export Clips as Files" and export it to the Bounced Files folder.
1- Open Pro Tools Session
2- Click on an stereo audio clip
When I click on this macro, it is suppose to "Export Clips as Files" and export the clip to the Bounced Files folder but it displays an error and strange overlapping UI artifacts.
Are you seeing an error?
The error is...
Could not find "Go to" sheet in the Save/Open dialog (Export Clips as Files...: Line 74)
What happens when you run this script?
When I run the macro, I get an error and overlapping UI artifacts and it doesn't complete what's it's suppose to do.
How were you running this script?
I clicked the "Run Script" or "Run Macro" button in SoundFlow
How important is this issue to you?
5
Details
{ "inputExpected": "This macro is suppose to \"Export Clips as Files\" and export it to the Bounced Files folder.\n\n1- Open Pro Tools Session\n2- Click on an stereo audio clip\n\nWhen I click on this macro, it is suppose to \"Export Clips as Files\" and export the clip to the Bounced Files folder but it displays an error and strange overlapping UI artifacts.\n", "inputIsError": true, "inputError": "The error is...\n\nCould not find \"Go to\" sheet in the Save/Open dialog (Export Clips as Files...: Line 74)", "inputWhatHappens": "When I run the macro, I get an error and overlapping UI artifacts and it doesn't complete what's it's suppose to do.", "inputHowRun": { "key": "-MpfwYA4I6GGlXgvp5j1", "title": "I clicked the \"Run Script\" or \"Run Macro\" button in SoundFlow" }, "inputImportance": 5, "inputTitle": "Export Clips as Files error and does not end up in the Bounce Files folder" }
Source
//Macro converted to script
//Calling command "Export Clips as Files..." from package "Pro Tools Windows" (installed from user/pkg/version "K7sfAMoyAGZQwwIp4xruZTGNFTb2/ckq9yuiw90000el10cubh258j/ckrq9mobx00024a10xkratjvz")
sf.soundflow.runCommand({
commandId: 'user:cksecvac600013a10aa2ezo8m:ckqar4a6u0001my107y72u4c3',
props: {
fileType: "WAV",
format: "Interleaved",
bitDepth: "24 Bit",
sampleRate: "48 kHz",
enforceAvid: "Disable",
publishingOptionsDismiss: true,
bouncedFilesFolder: true,
resolveDuplicate: "prompting",
dismissMP3Window: true,
}
});
Links
User UID: Nob3DYx0X6OinyxMUBK0Zgshm7O2
Feedback Key: sffeedback:Nob3DYx0X6OinyxMUBK0Zgshm7O2:-NtIjaRwurMJsrI6Zm0f
Feedback ZIP: gId7vy/zCnV8CoGLg6K+LmpOz4MIVRCTwsxYvRdiA02AwZdPBWhAsxy6pA2lOUyW/hdmtJPaJbVhqvayXNKYpPUe7VBaUcsEdD7dR6K6aVUuFEKxX2CeO+baeyAddZdpDXq3Jrf/eqyQVgO1II7mcf8YYg1Ukq+QZbeDBFBXbCs8UM9kVLYMy9uf3qSrIEYnF9UMzZ4Ki7wqSdr97vzn2/37DDzNe9iYOUnWybBVr8Sn6B5eMQ7Gy4M53Tx7UEnAka+YaF3KmOPiAC0wOhxOrbtp/fvBdYvIAS2cR9zeN39gF/lY//6PLmBPiYOnPgJamTEVD7VowUSnwPrh5luki5iJAAtg5OdxrIQ7pWXNmQA=
- Christian Scheuer @chrscheuer2024-03-19 00:22:29.812Z
Thanks! Looks like this package was made by @samuel_henriques
- CChris Landon @Chris_Landon
Yes, it is from Sam and I hope he will chime in and let me know how to fix this :) Thanks, Christian!
samuel henriques @samuel_henriques
Hello Chris,
I've updated to the last function for the go to sheet I was using, before the pro tools skd.
It works here.
In time i'll replace this thing for the sdk witch is so much better.
- CIn reply toChris_Landon⬆:Chris Landon @Chris_Landon
Hi Samuel,
I appreciate you getting back to me. If I understand you correctly, you managed to get it working on your end and I just updated the Pro Tools Windows from the SoundFlow Store but when running the macro, I'm still getting the error and the strange overlapping issues when "Export Clips as Files". This time, I received another error. I'm not sure if I'm doing anything wrong here or if something still isn't working properly with the code. Any other advice you can send my way? Thanks!
samuel henriques @samuel_henriques
are you on pt 2024.3 and you don't need mp3 option?
samuel henriques @samuel_henriques
Before I have time to remake the old one.
Here's what i'm using now/// If Export clips win doesn't open, try to show audio and Auto-Created & try again function setClipListViews() { function clipListPopupMenu(path) { sf.ui.proTools.mainWindow.popupButtons.whoseTitle.is('Clip List').first.popupMenuSelect({ menuPath: path, targetValue: "Enable" }); } // Get clip list open/closed const clipListWasClosed = sf.ui.proTools.getMenuItem("View", "Other Displays", "Clip List").isMenuChecked /// Show audio and auto-created sf.ui.proTools.menuClick({ menuPath: ["View", "Other Displays", "Clip List"], targetValue: "Enable" }); let enableViewMenus = [ ["Clear Find"], ["Show", "Audio"], ["Show", "Auto-Created"], ] enableViewMenus.forEach(clipListPopupMenu) // If clear find was needed, the clips need to be selected again so they get selected on the clip list const selectedTracks = sf.ui.proTools.selectedTrackNames sf.ui.proTools.trackDeselectAll() sf.ui.proTools.trackSelectByName({ names: selectedTracks }) // count selected clips on clip list let clipsTable = sf.ui.proTools.mainWindow.tables.whoseTitle.is('CLIPS').first; let selectedClipCount = clipsTable.getElements("AXSelectedRows").allItems.length; if (selectedClipCount === 0) { alert('Please select at least one hole clip to export and try again.') throw 0 } // Set clip list open/closed as it was if (!clipListWasClosed) sf.ui.proTools.menuClick({ menuPath: ["View", "Other Displays", "Clip List"], targetValue: "Disable" }); // reset menus sf.keyboard.press({ keys: 'n', fast: true, repetitions: 2 }); }; /** * Export clips as files settings * @param {Object} options * @param {'WAV'|'AIFF'|'MXF'} [options.userFileType='WAV'] - Default is 'WAV'. * @param {'Interleaved'|'Mono'|'MultipleMono'|'None'} [options.userFormat='Interleaved'] - Default is 'Interleaved'. * @param {'Bit24'|'Bit16'|'BitNone'|'Bit32Float'} [options.userBitDepth='Bit24'] - Default is 'Bit24'. * @param {44100|48000|96000|192000} [options.userSampleRate=48000] - Default is 48kHz. - Sample Rate Custom PT 2023.3+ only!! * @param {string} [options.userLocation] - Default is session Bounced Files folder. * @param {boolean} [options.showSuccess=false] - Default is false. */ function exportClipsAsFiles({ userFileType, userFormat, userBitDepth, userSampleRate, userLocation }) { userLocation ? userLocation : userLocation = sf.ui.proTools.mainWindow.sessionPath.split('/').slice(0, -1).join('/') + '/Bounced Files'; let hasClipSelection = sf.app.proTools.getSelectedClipInfo().clips.length > 0 if (!hasClipSelection) { throw 'Please select a clip to export.' } // Failsafe to meke sure clips are selected on clip list. If not sf.app.proTools.exportClipsAsFiles will fail without warning. let isClipSelectedOnClipList = sf.app.proTools.getFileLocation({ fileFilters: ["SelectedClipsTimeline"] }).fileLocations.length > 0 if (!isClipSelectedOnClipList) { setClipListViews(); }; // Get current files on userLocation const pathsOnUserLocation = () => sf.file.directoryGetFiles({ path: userLocation }).paths let originalPaths = pathsOnUserLocation() sf.app.proTools.exportClipsAsFiles({ bitDepth: userBitDepth, fileType: userFileType, format: userFormat, sampleRate: userSampleRate, targetDirectory: userLocation, }) //Check success const nowPaths = pathsOnUserLocation() let newPaths = nowPaths.filter(p => !originalPaths.includes(p)); //let newFileNames = newPaths ? newPaths.map(p => p.split("/").slice(-1).join()) : null if (newPaths.length === 0) throw 'Export not successful.' }; exportClipsAsFiles({ userFileType: "WAV", userFormat: "Interleaved", userBitDepth: "Bit24", userSampleRate: 48000, userLocation: sf.ui.proTools.mainWindow.sessionPath.split('/').slice(0, -1).join('/') + '/Bounced Files' })
This will export wav interleaved 24/48 to the bounced files folder
This function checks if there aren't any file selected on the clip list, and makes the list visible so pro tools lets yo export anything.
Let me now if this helps.
- CIn reply toChris_Landon⬆:Chris Landon @Chris_Landon
I am using PT 2024.3, macOS 14.3.1 and I'm not quite sure what you mean by not needing an MP3 option. Although, as well as creating a macro for "Export Clips as Files WAV 24/48", and "Export Clips as Files WAV 16/48", I also would like to create a macro for "Export Clips as Files MP3 16/44". All the info you sent me, Samuel, I appreciate you going out of your way but I know very little in regards to coding, scripts, etc. This is why I use others from the store rather than make my own. I am learning though :) Also, when I hover my mouse on the property to see its options, nothing happens. I wish I could say this helped me but unfortunately, things are going the way I'd hoped for. Thank you.
samuel henriques @samuel_henriques
Not a problem at all,
When I'm back on my computer I'll send you the setup for WAV 24/48.
What I meant when asked if you need the MP3 option is if you need to export MP3. As this script doesn't allow this, since avid didn't provide this yet.
That means as well, we'll have to figure out why the original script doesn't work, or make you one.- CChris Landon @Chris_Landon
Thanks so much, Samuel. I appreciate your wanting to send over the setup for WAV 24/48. Regarding the MP3 Option, I see it in the menu (see screenshot). I assume this won't work with the latest version of Pro Tools?
samuel henriques @samuel_henriques
Hello Chris
I've updated above with the settings as you asked.Could you please double check if you have the latest version of the package on the sf store? should be 1.2.5.
- CChris Landon @Chris_Landon
Hi Samuel,
Thanks so much for getting the script to work but I believe there's one issue. When Exporting Clips as FIles, instead of having an Interleave file, which is what I have it set up to, I get (Multiple) Mono. I am running 1.2.5. Any reasons why?
samuel henriques @samuel_henriques
ah wait, so what you are using the templates from the store, and it's working?
- CChris Landon @Chris_Landon
I installed 1.2.5 as you instructed and it does seem to work but as I mentioned before, the Export is wrong. I need Interleaved files and not (Multiple) Mono. As you can in the screenshot, I do have it set to Interleaved. Thanks!
- In reply tosamuel_henriques⬆:
samuel henriques @samuel_henriques
the only way I can reproduce it here is,
if i get two mono files and drag them to a stereo track, and export as interleaved, i get two mono files.- CChris Landon @Chris_Landon
So you can reproduce this as well. Is there any way of having Interleaved files when Exporting? I remember this working before Sonoma/Pro Tools Native Silicon.
samuel henriques @samuel_henriques
if I consolidate the clip on the stereo track, it will become stereo, and then pro tools will export interleaved
- CChris Landon @Chris_Landon
Sorry for the late responses, Samuel. I'm working with a client as we speak... The clips that I am exporting are also stereo files but they export as Multiple Mono in the Bounced Files folder. I don't understand why this happens on my end when all is fine on yours.
samuel henriques @samuel_henriques
If you do it manually on pro tools does it export interleaved?
- CChris Landon @Chris_Landon
Meaning without using SF, yes it does export Interleaved but I just tried creating another shortcut and now it works. I'm not sure why the other Action did not work or what's going on just yet but I'll have more free time later tonight and I'll continue testing. It may just be a glitch with the latest SF 5.7.1. Thanks again, Samuel, and I'll be back later and let you know how things are going.
- CChris Landon @Chris_Landon
Hi Samuel, thank you so much for helping me out by updating your script. So far, everything seems to be working perfectly and I'm sure others will appreciate it too. Cheers!