Post Reply 
Basic error in numerical sorting of album names
12-01-2014, 23:27
Post: #25
RE: Basic error in numerical sorting of album names
(12-01-2014 21:31)simoncn Wrote:  
(12-01-2014 20:39)DavidL Wrote:  Thanks for the clarification.
I did a similar set of tests with iTunes running on a Mac Mini this morning. I called my albums A 1, A 2 ……………A 10, A 11, A 12. These were sorted (correctly??) in ascending order.

I tried this on a Mac and the order is "Test 2 xxx" followed by "Test 10 xxx". It seems surprising that the order would differ between Mac and Windows, but I've checked everything I can think of and this does seem to be the case.

If I'm correct about this difference, this would give a further twist to which sort order iTunes users might consider to be "natural".

Quote:Thanks to contributors for the depth of discussion of this topic. I'm obviously in a minority so it looks as though I will need to edit several hundred album titles to ensure I obtain what I regard as the 'natural' sort order for classical music works of the type I listed above.

David

I'm sorry for the inconvenience of doing this. It might be even more inconvenient than you think, because you would need to apply the new tag to all files, not just those that aren't being sorted as you expect. I'll continue to think about various possibilities for how MinimServer might provide a more convenient solution for this in the longer term.

Simon,
Different aspects shoud be considered on their own merits in all this discussion about "natural" numeric sorting.
1. Is it a desirable "feature" ?
2. Can it provoke bad side-effects ?
3. Can it be efficiently implemented or would it consume too much resources ?

On point 1, I still have difficulty understanding why someone would prefer seeing sequence :
"Bach J.S BWV 1 ...", "Bach J.S. BWV 10 ...", "Bach J.S. BWV 100 ...", "Bach J.S. BWV 2 ..."
instead of :
"Bach J.S BWV 1 ...", "Bach J.S. BWV 2 ...", "Bach J.S. BWV 10...", "Bach J.S. BWV 100 ..."
If you look at the major classical musical catalogs listing works of Bach, Mozart, Haydn, Teleman. Scarlatti, etc , you can see that compositions are named along similar patterns. It is quite "natural" for one to replicate those naming patterns when tagging music files. Use of ALBUMSORT tags to circumvent this issue is a technique applicable only to album titles, whereas the issue is exhbited in many other places, for example in playlists names (playlists, expecilly when organized hierarchically, are one of the best way to organize a music collection, and opus/catalog numbers will appear everywhere). The only generally applicable approach to achieve correct sorting is the "left zero-fill in a fixed width numeric field" technique :
"Bach J.S. BWV 0001 ...", "BACH J.S. BWV 0002 ...", "Bach J.S. BWV 0010 ...", etc
This is the technique I use myself (as many others do), for lack of a better solution. It is something you can surely live with (if you start with it and choose a correct field width at first, otherwise you are in for a lot of work), but I always resent it as an ugly kludge. For me, and many others, it is "Scarlatti Keyboard Sonata in A minor, K.7", not "... K.007".

About my point 2, I still need to see a convincing example of those bad results that could be produced by "number aware sorting" in the domain of music. True, there can be cases where "0.82u1" sorts before "0.20", but I humbly feel this example is a bit contrived and appears to apply to software releases id's. My experience is that in the vast majority of cases where numbers are used in titles (or similar) tags (especially for classical music), those numbers are simple ones which follow a simple usage pattern, similar to the examples given above.

Now to point 3. I humbly feel this is the real issue. Among all those music managers/servers I tried my hand on so far, only Windows Media Player implements numeric sort for strings (including play list names). So MinimServer is not alone here in it's use of strict lexicographic sorting. The fact that so few softwares attempt to deal with embedded numbers when sorting strings could be indicative of a certain level of difficulty. Here the software developpers must be trusted in their decision to implement or not numerical sorting in strings.

In short, I would love to see embedded numbers treated specially when sorting strings, but would accept to see this issue left on the back burner for a while, not because it is "bad", "incorrect", "unnatural", etc , but because it would be too difficult to implement correctly and, above all, efficiently. It could then be seen as a desireable goal for a future release.

Regards to all
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Basic error in numerical sorting of album names - Andre Gosselin - 12-01-2014 23:27

Forum Jump:


User(s) browsing this thread: 1 Guest(s)