insert active/inactive for all
greetings friends
I'm looking to tweek Chris Shaw's insert active/inactive macro in a way that will affect all plug in slots on the track
Has this been done already and I'm missig it somewhere on the forum?
thanks!
-dex
- In reply todex_green⬆:Chris Shaw @Chris_Shaw2021-02-23 18:28:17.424Z
Hey Dex,
Just to clarify, are you referring to the Insert & Send Cycle / Toggle / Bypass package?
Also what functions do you want to affect all plugin slots because there are a few options available:Bypass On/Off: This would bypass all plugins. If there are five plugins and two of them are already in bypass then the remaining inserts will also be bypassed. The challenge here is that if you run this script again then ALL of the plugins will be un-bypassed.
Toggle Bypass: This would toggle the bypass state of each plugin. As above, if two plugins are already bypassed then those two would be un-bypassed and the others will be bypassed. Running the script a second time would invert the bypass state of all plugins. Not too useful.
Toggle Inactive / Active: This would probably be the better but not 'perfect' option. This would make all of the plugins inactive. The benefit here is that the bypass state of the plugins isn't changed so when they are made active again the bypass states of all the plugins. The tradeoff here is that changing the active / inactive state of a plugin is slower than bypassing.
Thoughts?
- Ddex green @dex_green
Yeah man,
The idea would be to make the plugs on the master bus inacvtive (toggle/inactive)..... for when you gotta throw that last tambourine overdub on a final mix and you are on an apollo, ha
Chris Shaw @Chris_Shaw2021-02-23 21:52:29.800Z2021-09-14 07:43:46.667Z
This Should do it. It will toggle the active state on all plugins on selected the selected track(s).
sf.ui.proTools.appActivate(); sf.ui.proTools.mainWindow.invalidate(); // Get selected track names var selectedTracksNames = sf.ui.proTools.selectedTrackNames; // Loop trough each selected track for (var i = 0; i < selectedTracksNames.length; i++) { sf.ui.proTools.trackSelectByName({ names: [selectedTracksNames[i]], }); // Toggle sends active state for (var x = 0; x < 10; x++) { if (sf.ui.proTools.selectedTrack.insertButtons[x].value.invalidate().value != "unassigned") { sf.ui.proTools.selectedTrack.trackInsertToggleActive({ insertNumber: x + 1, }); } else { continue; } } } // reselect original tracks sf.ui.proTools.trackSelectByName({ names: selectedTracksNames, });
Keep in mind, if one of the plugins is already inactive it will be made active. But it should work otherwise.
- Ddex green @dex_green
You rule Chris!
thank you kind sir
- In reply toChris_Shaw⬆:AArmand Hirsch @Armand_Hirsch
Is there a simple mod to this that will select track by specified name as opposed to selected track? Like for this master bus application, without having to scroll over to that track within the session. I attempted to tweak the code here for a while but came up empty. Thanks so much!!!
Chris Shaw @Chris_Shaw2021-10-27 00:29:30.305Z2021-10-27 15:34:31.767Z
This should do it.
Just replace theconst choiceFader
name/string with your desired track.
I added a function to scroll to your choice track and then back to the first selected track in the session before triggering the script.sf.ui.proTools.appActivate(); sf.ui.proTools.mainWindow.invalidate(); const choiceFader = ["---Master---"]; function scrollToTrackNamed(trackList) { // Open scroll to track dialog and enter track name sf.ui.proTools.menuClick({ menuPath: ['Track', 'Scroll to Track...'] }); var confirmationDialogWin = sf.ui.proTools.confirmationDialog; confirmationDialogWin.elementWaitFor(); confirmationDialogWin.textFields.first.elementSetTextFieldWithAreaValue({ value: trackList[0] }); confirmationDialogWin.buttons.whoseTitle.is('OK').first.elementClick(); confirmationDialogWin.elementWaitFor({ waitType: 'Disappear' }); //Re-select originally selected tracks sf.ui.proTools.trackSelectByName({ names: trackList }) }; // Get selected track names to reselect later var origSelectedTracks = sf.ui.proTools.selectedTrackNames; //scroll to choice fader scrollToTrackNamed(choiceFader); // Toggle inserts active state for (var x = 0; x < 10; x++) { if (sf.ui.proTools.selectedTrack.insertButtons[x].value.invalidate().value != "unassigned") { sf.ui.proTools.selectedTrack.trackInsertToggleActive({ insertNumber: x + 1, }); } }; // If tracks were selected at start of script, reselect them if (origSelectedTracks.length >= 1) { // reselect original tracks sf.ui.proTools.trackSelectByName({ names: origSelectedTracks, }); // scroll to first selected track scrollToTrackNamed(origSelectedTracks) };
- In reply toChris_Shaw⬆:
Ben Rubin @Ben_Rubin
Hey @Chris_Shaw, thanks for this great script. Wondering if its possible to add some error catching so if the script catches a plugin that is no longer loaded into PT, it will keep going. Telling me the name of the missing plugin would be a nice bonus. Thanks much.
- ZIn reply todex_green⬆:Zach McNees @Zach_McNees
Hey @Chris_Shaw ! Looking for a way to just deactivate the Insight 2 level meter plugin which is the final insert on my Master Fader, in slot B always. Basically just a one click to deactivate, and reactivate maybe as a second script.