This "first-name last-name" dilemma inspired me to spend a few days scratching my head for a solution.
So I created a solution for myself...
I should firstly state that this solution relates to "Columns UI" with "NG Playlist (which is what I use).
To keep this posting as brief as possible, I have tried to make the two attachments below as informative as possible; they should be self-explanatory.
Basically, all you need to do is have a good long look at the screenshot (to which I have added detailed comments in yellow),
and then copy and paste the text/code below to your desktop (to which I have added further detailed instructions and comments).
Description:
This solution allows you to keep the names in your "Artist" tag in the standard way (ie, "first-name" last-name")
AND ALSO allows you to sort the items in in your Playlist Viewer in a different way (ie, "last-name first-name").
It is achieved by creating a string in the "Comment" tag and we manipulate this string as if it is another tag (ie, pseudo-tag).
With title-formatting scripting and layout editing tricks we can create multiple identities for any given name class.
This trick also has the secondary benefit in that you can retrieve standard tag infos from online databases
and they have no effect on your Display Preferences (as long as you make sure to NOT UPDATE the "Comment" tag).
Screenshot: fb2kcustomcolumn.png
Instructions: fb2kcustomcolumn.txt//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//// ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
/// | File->Preferences->Display->Columns UI->Playlist view->Columns --> IDX
/// |
/// | This is the 1st column (ie, placed before the "Track number" column).
/// | I do not show "Artist" or "Album" in "Columns" ; they are displayed in the "Grouping".
/// |
/// | This is a special column for sorting my playlist items by <IDX> tag, rather than the
/// | "Artist" tag. Reasoning is I can keep 'natural' naming style (first-name last-name)
/// | in "Artist" tag for Grouping display, and sort the Playlist display by <IDX> style (last-name first-name).
/// |
/// | The <IDX> tag is a string placed in the "COMMENT" tag,
/// | Here is an example of the difference between "IDX" and "Artist" tag:
/// |
/// | "Artist" Tag is : Wilhelm Furtwangler . Bayreuth Festival Orch & Choir
/// | "IDX" Tag is : <IDX>Furtwangler Wilhelm . Bayreuth Festival Orch & Choir</IDX/>
/// |
/// | My "IDX" Naming Rules:
/// |
/// | [1] Always create an "IDX" tag, even if it is same as "Artist" tag
/// | [2] Only 1st value is changed (if there are multiple values in tag).
/// | [2] When changing 1st value, do not use commas between last-name and first-name (see example above).
/// | [3] If multiple values are in tag, split them by "space dot space"
/// |
/// | examples:
/// | YES = Pop Iggy . Bob Dylan // good; only 1st value is changed
/// | NO = Pop Iggy . Dylan Bob // wrong; 2nd value is reversed too
/// | NO = Pop, Iggy . Bob Dylan // wrong; 1st value has comma
/// |
/// | [*] Further clarification...
/// | I am trying to have the same name for "Artist" tag and "IDX" tag
/// | EXCEPT for the 1st value, which is name reversed (if necessary).
/// | The name values are split by "space dot space" which is what I prefer,
/// | which is different to "semicolon space" as used in foobar2000 defaults.
/// ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ///
/// | CONFIGURATION | ///
/// ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ///
////////////////////////////////////////////////////////////////////////////////
NOTE: This config is for "Columns UI" with "NG Playlist"
// ______________________________________________________________________________
// Options (subtab)
// ______________________________________________________________________________
Show column : check
Title : IDX
Width : 35
Size : 1
Alignment : Left
Linked meta field : empty
Playlist : Show on all playlists
// ______________________________________________________________________________
// Scripts (subtab)
// ______________________________________________________________________________
Use custom sort script : check
Use custom style script : check
Display (script):
-----------------------------------------------
$rgb(204,0,204)$left($substr(%comment%,$add($strstr(%comment%,<IDX>),$len(<IDX>)),$sub($strstr(%comment%,</IDX/>),1)),1)
' '$rgb(46,48,63)$right($substr(%comment%,$add($strstr(%comment%,<IDX>),$len(<IDX>)),$sub($strstr(%comment%,</IDX/>),1)),$sub($len($substr(%comment%,$add($strstr(%comment%,<IDX>),$len(<IDX>)),$sub($strstr(%comment%,</IDX/>),1))),1))
-----------------------------------------------
Style (script):
----------------------------------------------
//;=== color background, alternate rows
$ifequal($mod(%list_total%,2),0,
$ifequal($mod(%_playlist_number%,2),1,
$set_style(back,$rgb(46,48,63),$rgb(46,48,63)),
$set_style(back,$rgb(46,48,63),$rgb(46,48,63))),
$ifequal($mod(%_playlist_number%,2),0,
$set_style(back,$rgb(46,48,63),$rgb(46,48,63)),
$set_style(back,$rgb(46,48,63),$rgb(46,48,63)))
)
//;=== color text
$set_style(text,$rgb(46,48,63),$rgb(46,48,63))
//;=== color playing
$if(%_isplaying%,
$set_style(back,$rgb(46,48,63),$rgb(46,48,63))
$set_style(text,$rgb(46,48,63),$rgb(46,48,63))
)
------------------------------------------------
Sort (script):
------------------------------------------------
$info(encoding),lossless $substr(%comment%,$add($strstr(%comment%,<IDX>),$len(<IDX>)),$sub($strstr(%comment%,</IDX/>),1)) %album artist% %date% %album% $replace(%path%,\%filename_ext%,) %path_sort%
------------------------------------------------
This solution improved my foobar2000 interface very much, and I hope it is helpful to others here too.
Cheers.