the closing window thing in pt is a bit wild. i have my commands for audiosuite windows, but not for inserts. i need a general command for closing insert windows, focused or not. not dependant on which track is selected. not dependant on what insert slot the plugin is on. close insert window, focused or not
- Daniel Perez @daniel_perez
Chad Wahlbrink @Chad2023-08-14 14:59:30.856Z
@daniel_perez - is this a request to close a "named" insert plug-in window? Or are you just wanting to close all insert windows?
I'm curious if any of the built-in SoundFlow commands in the Pro Tools package are already functional enough for you?
I typically use SoundFlow's "Close All Floating Windows" command or "Close Focused Floating Window Command," as I'm working. The built-in "Hide All Floating Windows" menu action is also really powerful for window management.
Daniel Perez @daniel_perez
ah, yes. i don't want to close audiosuite windows. they need to stay opened. preferably any insert, names or not.
Chad Wahlbrink @Chad2023-08-14 15:08:04.317Z
Let me know if any of these solutions work for you ✨
- In reply toChad⬆:
Chad Wahlbrink @Chad2023-08-14 15:04:54.009Z
If closing a "named" insert window (only instances of Pro-Q 3 for instance) is desired use this:
For AudioSuite:let pluginToClose = `Fabfilter Pro-Q 3` //Close plug-in windows sf.ui.proTools.floatingWindows.whoseTitle.startsWith("Plug-in: " + pluginToClose).allItems.forEach(function (win) { try { win.windowClose(); } catch (err) { } });
let pluginToClose = `Fabfilter Pro-Q 3` //Close plug-in windows sf.ui.proTools.floatingWindows.whoseTitle.startsWith("Audio Suite: " + pluginToClose).allItems.forEach(function (win) { try { win.windowClose(); } catch (err) { } });
Daniel Perez @daniel_perez
let pluginToClose = `Fabfilter Pro-Q 3` //Close plug-in windows sf.ui.proTools.floatingWindows.whoseTitle.startsWith("Plug-in: " + pluginToClose).allItems.forEach(function (win) { try { win.windowClose(); } catch (err) { } });
this one looks great, but is it possible to close focused plugin (insert) window only? i have pro limiter or nugen open (unfocused) for loudness and these ones should not be closed of course.
Chad Wahlbrink @Chad2023-08-14 15:55:21.570Z
@daniel_perez - can you provide more details on what you want a script to do for you? I think what you are saying is that you want to "close all insert windows except pro-limiter or nugen"?
If that's the case, I could likely whip up a script that will close all inserts except an array (a named group of plug-ins).Daniel Perez @daniel_perez
yes. it's basically this:
//Close plug-in windows sf.ui.proTools.floatingWindows.whoseTitle.startsWith('Plug-in').allItems.forEach(function (win) { try { win.windowClose(); } catch (err) { } });
but except avid pro limiter.
Chad Wahlbrink @Chad2023-08-14 19:58:48.753Z
// Plugins to Keep Open let pluginsToKeep = [`Plug-in: Pro Limiter`,]; // Get Plugin Windows let currentPluginWins = sf.ui.proTools.floatingWindows.whoseTitle.startsWith("Plug-in").allItems; // Filter and Close Plugin Windows let filtered = currentPluginWins.filter(item => !pluginsToKeep.includes(item.title.value)); filtered.forEach(function (win) { try { win.windowClose(); } catch (err) { } });
Chad Wahlbrink @Chad2023-08-14 20:00:30.811Z
@daniel_perez - give this a shot. You can add more plugin's to that initial array following this pattern:
// Plugins to Keep Open let pluginsToKeep = [`Plug-in: Pro Limiter`, `Plug-in: FabFilter Pro-Q 3`];
- In reply todaniel_perez⬆:Nathan Salefski @nathansalefski
This will work. If you have multiple plugin windows open whichever is "focused" will be closed first.
var frontPluginWin = sf.ui.proTools.getFloatingWindowWithTitleStartingWith("Plug-in").invalidate(); frontPluginWin.windowClose();
Daniel Perez @daniel_perez
that's just perfect.