How to sort Soundminer columns
Asked by @Mark_Mangini in a separate thread, but that thread was more generic/wide.
Here's a more direct approach to sorting columns in Soundminer.
This requires some manual code, since Soundminer is not using the required macOS notarization service, which causes some UI picker functions to not work as intended.
function sortSoundminerColumn({ columnName }) {
sf.ui.soundminer.appActivateMainWindow();
var column = sf.ui.soundminer.mainWindow.scrollAreas.first.tables.first.childrenByRole('AXColumn').find(c => c.getString('AXIdentifier') === columnName);
if (!column)
throw `Couldn't find Soundminer column "${columnName}"`;
column.mouseClickElement({
relativePosition: {
x: 10,
y: -10,
},
});
}
sortSoundminerColumn({
columnName: 'Description',
});
- Christian Scheuer @chrscheuer2021-04-12 07:13:16.122Z
I've now also added this as a template to the "Soundminer" package so it can be used without code :)
Mark, see this webinar for more details on how to work with templates / presets:
- In reply tochrscheuer⬆:Dustin Harris @Dustin_Harris2021-04-12 13:37:20.000Z
OH WOW. You just saved me from having to do all that preferences stuff I was working on earlier!! 😍
- MIn reply tochrscheuer⬆:Mark Mangini @Mark_Mangini
I don't have the Soundminer Factory Presets in my left column nor can I search on it. How do I get this ACTION?
- MMark Mangini @Mark_Mangini
never mind, I just downloaded it from the store. Thanks Christian!
- MIn reply tochrscheuer⬆:Mark Mangini @Mark_Mangini
Seems to be intermittent. I can trigger this command once and I get one sort. If I hit the button again, nothing happens. Sorting is a tricky thing with Soundminer depending on the state you last left it in. So, for example, I might have last left Soundminer in reverse Alpha sort. In this case, this trigger would put it in normal Alpha sort. But if I want to browse in multiple ways? Is there a way for this to continue to trigger the sort field each time I press the button that triggers this command? Currently, it won't do that.
Christian Scheuer @chrscheuer2021-04-12 17:09:26.740Z
I set this up so that it simulates a mouse click on the sort column. That will toggle between ascending, descending and no sort.
- MIn reply tochrscheuer⬆:Mark Mangini @Mark_Mangini
Also, can you make this an ACTION that is modifiable. As it happens, I want to sort on the TRACKYEAR column. Oddly, it is the only way to get SoundMiner to display results based on the "freshness" or newness of recording. Soundminer defaults to displaying files based on the date they were ingested or scanned thus insuring that the first results are the OLDEST sounds in your library. My solution has been to insure that every file in the database has a date of publication or recording in it and sorting on that to insure my returns always show the latest sounds recorded or added. I use the TRACKYEAR field for this and want to be able to sort on it. Is there any way to give us control over this command to choose the field to sort on? Thanks in advance.
- MIn reply tochrscheuer⬆:Mark Mangini @Mark_Mangini
The code posted above has the wrong X/Y coordinates but I cannot open the macro to change it. Should I remake the macro as a script from code, above, and reenter the X/Y coordinates?
Christian Scheuer @chrscheuer2021-04-18 13:05:06.681Z
Hi Mark,
You can always create a new script in SoundFlow (click "+ New" and choose "Script") and paste the above code in there and change the coordinates.
Note, that the coordinates were tested to work correctly on the newest builds of Soundminer v5Pro, so if you have a suspicion they're incorrect, it may mean that either your Soundminer setup is different from the ones we tested on, or that you're using it differently (say, trying to sort through a column that's not in view, or maybe you want it to work differently than it was designed).
Can you share a screen recording of how you're using it, and, even better, with a bug report (Script Help)?
This article + video describes how to best send us material to help you in various different scenarios:
- MIn reply tochrscheuer⬆:Mark Mangini @Mark_Mangini
How do I send you my screen capture showing how I am using it?
- MMark Mangini @Mark_Mangini
Do I post it here?
- MIn reply tochrscheuer⬆:Mark Mangini @Mark_Mangini
I have entered a FEEDBACK/HELP response to this issue using the S.F. Help tool along with my logs
- MIn reply tochrscheuer⬆:Mark Mangini @Mark_Mangini
What is the best way to send you a Screen Capture showing the issue as I am using it? This forum does not accept .mov files.
Christian Scheuer @chrscheuer2021-04-18 18:31:00.860Z
Thanks for the email and the excellent videos! Make it very easy to look at it, appreciate it.
- In reply tochrscheuer⬆:Christian Scheuer @chrscheuer2021-04-21 07:11:20.907Z
Hi Mark,
I spoke to Justin from Soundminer and he integrated a solution so we can control this from SoundFlow :)
This needs Soundminer prerelease version 5.0v687 - and version 1.1.3 of the Soundminer package in SoundFlow.
It supports setting up to 2 columns for the sort order and whether it should be ascending or descending.Here, I'm setting it to sort just by a single column, Description, in ascending (A-Z) order: