Hi there! :-) I'd like to select a custom preset named "SOOTHE2" in the "Plug-in" modules preset popup menu in iZotope RX 7.
I have adapted my script from the script in https://forum.soundflow.org/-850/rx-7-module-chain but I can't seem to make it work consistently.
This is what I have so far;
//Open Plug-in module if not already open.
if (!sf.ui.izotope.windows.whoseTitle.is('Plug-in').exists) {
sf.ui.izotope.menuClick({ menuPath: ['Modules', 'Plug-in', 'None'] });
}
//Set Plug-in Module Preset to default (Reset is needed due to iZotope retaining the previously selected preset name when reopening the Plug-in Module)
selectPluginModulePreset("[Default]");
//Set Plug-in Module Preset named "SOOTHE"
selectPluginModulePreset("SOOTHE2");
//Plug-in Module Preset function
function selectPluginModulePreset(name) {
var btn = sf.ui.izotope.windows.whoseTitle.is('Plug-in').first.groups.whoseDescription.is('EffectPanel Plug-In').first.groups.whoseDescription.is('EffectPanel Plug-In').first.groups.whoseDescription.is('EffectPanel Plug-In Header Background').first.popupButtons.whoseTitle.is('Presets').first;
if (btn.value.invalidate().value == name) return;
btn.elementClick();
sf.keyboard.press({ keys: 'enter' });
var triedNames = {};
while (true) {
sf.engine.checkForCancellation();
var thisName = btn.value.invalidate().value;
if (thisName == name) break;
if (triedNames[thisName]) throw 'Could not find preset: ' + name; //circled once already
triedNames[thisName] = true;
sf.keyboard.press({ keys: 'down' });
}
}
Thanks in advance! K
Linked from:
- Kitch Membery @Kitch2020-02-09 10:34:19.265Z
Never mind @chrscheuer... I took a step away from it for a while and when I tried again, I worked it out. :-)
Here is the script;
function ensurePluginWindowIsOpen() { var win = sf.ui.izotope.windows.whoseTitle.is('Plug-in').first; if (!win.exists) { sf.ui.izotope.menuClick({ menuPath: ['Modules', 'Plug-in', 'None'] }); win.elementWaitFor(); } } function selectPluginPreset(name) { var btn = sf.ui.izotope.windows.whoseTitle.is('Plug-in').first.groups.whoseDescription.is('EffectPanel Plug-In').first.groups.whoseDescription.is('EffectPanel Plug-In').first.groups.whoseDescription.is('EffectPanel Plug-In Header Background').first.popupButtons.whoseTitle.is('Presets').first; if (btn.value.invalidate().value == name) return; btn.elementClick(); sf.keyboard.press({ keys: 'enter' }); while (true) { sf.engine.checkForCancellation(); if (btn.value.invalidate().value == name) break; sf.keyboard.press({ keys: 'down' }); } } function refreshPluginPreset() { sf.ui.izotope.windows.whoseTitle.is('Plug-in').first.groups.whoseDescription.is('EffectPanel Plug-In').first.groups.whoseDescription.is('EffectPanel Plug-In').first.groups.whoseDescription.is('EffectPanel Plug-In Header Background').first.popupButtons.whoseTitle.is('Presets').first.elementClick(); sf.keyboard.press({ keys: 'return' }); } function processOpenPluginPreset() { sf.ui.izotope.windows.whoseTitle.is('Plug-in').first.groups.whoseDescription.is('EffectPanel Plug-In').first.groups.whoseDescription.is('EffectPanel Plug-In').first.groups.whoseDescription.is('EffectPanel Plug-In Footer Background').first.buttons.whoseDescription.is('Apply').first.elementClick(); } function processModuleChain(name) { sf.ui.izotope.invalidate(); sf.ui.izotope.appActivateMainWindow(); ensurePluginWindowIsOpen(); refreshPluginPreset(); selectPluginPreset(name); processOpenPluginPreset(); } //Change [Default] to preset name processModuleChain('[Default]');
Christian Scheuer @chrscheuer2020-02-09 22:58:28.752Z
Cool @Kitch
Is "Plug-in" here meant as a placeholder for the actual plugin name?Christian Scheuer @chrscheuer2020-02-09 22:58:55.851Z
Ah of course, never mind. Of course it's the actual module called "Plug-in".. haha
- AIn reply toKitch⬆:Albert Romero @Albert_Romero
How would I modify this to just select Presets in Spectral Repair?
Kitch Membery @Kitch2022-09-05 19:14:18.917Z
Hi @Albert_Romero,
This should do the trick. Just set the module name and the preset :-)
const moduleName = "Spectral Repair" const presetName = "Search for similar event"; function setupRestore(callback) { const izotope = sf.ui.izotope; const isModuleOpen = izotope.getMenuItem("Modules", moduleName + "...").isMenuChecked; try { setModuleOpen({ moduleName, targetValue: "Enable", }); callback(); } catch (err) { } finally { if (!isModuleOpen) { setModuleOpen({ moduleName, targetValue: "Disable", }); } } } function setModuleOpen({ moduleName, targetValue }) { const izotope = sf.ui.izotope; izotope.appActivateMainWindow(); izotope.menuClick({ menuPath: ["Modules", moduleName + "..."], targetValue, }); } function openPresetIzotope({ moduleName, presetName }) { const izotope = sf.ui.izotope; const moduleWindow = izotope.windows.getByTitle(moduleName); const effectsPannelName = "EffectPanel " + moduleName; const effectsPannelGroup = moduleWindow.getFirstWithDescription(effectsPannelName); const effectsPannel = effectsPannelGroup.getFirstWithDescription(effectsPannelName); const effectsPannelHeader = effectsPannel.getFirstWithDescription(effectsPannelName + " Header Background"); const presetsButton = effectsPannelHeader.popupButtons.getByTitle("Presets"); const modulePresetManager = sf.ui.izotope.windows.whoseTitle.is(moduleName + " Preset Manager Popup").first; const modulePresetsScrollView = modulePresetManager.groups.whoseDescription.is("Popup Scroll View").first; const preset = modulePresetsScrollView.buttons.getByTitle(presetName); izotope.appActivateMainWindow(); presetsButton.elementClick(); modulePresetManager.elementWaitFor(); preset.elementClick(); } function main() { setupRestore(() => { openPresetIzotope({ moduleName, presetName }); }); } main();
I hope that helps :-)
- AAlbert Romero @Albert_Romero
Hey Kitch! Thanks for hooking me up. This works flawless
Kitch Membery @Kitch2022-09-10 18:35:02.391Z
You're welcome, @Albert_Romero! :-)
- AAlbert Romero @Albert_Romero
Hi Kitch!
I upgraded to RX 10 advanced and now this badass script you wrote me doesn't work anymore....Any thoughts or help? Appreciate it!
Brenden @nednednerb
Currently, I am having some issues with RX10, as are several others. I've seen some advice about re-building macros, and I've seen some advice regarding iZotope having re-mapped UI elements and changed how they are presenting the information that is accessible to SoundFlow. My suspicion is that things will be sorted out eventually, but the takeaway is that RX has been updated, and many users are having new issues with 10.2 and + so far. Hopefully, things will be resolved soon. It's so slow to have to do some things manually for a few days! Hah!
- In reply toAlbert_Romero⬆:
Kitch Membery @Kitch2022-12-13 02:15:45.413Z
Hi @Albert_Romero,
It seems iZotope RX 10 has changed the way its UI elements are reported to macOS.
Due to this, I'm unable to restore the script to its former glory.
We are aware of an issue with the UI picker not being able to see items inside iZotope RX 10.2+ automatically - this is a separate issue that makes re-making those macros according to the new layout, somewhat more difficult. Hopefully, I'll have better luck fixing the script once this issue has been resolved. (SF-712)
Brenden @nednednerb
Hey there Kitch,
Have things stabilized in RX enough to fix this script? I searched the forum and came to this post because I still want a button to change my RX module presets.
I want to put a bunch of presets I commonly use on a deck, by varying this script per module and preset. The script as currently posted above appears to do nothing when I run it, except for activating the RX window.
Kitch Membery @Kitch2023-01-19 23:11:51.866Z
Hi @nednednerb,
I've not taken another look since my last reply to this thread but I'll certainly do so when I get a moment.
Brenden @nednednerb
Hey Kitch. It's totally not a priority. I just discovered the ability I did not know of in RX to use the module Preset menu to set a custom shortcut which runs the module process based on a preset. Then, it was super easy to assign that single keypress assigned in RX as the basis of the entire script in order to trigger the keypress. Literally all that code in one keypress.
There is still no easy option just to select a preset with the above code, so it could still be useful... but the solution I found is actually smoother and even more direct. Can make a selection, tap the deck button, it runs the key command assigned to processing the module with the desired preset.
- AIn reply toKitch⬆:Albert Romero @Albert_Romero
Hey Kitch!
Any workaround for choosing between presets on Spectral Repair in RX 10?
Daniel Perez @daniel_perez
- In reply toAlbert_Romero⬆:
Daniel Perez @daniel_perez
Chad Wahlbrink @Chad2023-07-20 13:58:36.291Z2023-07-20 14:31:32.134Z
@Albert_Romero, @daniel_perez. I've updated the script for RX 10 below:
const moduleName = "Spectral Repair"; const presetName = "[Default]"; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// let modules = { 'Spectral Repair':'Spectral Repair', 'De-click':'Declick', 'Mouth De-click' : 'MouthDeclick', "Spectral De-noise": "Spectral Denoise", "Voice De-noise": "Dialogue Denoise", "De-hum" : "Remove Hum", "De-plosive": 'DePlosive', "De-clip": "Declip", } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // ↓ Use the "Pick" button to select a preset menu on a module to set up the lookup table. // sf.ui.izotope.windows.whoseTitle.is("De-plosive").first.groups.whoseDescription.is("EffectPanel DePlosive").first.groups.whoseDescription.is("EffectPanel DePlosive Header Background").first.popupButtons.whoseTitle.is("Presets").first // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function setupRestore(callback) { const izotope = sf.ui.izotope; const isModuleOpen = izotope.getMenuItem("Modules", moduleName + "...").isMenuChecked; try { setModuleOpen({ moduleName, targetValue: "Enable", }); callback(); } catch (err) { } finally { if (!isModuleOpen) { setModuleOpen({ moduleName, targetValue: "Disable", }); } } } function setModuleOpen({ moduleName, targetValue }) { const izotope = sf.ui.izotope; izotope.appActivateMainWindow(); izotope.menuClick({ menuPath: ["Modules", moduleName + "..."], targetValue, }); } function openPresetIzotope({ moduleName, presetName }) { // activate and invalidate iZotope RX const izotopeRX = sf.ui.izotope; izotopeRX.appActivate({ onError: "Continue" }); izotopeRX.invalidate(); // Define parameters for the module const moduleWindow = izotopeRX.windows.whoseTitle.is(moduleName).first; // Set Default Preset moduleWindow.groups.whoseDescription.is("EffectPanel " + modules[moduleName]).first.groups.whoseDescription.is("EffectPanel " + modules[moduleName] + " Header Background").first.popupButtons.whoseTitle.is("Presets").first.elementSetTextAreaValue({ value: presetName }); izotopeRX.invalidate(); } function main() { setupRestore(() => { openPresetIzotope({ moduleName, presetName }); }); } main();
Chad Wahlbrink @Chad2023-07-20 14:02:07.081Z2023-07-20 14:43:42.018Z
Note that this method requires using a "lookup table" for the modules.
let modules = { 'Spectral Repair':'Spectral Repair', 'De-click':'Declick', 'Mouth De-click' : 'MouthDeclick', "Spectral De-noise": "Spectral Denoise", "Voice De-noise": "Dialogue Denoise", "De-hum" : "Remove Hum", "De-plosive": 'DePlosive', "De-clip": "Declip", }
This is because some of the UI elements are named differently under the hood than what is shown to the user. ("De-hum" is referred to as "Remove Hum", etc. If you need to add modules to this lookup table, please use the "pick" button from SoundFlow's Script Editor to select the "preset menu" of whatever module you need.
Then use this info for adding a line to the lookup table:
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // ↓ Use the "Pick" button to select a preset menu on a module to set up the lookup table. // sf.ui.izotope.windows.whoseTitle.is("De-plosive").first.groups.whoseDescription.is("EffectPanel DePlosive").first.groups.whoseDescription.is("EffectPanel DePlosive Header Background").first.popupButtons.whoseTitle.is("Presets").first // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- In reply toKitch⬆:Daniel Perez @daniel_perez
thank you. i'm not smart enough though. can you make the script copy paste ready for spectral repair? i dont understand where i have to make the modification.
@chadwahlbrinkChad Wahlbrink @Chad2023-07-20 14:29:20.759Z
Hey @daniel_perez,
The script from the first reply can be copied and pasted to a new script in SoundFlow.
Select Plug-in module preset in iZotope RX #post-18
Just modify the first two lines to change the module or presets.
const moduleName = "Spectral Repair"; const presetName = "[Default]";
- In reply toKitch⬆:Daniel Perez @daniel_perez
oh man you saved my life! thank YOU Sir.
- In reply toKitch⬆:Chad Wahlbrink @Chad2023-07-21 16:36:30.421Z
Also, I wanted to note, in SoundFlow 5.4 in beyond, there are a lot of great commands for dealing with Modules and Presets in the Official iZotope RX Package.
Check out the "Search Presets in Current Module" Command within the Current Module Package of the Official iZotope RX Package. - In reply toKitch⬆:Chad Wahlbrink @Chad2023-07-21 16:37:36.459Z
Also, check out the "Search RX Modules" Command within the Modules Package of the Official iZotope RX Package.
- TIn reply toKitch⬆:Theo Aronson @Theo_Aronson
Hey Chad - old thread here, but trying the Search Presets in Current Module command and getting stuck at the selection menu ... how do you then program it to type in your preferred preset and select it? Which command would I use to actually execute that preset selection?