Populate sorting directly from tags

Feature requests that have been implemented will be filed here.
MDE
Posts: 479
Joined: Sat Feb 02, 2013 12:05 am

Populate sorting directly from tags

Post by MDE »

This is a bit of a follow-on from the enhancements made to populate Muso standard and custom fields directly from song file tags. That enhancement is great because it means that Muso can be optimised for "Album based" library viewing while the player can display the required info on, say, the SB touch, which may need different tagging. This really helps when you have a lot of classical music. The other benefit is that you don't have to re-scan into LMS when you load new CDs. I have been using custom browse with LMS and the custom scan takes ages. I have now changed my set-up to use Asset UPnP instead of Custom Browse. This means that I don't need LMS to scan anything unless I want to browse direct from the SB touch, which I rarely do. The resulting set-up is really slick and works well together with Plugplayer on the iPod touch as a controller and Whitebear to connect it to the SB Touches.
However, to take LMS fully out of the loop, except as a player, would also require another source from which to populate the sort keys for artists. Ideally this would work in a similar way to the Custom Tag mapping. However, I realise there is a problem if an Artist is associated with different ArtistSort tags. I don't know how LMS or Asset handle this, but clearly they do. From what I can make out, they only make one association, if there is more than one to choose from. I would have thought that multiple listings would be better as you can see which ones are in the wrong place.
EDIT Another complication arises if there is more than one artist. Most sort tags then have multiple entries, which are often not treated correctly by software. Whatever the original source of the sort keys, it may make best sense for Muso to keep its own database, which can be directly amended by the user and not over-ridden by imports. I'm not sure in the current list how one can see what is an "imported" as opposed to a customised sort key.
Last edited by MDE on Sat Feb 09, 2013 7:52 pm, edited 1 time in total.
musoware
Site Admin
Posts: 1847
Joined: Fri Sep 14, 2012 6:50 am

Re: Populate sorting directly from tags

Post by musoware »

That's a good summary, thanks. How do you find muso's scan speed compare with LMS? The actual Muso folder scan processing is fast but it does inevitably slow down if it has to read tags from song files across the network (when I had them on a local drive it was blazingly fast, but I noticed it's significantly slower now I have them on a VortexBox). The "check updated metadata" setting, if turned off, is an effective way to do incremetal scans even if you do scan the entire music collection (it won't read tags if the song file already exists in muso), but you'd have to ensure your tags are correct before first importing if you expect to keep this setting off.

Muso could collate ArtistSort entries on each scan and record the most common one for each new artist discovered (if there is any variation). For entries that exist already it would have to keep the entry already stored in Muso, though it could warn of mis-matches with the ArtistSort tags read on a scan in the log.
MDE
Posts: 479
Joined: Sat Feb 02, 2013 12:05 am

Re: Populate sorting directly from tags

Post by MDE »

LMS is pretty fast in the most recent versions. It is Custom Scan that is slow. I run LMS on the same (old desktop) machine as the files, but control from the laptop. Your suggestion sounds good (also see edit to earlier post).
musoware
Site Admin
Posts: 1847
Joined: Fri Sep 14, 2012 6:50 am

Re: Multiple Artists

Post by musoware »

Yes if the "Artist" tag is "Robert Plant; Alison Krauss" I'd expect the "ArtistSort" tag to have both entries also, ie. "Plant, Robert; Krauss, Alison".

Also worth pointing out is that it will have to couple up the sort tag with the corresponding tag, so we'd have

ARTIST coupled with ARTISTSORT
ALBUMARTIST coupled with ALBUMARTISTSORT, and
COMPOSER coupled with COMPOSERSORT

These are the tags that mp3tag offers as standard, but should we take it further and also read BANDSORT, PERFORMERSORT, CONDUCTERSORT, etc? I'd be storing them all in the same flat translation table. Looks like LMS might only read ARTISTSORT actually:
http://wiki.slimdevices.com/index.php/S ... portedTags

I don't think I want to get into ALBUMSORT and TITLESORT - Muso will just sort those naturally.
MDE
Posts: 479
Joined: Sat Feb 02, 2013 12:05 am

Re: Populate sorting directly from tags

Post by MDE »

I think sorting is only required for people's names, i.e. Artist, Composer, Conductor, Performer. Band is normally as it is (except, perhaps for relegating "The", as in "Crashing Squashes, The"). I agree LMS only does Artist. Asset also does Composer. I don't see the point of Album or Title Sort.
MDE
Posts: 479
Joined: Sat Feb 02, 2013 12:05 am

