Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  "Natural sorting" in the database
« previous next »
  • Print
Pages: [1]

Author Topic: "Natural sorting" in the database  (Read 1567 times)

Offline madayone

  • Member
  • *
  • Posts: 3
"Natural sorting" in the database
« on: April 05, 2013, 03:11:42 AM »
I'm sorry if this has been posted before, but I tried searching the forums and couldn't find anything about this particular issue.
I listen to classical music and in the database I'm using the following filters:
"Composer/Work" -> composer -> grouping -> artist -> filename = "fmt_title"

where "grouping" is the name of the composition. When I have selected a composer and I'm browsing their compositions, they are sorted like this for example:
Piano Sonata No. 1
Piano Sonata No. 10
Piano Sonata No. 2

I'd like No. 2 to appear before No. 10. Is there a way to do this?

Thanks
Logged

Offline cereal_killer

  • Member
  • *
  • Posts: 409
Re: "Natural sorting" in the database
« Reply #1 on: April 05, 2013, 12:30:43 PM »
I can only think of having "02" instead of "2" and so on.
Logged

Offline madayone

  • Member
  • *
  • Posts: 3
Re: "Natural sorting" in the database
« Reply #2 on: April 06, 2013, 02:45:57 AM »
Quote from: cereal_killer on April 05, 2013, 12:30:43 PM
I can only think of having "02" instead of "2" and so on.

Yeah I suppose there's no other way. It would look ugly though IMO, and it would require tons of re-tagging for my collection.
Maybe I'll post about this in the feature ideas forum.
Logged

Offline Crafty

  • Member
  • *
  • Posts: 56
Re: "Natural sorting" in the database
« Reply #3 on: April 06, 2013, 03:48:14 AM »
Quote
Piano Sonata No. 1
Piano Sonata No. 10
Piano Sonata No. 2

i think you can use a "space/s" in a alphanumeric sort.  zeros are easier to implement.

Piano Sonata No.  1
Piano Sonata No.  2
Piano Sonata No. 10
 
« Last Edit: April 06, 2013, 03:50:49 AM by Crafty »
Logged

Offline Julian67

  • Member
  • *
  • Posts: 116
Re: "Natural sorting" in the database
« Reply #4 on: April 10, 2013, 08:59:37 PM »
Quote from: madayone on April 06, 2013, 02:45:57 AM
Quote from: cereal_killer on April 05, 2013, 12:30:43 PM
I can only think of having "02" instead of "2" and so on.

..It would look ugly though IMO, and it would require tons of re-tagging for my collection...

I think it's the best way.  It needn't look ugly when playing as the WPS can display the metadata almost any way you like.  The track numbers aren't part of the title metadata, even though they are useful in a file name.  In any case the CD track numbers are a convenience for the medium, not part of the work; this is especially obvious in long works where the track numbers are merely index points in a long uninterrupted performance.  So the metadata on my collection mostly looks something like:

Code: [Select]
$ mediainfo 05\ -\ Out\ of\ the\ deep.flac 
General
Complete name                            : 05 - Out of the deep.flac
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
File size                                : 23.7 MiB
Duration                                 : 5mn 58s
Overall bit rate mode                    : Variable
Overall bit rate                         : 554 Kbps
Album                                    : Choral and Organ Music
Track name                               : Out of the deep
Track name/Position                      : 05
Performer                                : Oxford Camerata & Jeremy Summerly
Composer                                 : Orlando Gibbons
Genre                                    : Early
Recorded date                            : 1994
Comment                                  : Laurence Cummings, organ

The filename contains the track number so it sorts properly in a file manager or file name based player, and the tag contains a track number formatted to sort properly in a database based player.  Neither filename nor track number is of much interest beyond that so

in Rockbox on my player with a custom WPS it will look like so:



Naturally where tracks are named by movement/part number then that is part of the title of the work, so is written into the title tag and displayed.

For classical music it's a good idea to customise your wps as well as your tagnavi tag search format.  That frees you up to make full use of Composer and Comment tags, which in turn lets you use Artist/Performer and Album tags in a sensible way (like for the performers and the album name!), and you can finally forget about trying to mangle file names into poor man's tags.

The options for WPS are great.  You can have alternating fields, conditionals, controllable scrolling, choice of justify left/centre/right and so on.   Some reading and probably some trial and error and you can have everything look nice and also display everything useful without looking too fussy or crowded.

I don't know what tagging apps or tools you prefer but some of them make automatic renumbering and other batch operations very easy.  The most appealing method is to script it but if you have numerous different file types and/or inconsistent numbering and naming schemes it could be tricky.

It is definitely worth having everything numbered in a way that works as expected on every different OS, file system and device.  The alternative of waiting for all the different projects and people out there to change their apps and devices to a numbering scheme that they don't want to use is a bit of a long shot.  It might be a big and quite tedious task but once done it makes it very easy to switch devices, formats, operating systems, applications etc. without it becoming a big deal.  It's also the kind of task where you get the opportunity to fix all the other crap you find along the way......
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  "Natural sorting" in the database
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.082 seconds with 15 queries.