Author Topic: The Joy of...Custom Sorting (Non-Alphabetical Sorting)  (Read 1152 times)

tjinc

  • Sr. Member
  • ****
  • Posts: 822
Custom Sorting is a feature that enables tags to be sorted in an order other than their usual alphabetical sort order. This affects sorting in the main panel as well as the Thumbnail Browser, Column Browser and Library Explorer. An example usage would be to force the artist 'Big Joe Turner' to be sorted under 'J' or 'T' rather than it’s normal sorting under 'B'.

For a long time MusicBee has had this feature available for <Artist>, <Album Artist>, <Composer>, <Album> and <Title>. With the release of version 3.6.9153, this custom sorting functionality has been greatly expanded to include most tags, including custom and virtual tags.

Edit Preferences > Sorting/Grouping
Custom sorting can be enabled here using the 'enable custom sort values….' checkbox option.
 • This is a 'global' option, meaning that when enabled, all fields (that have this functionality) on all tracks in your library will be sorted by their custom sort values.
 • If no custom sort value is set then that tag value will be sorted alphabetically as usual.

The custom sort values are set by pressing the 'Edit Custom Sort Values...' button.
 • This will open the Custom Sorting dialogue window which consists of a dropdown list of available tags and a table of values.
 • In the left-hand column you should enter the actual tag value that you require to be sorted and in the right-hand column the desired custom sort value.
 • Note that setting custom sort values here does not save anything to the audio file, only to the MusicBee database (settings file).


A couple of basic examples just to whet your appetite:

Example 1: Sorting 'Various Artists' albums to the end of any Album Artist list:
If you don't like seeing your Various Artists sitting between your extensive Val Doonican and Velvet Underground collections, then try this:
Set sort value for 'Various Artists' to 'zzz Various Artists' (using zzz here to ensure it is sorted below 'ZZ Top'):



Example 2: Sorting 'Release Type' to your personal requirements:
So you have carefully tagged Release Type in a custom field for all your music (e.g. with values 'Collections', 'Compilation Albums', 'EPs', 'Live Albums', 'Singles', 'Studio Albums' etc.) but of course you want your Studio albums listed first, Live Albums second and so on:
For a predefined list of values like this you can use a simple numerical custom sort system so that they are displayed in your required order:



With both examples implemented:
(note the location of Various Artists in the Thumbnail browser and the defined order of the Release Types in the main panel)



Notes:
 • Custom sort values for <Artist>, <Album Artist> and <Composer> are all stored in the same list: 'Artist, Composer'.
 • For <Composer>, field values (in the left-hand column) must be preceded with "composer:" to identify the entry as composer rather than artist.
 • <Artist> and <Album Artist> use the same custom sort values.

  
Right-Click on Track > Edit > Sorting Tab
As in Edit Preferences > Sorting/Grouping (above), custom sorting can be enabled here using the 'enable custom sorting….' checkbox option. Again, this is a 'global' option.

The custom sort values can be set by pressing the 'Edit Custom Sort Values...' button which opens the Custom Sorting dialogue window, but this is now fixed on the 'Artist, Composer' list and will only be populated with the custom sort values of the selected track. Other than that, it works in the same way as the Edit Preferences > Sorting/Grouping method.

However, in this Sorting tab you can also set the custom sort value by directly typing into any of the 'sort as:' boxes. This will save the new custom sort value to the MusicBee database as before but will also write this value to the file in the <Sort ....> tag.
Last Edit: January 25, 2025, 10:22:38 AM by tjinc

hiccup

  • Hero Member
  • *****
  • Posts: 9107
Thanks tjinc, that's an excellent explanation/tutorial.

(also thanks for ironing out the initial issues with this new feature)

edit:
Maybe including the word 'non-alphabetical' in the title would be good? Not sure.
Last Edit: January 24, 2025, 03:42:29 PM by hiccup

karbock

  • Sr. Member
  • ****
  • Posts: 548

hiccup

  • Hero Member
  • *****
  • Posts: 9107
What about clicking the 'Update Patches' link that is in karbock's signature right before this post of yours?



edit:
In case you're wondering, this was a response to a post by Corliss Rain that was deleted shortly after.
Last Edit: January 24, 2025, 08:46:09 PM by hiccup

Corliss Rain

  • Jr. Member
  • **
  • Posts: 65
Yeah, I deleted my question because I found the patch. I installed the patch and still am only on version 9108. So confused. Must be lack of sleep.

hiccup

  • Hero Member
  • *****
  • Posts: 9107
I installed the patch and still am only on version 9108. So confused. Must be lack of sleep.
It must be that.
Both karbock's and my sig lead to the most recent version, which at this moment is 3.6.9154
Last Edit: January 24, 2025, 09:30:03 PM by hiccup

Corliss Rain

  • Jr. Member
  • **
  • Posts: 65
Figured it out. My computer was being stupid and made me delete the existing files and then move them, rather than just copying over the old files like I told it too. Because apparently it doesn't think I'm the administrator. Yeesh.

tjinc

  • Sr. Member
  • ****
  • Posts: 822
Thanks for the feedback - I thought I would get it done while it was still fresh in my mind. I just hope it will help some people find and use this cool feature.


Maybe including the word 'non-alphabetical' in the title would be good? Not sure.
I have done this - it may make it more understandable for some and better for searching generally.
Last Edit: January 25, 2025, 09:37:57 AM by tjinc

hiccup

  • Hero Member
  • *****
  • Posts: 9107
FWIW, I've setup the Custom Forum Search so that if you start typing something like 'non-alp…' or 'custom so…', it will suggest a 'starred' link that when clicked shows a link to this topic as a highlighted top result.

Last Edit: January 27, 2025, 04:50:04 PM by hiccup

lostinsound

  • Jr. Member
  • **
  • Posts: 29
Thank you for this! I'm finding that Example 2 doesn't work if you use a virtual tag instead of a custom tag for the Sub-Grouping. I sub-group using a virtual tag that's based on the release type (the Grouping tag), and it doesn't follow the custom sort order. Virtual tags in the left main panel follow the custom sorting, but the same virtual tag doesn't sort correctly with sub-grouping in the main panel.

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 34972
Thank you for this! I'm finding that Example 2 doesn't work if you use a virtual tag instead of a custom tag for the Sub-Grouping. I sub-group using a virtual tag that's based on the release type (the Grouping tag), and it doesn't follow the custom sort order. Virtual tags in the left main panel follow the custom sorting, but the same virtual tag doesn't sort correctly with sub-grouping in the main panel.
can you post a screenshot

never mind - i can reproduce using a virtual tag instead of a custom tag and now fixed in the latest v3.6 patch version
Last Edit: February 03, 2025, 07:51:41 AM by Steven

tjinc

  • Sr. Member
  • ****
  • Posts: 822
Thanks Steven - must have missed that one when testing. Virtual tag custom sorting in main panel now working.

Just noticed that virtual tags are still not respecting the custom sort values in the Library Explorer panel.

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 34972
Just noticed that virtual tags are still not respecting the custom sort values in the Library Explorer panel.
thats fixed for the next update

lostinsound

  • Jr. Member
  • **
  • Posts: 29
It's all working for me now. Thanks! I really like not having to use the zero width whitespace in my virtual tags now.