How to Sort Tracks by Title in "Letters-Numbers-Symbols" order
1. Create a virtual tag with the following formula.
$If($IsMatch(<Title>,"^[a-zA-Z]")="T",1<Title>,$If($IsMatch(<Title>,"^[0-9]")="T",2<Title>,3<Title>))
2. You can either create a custom sorting set using that virtual tag and sort by that field or just add the virtual tag to the main panel and sort by it. Also you can create the same sorting virtual tags for <Artist> and <Album> if you just replace <Title> with those fields using the formula above.
3. To use "ignore words" option, replace "<field>" with "$Sort(<field>)". So for "<Title>", use "$Sort(<Title>)" instead.
Note: Originally posted here (https://getmusicbee.com/forum/index.php?topic=22386.msg131589#msg131589)
How to Extract All <Featuring Artist> from Title
The following virtual tag returns all featuring artists specified in title.
$RxReplace($RSplit($Split(<Title>,feat.,2),")",2),",|\s&",";")
Song Title
=> returns nothing
Song Title (feat. BBB)
=> BBB
Song Title (feat. BBB & CCC)
=> BBB; CCC
Song Title (feat. BBB, CCC & DDD)
=> BBB; CCC; DDD
Song Title (feat. BBB, CCC, DDD & EEE)
=> BBB; CCC; DDD; EEE
If you want, you can copy this virtual tag value to <Artists: Guest> field, using "Copy guest artists from <tag 1>" preset with Additional Tagging Tools plugin.
More Informative Track Properties Display
Track information panel has an option to show track properties for playing/selected track. Very useful but it has some limitations. I have lots of ALAC files but it only shows them as "m4a", which is not quite helpful if you also have lots of AAC files that are using the same MPEG-4 container format. Another info that I'd like to see is whether it's a file with a cue sheet.
So now I am using the following formula for the track info panel in place of the in-built track properties option.
$IsNull(<FileCueSheet>,$Replace($Split(<Kind>," ",1),MPEG,MP3),$Replace($Split(<Kind>," ",1),MPEG,MP3)" (cue)") <Bitrate> / <Sample Rate> (<Channels>)
(https://i.imgur.com/GHyn7Ih.png)
How to Display and Sort Tracks by Clipping Gain
If you run volume analysis, it can optionally show in its result window which tracks will clip when the current ReplayGain values are applied and how much gain reduction is required to avoid clipping. The problem is there's no way to save or export those figures. Thanks to Additional Tagging Tools plugin's support for various math functions, now it's possible to instantly display those figures as a virtual tag and you can sort tracks by it (or save it as a custom tag to files) to find out which tracks will likely to clip while playing with ReplayGain on.
(https://i.imgur.com/K4ff6Pl.png)
Needless to say, this assumes you have already run volume analysis on your tracks. Without existing ReplayGain tags, these virtual tags won't work at all.
First, you need to map album peak and track peak tag to custom tags to access their values as MB doesn't support this natively.
Go to Preferences> Tags (1)> Define new tags and enter the following in identifier box and press tab to populate it in other boxes.
(https://i.imgur.com/yVN8ldV.png)
Save and close the dialog and return to Tags (1) panel.
In custom tags configuration setting, create two custom tags "Album Peak" and "Track Peak" and select the pre-defined tag code REPLAYGAIN_ALBUM_PEAK and REPLAYGAIN_TRACK_PEAK using dropdown button.
(https://i.imgur.com/tPHvJ62.png)
Save the dialog, now you will see MB rescans all files in your library. When it's done, confirm Album Peak and Track Peak tags are properly mapped by adding those columns to the main panel.
Now you need to define two virtual tags that will show the clipping gain. As stated earlier, these virtual tags require latest version (2018-02-03 or later) of Additional Tagging Tools plugin (https://getmusicbee.com/addons/plugins/49/additional-tagging-and-reporting-tools/) installed and enabled. Without the plugin, this won't work.
Clip (album)
$IsNull(<Album Peak>,,$If($Add($Mul(20,$Lg(<Album Peak>)),$Split(<Album Gain>," ",1))<0.00,,$Round($Add($Mul(20,$Lg(<Album Peak>)),$Split(<Album Gain>," ",1)),2)))
Clip (track)
$IsNull(<Track Peak>,,$If($Add($Mul(20,$Lg(<Track Peak>)),$Split(<Track Gain>," ",1))<0.00,,$Round($Add($Mul(20,$Lg(<Track Peak>)),$Split(<Track Gain>," ",1)),2)))
Now you can sort albums/tracks by the clipping gain and identify tracks that would most likely to clip while playing. This will allow you to test which tracks are most audibly clip and what means are mostly effective to avoid clipping.
How to Bulk-adjust Target Loudness Level of RG tags without Re-analyzing Tracks
When you want to adjust target loudness level of existing ReplayGain tags, you don't have to re-analyze tracks using the slider, which will take considerable amount of time. Instead you could create a virtual tag that shows the adjusted values and then bulk copy them to the existing ReplayGain tags.
These virtual tags require latest version (2018-02-03 or later) of Additional Tagging Tools plugin (https://getmusicbee.com/addons/plugins/49/additional-tagging-and-reporting-tools/) installed and enabled.
For instance, if you want to lower 7 dB for all your ReplayGain tags then use the following virtual tags, which will have the exactly same effect as re-analyzing tracks using the slider:
New Album Gain
$IsNull(<Album Gain>,,$Sub($Split(<Album Gain>," ",1),7)" dB")
New Track Gain
$IsNull(<Track Gain>,,$Sub($Split(<Track Gain>," ",1),7)" dB")
Then you can use "copy tag" command of Additional Tagging Tools plugin to bulk copy the virtual tags to the RG tags.
(Personally I don't take this approach to tackle the clipping issue but it seems many people prefer this way)
Note on sorting of negative numbers in virtual tags:
To sort negative numbers correctly in virtual tags, you need to change the virtual tag's type to "number" in configure fields setting. But if the numbers are appended by some characters (like "dB" in this case), they won't sort correctly even if it's set to numeral type. If you really want to sort them correctly then create another virtual tag just for sorting purpose without appending any characters to the number.
Play count per 100 days
A highest play count doesn't necessarily mean that you liked the song most in your library. You also need to take into account how many days each track has stayed in your library since tracks you had imported earlier are likely to have played more times than recently imported ones.
Now you can calculate this kind of figures if you install latest version (2018-02-15 or later) of Additional Tagging Tools plugin.
Create a virtual tag with the following formula:
Play count per 100 days
$Round($Mul($Div(<Play Count>,$NumberOfDays($Now(),<Date Added>)),100),1)
The reason it's using per 100 days rather than per day is simply to avoid small numbers. If you have rather big (or small) play counts, adjust the formula accordingly. To sort the field correctly, you need to change the virtual field's type to "Number" in Configure Fields setting.
I can show "Last played was NNN days ago" now?
Yes, use this:
$If(<Last Played>="Unknown",,$RoundDown($NumberOfDays(<Last Played>),0))
I'll ask boroda74 to return integers with the $NumberOfDays function, then you could remove $RoundDown part (I'll edit the formula if it's fixed).
And if you have further questions, please use Questions forum.
--------
<edit>
$If(<Last Played>="Unknown",,$NumberOfDays($Now(),<Last Played>))
How to find albums with the same value for both album gain and track gain
Sometimes you forget to re-run volume analysis for a single FLAC (or APE) file album after splitting them to individual tracks. Then the album gets left with the same album/track gain for every track in it. Because they already have the both RG tags, they get excluded even if you select the entire library (unless you tick the tickbox again for all selected tracks to re-run it for every selected album).
Create a virtual tag with the following formula:
$IsNull(<Album Gain><Track Gain>,,$If($Split(<Album Gain>," ",1)=$Split(<Track Gain>," ",1),$Split(<Album Gain>," ",1),))
And use "that virtual tag" "has a value" rule for either an auto-playlist or highlighting rule.
Then it will show all tracks that have the exactly same value for both album and track gain. Some tracks could have the same values at random. So ignore such a single track in an album and try to find albums with full of such tracks.
And this code is for locating tracks with no RG tags or with track gain tags only:
$IsNull(<Album Gain>,$IsNull(<Track Gain>,,T),T+A)
For this tag, if you use "that virtual tag" "has no value" rule, it will show tracks with no RG tags.
And "that virtual tag" "is" "T" rule will list tracks with track gain tags only.
How to display the number of values tagged for a multi-value tag
I'd like to share tangotoynb's contributions: see the original thread https://getmusicbee.com/forum/index.php?topic=26688.0
This code will display the number of values tagged for a multi-value tag like Artist or Genre.
$Add($Len($RxReplace(<Artist>,"[^;]","")),1)
And note that you need to have Additional Tagging Tools plugin (http://musicbee.wikia.com/wiki/Additional_Tagging_and_Reporting_Tools#Links) installed to use those additional functions in your virtual tags.
How to Add All <Featuring Artist> to Title
This is an opposite task to a previous post "How to Extract All <Featuring Artist> from Title" (https://getmusicbee.com/forum/index.php?topic=9317.msg75544#msg75544).
When you have multiple artists tagged, the following code will generate a virtual tag that adds all featuring artists after title.
<Title>$If($First(<Artist>)=<Artists>,," (feat. "$If($Split(<Artists>,;,2)=$RSplit(<Artists>,;,1),$RSplit(<Artists>,;,1),$Replace($RxReplace(<Artists>,"^[^;]+;\s*(.*);\s*([^;]+)$","$1 & $2"),;,","))")")
e.g. multiple artists "AAA; BBB; CCC; DDD; EEE" > Song Title (feat. BBB, CCC, DDD & EEE)