More > JRiver Media Center 27 for Windows

Change a View to sort on Composer Surname

<< < (2/4) > >>

glynor:
I left out: I can't remember if [Composer] is a list-type field, like [Artist] and [Actors]. But if so, and you need to handle that, this is possible too with a few modifications to the Expression in [Composer (Sort)]. Swap() does properly handle list-type data, so it is primarily adding the data type to the expression, but there might be other things to consider.

wer:
What glynor described, in excellent detail, is exactly what I was talking about. His [Composer Sort Override] provides exactly the function of the third field I mentioned (band/not-band).

The approach will work, if you're careful enough about your surname prefixes, if you have any and if you care about them.

I was not aware that Swap could accommodate von and other such prefixes. It it can, that will make things a lot easier on you.

That need for the third field, which Glynor aptly describes as a "release valve" is why I originally hedged about "completely programmatically".  The use of this field, which I cannot see a way to avoid, is in my view a manual entry type of override that allows you an out for all the cases where the algorithm cannot work on its own.  If you have to manually tweak the output for all the cases where the program logic breaks, one can't truthfully call it "completely programmatic".  But you may well think it's good enough.

glynor:

--- Quote from: wer on November 24, 2020, 12:40:53 am ---I was not aware that Swap could accommodate von and other such prefixes. It it can, that will make things a lot easier on you.

--- End quote ---

Not sure it can (I said "might"), but it should be relatively simple to special case in the expression if not.

And I'm not sure what special casing it really needs. For Sorting purposes only, having it treated as a "middle name" is probably the best choice anyway (Ludwig van Beethoven under B and not V), and it'll do that anyway without anything special. People with less-common or multiple suffixes are probably going to be the larger issue, but you have lots of choices there.

wer:

--- Quote from: glynor on November 24, 2020, 01:20:51 am --- For Sorting purposes only, having it treated as a "middle name" for is probably the best choice anyway

--- End quote ---

That's why I gave the caveat about how strict he was in his views on surnames. Putting von Beethoven under B seems clear to you and me, but some people might take great umbrage if names like de Sermisy or van Sloan were placed under S.

I mention this because (although I couldn't think of any French composers with a single-syllable surname) traditionally, French surnames with a prefixed single syllable  are sorted by the prefix. Think Charles de Gaulle. He would be expected to be found under d, never g. With multi syllable surnames, it can happen either way depending.

Although I'm less sure, same may be true of other languages. I have seen van Dyck under V.

dtc:
Yes, this is an old topic. The SWAP function came out of MrC's old regex expression. If you want to add other exceptions, you can simply go back to that regex expression and modify it. Matt introduced SWAP as a simple replacement for the regex expression.  The idea of the Manual (or Override) field is simply that there are always going to be exceptions, so it is best to build in a way to do that.

glynor's analysis is spot on, but can get complicated, given that there are always going to be exceptions. Sometimes simpler is better, even if more manual.

In this case, if you have 1,000 composers, my guess is that 900 or more will work with a simple swap, so the manual part is not all that onerous. And, once you identify a problem, a simple search will find all cases and allow you to enter the Manual field for all the tracks.

Now, what do we do with the Prince symbol?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version