SoundMiner v6
Just updated to v6 and none of my SoundFlow Macros work. Is there a package that has some remade macros for basics like TRANSFER, EMBED, WORKFLOWS etc? I have 24 macros that no longer work and cannot remember for the life of me how to re-program them.
- Kitch Membery @Kitch2023-07-11 23:24:22.040Z
Hi Mark,
The reference to the SoundFminer app may have changed. I'll take a look shortly.
- MMark Mangini @Mark_Mangini
Thanks Kitch. I may need some help with this.
- In reply toMark_Mangini⬆:Kitch Membery @Kitch2023-07-11 23:51:23.303Z
Hi @Mark_Mangini,
Are the commands that are failing from packages that you've downloaded from the SoundFlow store? or are they commands that reside in the "My Packages" folder of your account?
I'm able to help you with any that are not working that reside in the "My Packages" folder, but any that are from the SoundFlow store will need to be updated by whoever published the package that the failing command resides in.
Let me know :-)
- MMark Mangini @Mark_Mangini
These are macros I made.
Kitch Membery @Kitch2023-07-12 00:02:18.361Z
What are the names of a few of them and I'll take a look. :-)
- MMark Mangini @Mark_Mangini
EDIT META DATA, EMBED, WORKFLOW, RUN, SHOW SPOTTING, PREFERENCES, SET TRANSFER PATH...and many others
Kitch Membery @Kitch2023-07-12 00:24:27.454Z
Hi Mark,
I've sent you an email. :-)
- MMark Mangini @Mark_Mangini
Thanks. Haven't received yet.
- MIn reply toMark_Mangini⬆:Martin Pavey @Martin_Pavey
I found this too.
A lot of commands were changed in SM6.
Menu items changed and re-named, GUI is different in places.
It took me a while to re-work them.
On the plus side there are many great new options.- MMark Mangini @Mark_Mangini
Of course. I should have expected that. The addition of the HOT KEYS helps solve some of the issues. However, some nested menu items WORKFLOW presets cannot be gotten to reliably.
- OOwen Granich-Young @Owen_Granich_Young
A LOT of the default sf.ui.soundminer.XXXX are broken with v6. I've been rebuilding the ones I use all the time manually although I've had Hit or Miss success with them, for example, have not been able to recreate the .soundminerRadiumGotoSlot
- MMartin Pavey @Martin_Pavey
Yes. the SM Gui is nowhere near as robust as Pro Tools for instance.
I have a shortcut which tries to switch from the Metadata to the Spotting window and it's just seemingly
random whether it works or not, even though Soundflow can see those buttons as blocks in the GUI.
Toggle Radium is also broken since V6.
Maybe we need to ask Justin to see if he can adjust a few things and make the GUI a bit more accessible?- OOwen Granich-Young @Owen_Granich_Young
Martin, @Kitch helped me identify different windows in SM6 in a Zoom session, as the 'picker' just sees every window as .mainWindow
const sM = sf.ui.app("com.soundminer.v6") const raidWin = sM.windows.whoseTitle.startsWith('Radium - ').first const mainWin = sM.windows.whoseTitle.startsWith('Soundminer Pro - ').first
This sort of naming seems to help identify Different sm6 windows... not sure if replacing with Workflow will work, i was trying to access the workflow Popup menu this morning, and finally went back to real job instead :P
I did manage to fix my spot to daw while in protools, which was one I didn't realize how much I used until it broke :)
const sM = sf.ui.app("com.soundminer.v6") const mainWin = sM.windows.whoseTitle.startsWith('Soundminer Pro - ').first sM.mainWindow.invalidate(); sM.appActivateMainWindow(); mainWin.elementRaise(); sM.mainWindow.groups.first.buttons.whoseTitle.is("Spot to DAW").first.elementClick();
- MMartin Pavey @Martin_Pavey
Thanks Owen!
That will definitely fix my Radium/SM toggle.
As to getting to different areas of the main Soundminer window, if you find a way please let me know.
Cheers
Martin- OOwen Granich-Young @Owen_Granich_Young
Here's a fun one that works MOST of the time. Set search path in Line 1 or template if you have multiple radium folders
Search your Radium Presets
const searchPath = ///SET YOUR SEARCH PATH HERE something like `/Users/ocdsound/Library/Application Support/SoundminerV5/Radium` const sM = sf.ui.app("com.soundminer.v6") const raidWin = sM.windows.whoseTitle.startsWith('Radium - ').first const radiumMenu = sM.windows.whoseTitle.is("menu").first.children.whoseRole.is("AXWindow").whoseTitle.is("Soundminer").first const patchLoadWindow = sM.windows.whoseTitle.is("Please choose a preset").first.splitGroups.first //Search Radium Patchs function radiumPatchSearch() { var radiumFileCandidates = sf.file.directoryGetFiles({ path: searchPath, isRecursive: true, }).paths.filter(p => p.match(/\.(Radium|ra88)$/i) && !p.includes("Autosave")) var selectedPath = sf.interaction.popupSearch({ items: radiumFileCandidates.map(p => ({ name: p.replace(searchPath, '').substring(1), path: p, })), }).item.path; return selectedPath; } /// NAVIGATE TO PATH /** * @param {string} path */ function navigateToInDialog(path) { //Get a reference to the focused window in the frontmost app: var win = sf.ui.frontmostApp.focusedWindow; //Open the Go to... sheet sf.keyboard.type({ text: '/' }); //Wait for the sheet to appear var sheet = win.sheets.first.elementWaitFor({ timeout: 500 }, 'Could not find "Go to" sheet in the Save/Open dialog').element; //It's a combo box on older OS'es, from 12.something it's a text field if (sheet.comboBoxes.first.exists) { sheet.comboBoxes.first.value.value = path; //Press OK sheet.buttons.whoseTitle.is('Go').first.elementClick({}, 'Could not click "Go"'); } else { //Newer OS. //TextField with AXConfirm var textField = sheet.textFields.first; if (!textField.exists) throw `Can't find text field`; textField.value.value = path; sheet.elementRaise(); textField.mouseClickElement({ relativePosition: { x: 5, y: 5 }, }); sf.keyboard.press({ keys: 'return' }); } //Wait for sheet to close win.sheets.first.elementWaitFor({ waitForNoElement: true, timeout: 2500 }, '"Go to" sheet didn\'t close in time'); } /// Load your Patch /** * @param {string} selectedPatch */ function loadRadiumPatch(selectedPatch) { raidWin.groups.first.menuItems.whoseTitle.is("File").first.elementClick(); radiumMenu.menuItems.whoseTitle.is("Open Patch / Preset").first.elementClick(); patchLoadWindow.elementWaitFor(); navigateToInDialog(selectedPatch) sM.windows.whoseTitle.is("Please choose a preset").first.buttons.whoseTitle.is("Open").first.elementClick() } function main() { sM.mainWindow.invalidate(); sM.appActivateMainWindow(); let patchToLoad = radiumPatchSearch(); sM.appActivateMainWindow(); if (!raidWin.exists) { sM.menuClick({ menuPath: ["View", "Toggle Radium"], }); } raidWin.elementWaitFor(); loadRadiumPatch(patchToLoad); } main();
- MMartin Pavey @Martin_Pavey
Wow! Thanks Owen, I'll give that one a try.
Here's a script that opens the Workflows popup.
I found you had to adjust the x/y co-ordinates for all the gui calls in SM6.sf.ui.app("com.soundminer.v6").mainWindow.groups.first.buttons.whoseTitle.is("Workflows").first.mouseClickElement({ relativePosition: {"x":3,"y":3}, });
- OOwen Granich-Young @Owen_Granich_Young
Hmmm doesn't seem like Soundflow can read the workflows popupmenu though... I know Justin has a lot of stuff Apple Scriptable, maybe we have to call apple scripts in SF for these to work.
This is the template from @chrscheuer SoundMiner package that works for SM5, deff doing some Apple script stuff (which I know NOTHING about)
const { presetName } = event.props; function runSoundminerWorkflowPreset({ presetName }) { try { sf.system.execAppleScript({ script: `tell application "Soundminer v5Pro" «event SNDMwfex» "${presetName}" end tell`, }); } catch (err) { throw `Couldn't run workflow preset "${presetName}"`; } } runSoundminerWorkflowPreset({ presetName, });
Wonder how easy/hard it would be to adjust. Personally I'd rather a prompt search version than a button for any preset.
- OOwen Granich-Young @Owen_Granich_Young
Here's a stable 'search and execute' version, but I'd love to find a way that instead it opens workflow selects your desired preset and stops. Not Executes.
/** * @param {array} item */ function prompt(item) { let ptMenuAllPrompt = sf.interaction.popupSearch({ items: item.map(x => ({ name: x })) }).item.name return ptMenuAllPrompt } // Array of Menu Items const menuItems = sf.ui.app('com.soundminer.v6').getMenuItem("Edit","Execute Workflow").children.first.children.map(c => c.title.value).filter(x => x) // Choose Menu Item const workflowList = prompt(menuItems) sf.ui.app('com.soundminer.v6').menuClick({ menuPath: ["Edit","Execute Workflow",workflowList], });
- OOwen Granich-Young @Owen_Granich_Young
And thanks to Kai Paquin over at the Field recorder slack here's an idea for a FIXED PRESET load only...
////SET PRESET NAME HERE //// const presetName = 'General' //////////////////////////// // Define SM and Workflow Window const sM = sf.ui.app("com.soundminer.v6") const workflowWindow = sM.windows.whoseTitle.startsWith('Workflow').first function main() { //Activeate and Invalidate SM sM.appActivate(); sM.invalidate(); //Wait Incase you're not IN SM (can be removed) sf.wait({ intervalMs: 200, }); //Check if workflow Window is open, if not Open it if (!workflowWindow.exists) { sM.menuClick({ menuPath: [`View`, `Metadata Workflows`], }); } // Wait for workflow Window workflowWindow.elementWaitFor(); // Click Find Button in workflow workflowWindow.buttons.whoseTitle.is("Find").first.mouseClickElement({ relativePosition: { "x": 3, "y": 3 }, }); // Wait for Find Bar to appear sf.ui.app("com.soundminer.v6").mainWindow.groups.allItems[3].elementWaitFor(); //Send Find bar text field sf.ui.app("com.soundminer.v6").mainWindow.groups.allItems[5].elementSetTextFieldWithAreaValue({ value: presetName, }); //Press Enter to Load Preset sf.keyboard.press({ keys: "return", }); } main();
- MMark Mangini @Mark_Mangini
Thanks Owen. These work great!
- OOwen Granich-Young @Owen_Granich_Young
Went ahead and posted the Work in Progress SM6 package if people find them useful.
Christian Scheuer @chrscheuer2023-07-14 10:21:17.144Z
Nice work! I'll talk to Justin and we'll look into what we can do to add more official support for SMv6.