Open/Close Radium Sampler as toggle...
Wondering if someone could help me on a Soundminer script. I've got two that I'd like to combine into a toggle. It's for opening and closing the Radium sampler while also turning Re-wire on and off. Here are the two scripts...
Open Radium, turn off Re-wire...
sf.ui.soundminer.mainWindow.checkBoxes.whoseTitle.is('').allItems[2].mouseClickElement({
relativePosition: {"x":30,"y":15},
anchor: "TopLeft",
});
sf.ui.soundminer.menuClick({
menuPath: ["Window","View Sampler Window"],
});
Close Radium, turn on Re-wire...
sf.ui.soundminer.menuClick({
menuPath: ["Window","View Sampler Window"],
});
sf.ui.soundminer.mainWindow.checkBoxes.whoseTitle.is('').allItems[2].mouseClickElement({
relativePosition: {"x":30,"y":15},
anchor: "TopLeft",
});
Thanks!
J.R.
- Christian Scheuer @chrscheuer2020-05-05 18:55:14.894Z
This should check if Radium is open or not:
if (sf.ui.soundminer.windows.whoseTitle.is('Soundminer Sampler').first.exists) { //Radium is open } else { //Radium is not open }
- In reply toJ_R_Fountain⬆:Dustin Harris @Dustin_Harris
Heyyoo JR! :)
try this:
(Edit: I added another sampler window check)
function stateOne() { sf.ui.soundminer.mainWindow.checkBoxes.allItems[2].checkboxSet({ targetValue: "Disable", }) sf.ui.soundminer.menuClick({ menuPath: ["Window", "View Sampler Window"], }); } function stateTwo() { if (sf.ui.soundminer.windows.whoseTitle.is('Soundminer Sampler').first.exists) { sf.ui.soundminer.windows.whoseTitle.is('Soundminer Sampler').first.windowClose(); } sf.ui.soundminer.mainWindow.checkBoxes.allItems[2].checkboxSet({ targetValue: "Enable", }) } sf.ui.soundminer.soundminerActivateMainWindow(); if (!sf.ui.soundminer.windows.whoseTitle.is('Soundminer Sampler').first.exists) { stateOne(); } else { stateTwo(); }
- JJ.R. Fountain @J_R_Fountain
Yo Dustin! Thanks man. I actually simplified it a ton because I realized it's already a toggled menu click to open/close Radium, no need to check if it's already open or not.
I did have a second part to this which was to toggle Rewire on/off because Radium doesn't like to work with Rewire on. However I ditched it because I couldn't get a reliable mouse click (no key command for Rewire). I'm just not gonna use Rewire anymore to audition sounds, though it would be nice if I could for surround material.
Dustin Harris @Dustin_Harris
Cool... Yeah I don't use rewire so I'm not so familiar with the in and outs of it (pun very much intended).
The reason I did the checks is: two toggles that don't verify states can become unsynchronized and end up in a state where both rewire and the radium were activating/deactivating at the same time, and as a user you'd have to reset one or the other to return the functionality. The checks would do this automatically :)
-D
- JJ.R. Fountain @J_R_Fountain
re: unsyncronized toggles, that's what wasn't working for me on my original script is that they would get out of sync, so maybe I should look at your script. Can Soundflow tell whether the Rewire button is lit up or not though since it's not a checkbox per se?
Dustin Harris @Dustin_Harris
Yeah, the rewire logo seems to be a graphic button that is just a checkbox, so instead of element clicking it to toggle, I explicitly enable or disable it so it will always be set to a predictable state. :)