Re: Populate sorting directly from tags

Post by MDE »

Can I just resurrect this old thread? What is the current state of sorting in Muso? LMS defines six contributor tags:
ALBUMARTIST, ARTIST, COMPOSER, CONDUCTOR, BAND, TRACKARTIST
Each of these can have an associated SORT field (ALBUMARTISTSORT etc.). In theory, LMS should use the associated sort field for each of these, but the implementation is incomplete. The new "Additional Browse Modes" permits use of these in LMS, without needing Custom Browse, which is helpful.
Muso uses PERFORMER rather than TRACKARTIST, which I am quite happy as I use PERFORMER to include the main Artist (with instrument) as well as the supporting artists (with instruments if possible), whereas I use TRACKARTIST for just the supporting artists. (BTW I note that the mapping table at http://musoware.com/wiki/index.php?titl ... te_Mapping omits TRACKARTIST = Contributor #6 in LMS).
I like Muso's approach to COMPOSERs as it also provides country and period info, however it requires separate manual entry to the table whenever you get a new composer - which I usually forget to do. Similarly the Artist table is manually maintained.
Does Muso use the SORT fields, and if so how and in particular, how does this relate to the ARTIST and COMPOSER tables? (BTW the information text on my "Sorting" options tab is cut off after "automatically imported from").
musoware
Site Admin
Posts: 1847
Joined: Fri Sep 14, 2012 6:50 am

Re: Populate sorting directly from tags

Post by musoware »

Muso doesn't read the SORT tags on a folder scan, but it does read the consolidated sorting info from LMS (from the contributors table). Muso, like LMS, keeps sort names in a separate lookup table rather than holding it on every track. How LMS consolidates sort info where different sort names come from the same contributor name in different files, I don't know, but Muso just scans the LMS consolidated sort info then uses that in sorting artists (and by artists I mean any artist field: artist, composer, band, performer, conductor). The query ignores any sort name with the same starting characters as the contributor name (it checks the first 4), so you only get in Muso's sort table the entries that will actually affect sorting.
MDE
Posts: 479
Joined: Sat Feb 02, 2013 12:05 am

Re: Populate sorting directly from tags

Post by MDE »

Thanks for the clarification. I see LMS has now been fixed to include (almost all) the contributor sort keys, so I am hopeful that this will all work properly. (See http://bugs.slimdevices.com/show_bug.cgi?id=18096). Once I have sorted out my database, I will pass it through LMS (rescanned) and check it all out in Muso. Just a couple of queries in advance -
(1) Does Muso pick up the full contributors table - I am assuming it does from what you say, so it should include all contributor roles.
(2) In that case how does it deal with a composer being a contributor and being included in the Muso Sort table, as well as being in the Composer Roster - is there any linkage and which takes precedence?
musoware
Site Admin
Posts: 1847
Joined: Fri Sep 14, 2012 6:50 am

Re: Populate sorting directly from tags

Post by musoware »

I've made a few small improvements to the sort table import from LMS that will be in the next version. In answer to your questions:

(1) it doesn't quite scan all contributors for feeding the sort table no - it skips any that don't define a namesort that has the same first 4 characters as the name, and also skips those that are the same without punctuation. The exact query is:

Code: Select all

SELECT upper(CAST(c.name AS CHAR)) name, max(namesort) namesort
FROM contributors c 
WHERE LENGTH(CAST (c.name AS CHAR )) < 50 
  AND LENGTH(CAST (c.name AS CHAR )) > 2 
  AND LENGTH(CAST (c.namesort AS CHAR )) > 1
  AND SUBSTR(trim(lower(replace(c.name,'.',''))),1,4) != SUBSTR(trim(lower(replace(c.namesort,'.',''))),1,4) /* COLLATE NOACCENTS */
  AND REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
      upper(CAST(c.name AS CHAR)),'THE ',''),':',''),',',''),'(',''),')',''),'-',''),';',''),'.',''),'&',''),'''',''),' ','') != upper(REPLACE(c.namesort,' ','' )) 
GROUP BY upper(CAST(c.name AS CHAR))
(2) the Composer roster takes precedence.
MDE
Posts: 479
Joined: Sat Feb 02, 2013 12:05 am

Re: Populate sorting directly from tags

Post by MDE »

Very helpful - I can run the query using SQLiteBrowser on the LMS database and see exactly what Muso will do to the artist table!
Post Reply