Sort by file name then by track number


#1

I recently reinstalled my OS and software, now MP3Tag isn't working the way it used to.

I am used to clicking on one column header, such as file name or artist, then clicking on a second column header--usually track number. This would, for example, sort everything by artist first, then arrange tracks by each artist in order while still maintaining the grouping of the first filter. It's worked like that for as long as I can remember.

Now it's not working. When I click on my second column, I lose whatever sorting I just processed. I've always been able to apply one filter and then another.

Can someone tell me what I've done or what I need to check?


#2

OMG. I just noticed another weird thing: The Album column is right-justified, instead of left-justified, and it's the only one like that. Can I fix this, too?


#3

I hope so: check in the Context Menu "Colums" for the title column if the box "numerical" is ticked. If so: unselect.

Sorting: sort the subordinate column first, then the superior.
So: if you want to have all tracks sorted ascending and then by artist, click the columns in that sequence.
(This would lead to a sorting that mixes up all the albums ... point?)
The general rule is: the last sorting wins.


#4

I tried it that way, but it doesn't work, either. There is no subordinate/superior sorting going on--not with the Filename field, anyway (which is the one I always used).

If I click track to order them numerically, then click Artist, nothing changes at all. The only thing that happens is that the little arrow next to Artist will flip, but the list below doesn't change. If I then go on and click the Album header, the tracks will sort in numeric order by Artist and by Album.

I'm certain it didn't work this way before. Maybe this is an "update?"

I'm used to being able to sort using Track and Filename.


#5

(superior and subordinate described the sequence not any kind of settable hierarchy - in effect MP3tag always sorts the last selected unique field)
Which brings me to an explanation:
If you sort by filename then you sort by a criteria that is already unique and therefore leads to a defined sorting order. There are not duplicates.
If you sort by number, then all numbers are arranged sequentially: first all the ones, then the twos.
If you now sort by Artist it does not make any difference as the artist is always the same, I take it. So MP3tag looks up the list, Takes the first record from that artist from the list, then the second and so on. As you have already sorted by a different criteria, the list LOOKS the same, but is in fact sorted by artist.
Now: if you sort a list with various albums in the sequence "First track, then album" the same mechanism applies:
MP3tag goes through the list of albums and puts the first tracknumber of the first album in first place, then puts the second tracknumber of the first album in second place and so on.
THis leads to a sorted list where all albums are sorted alphabetically and the sequence inside the album is determined by the sequence of the record from the previous list.

Back to the filename: as this is a unique sort criteria, the sequence of the previous list is irrelevant.


#6

The column dialog of the Mp3tag list view allows to enter a user defined sort criterium per column.

Example:
Column Name: Album
Column Value: $meta_sep(album,'\\')
Column Field: %album%
Column Sort By: %album%%discnumber%%track%%title%
Column Numeric: no

This will reduce the steps of sorting other columns in order to get the sorting by wish to one click (maybe two clicks for descending sorting).

Read about how to customize columns in the manual.
http://help.mp3tag.de/main_viewcolumns.html

DD.20100928.0953.CEST

Be aware that this sorting expression is "quick and dirty", and does not sort correct in all cases.
In order to get a better sorting result you need to do some column sizing like ...
Column Sort By: $left(%album%$repeat(' ',50),50)$right($repeat(' ',3)%discnumber%,3)$right($repeat(' ',7)%track%,7)$left(%title%$repeat(' ',100),100)

DD.20101015.1757.CEST

I pointed out above, that a Column Sort expression of ...
%album%%discnumber%%track%%title%
... might not sort correct in all cases.

I proposed a fixed size Column Sort expression, which provides a better guarantee to do a reliable sorting. But the expression for itself looks complicated, and the prediction of the fixed size column width might be predicted to fail for one special case some day and it costs computer memory resources.

It might be possible to permit dynamic length per tag-field, when the individual tag-fields are delimited by a special character, respectively by a special character sequence, which is impossible to occur in the tag-field content.

Something like this should be coded ...
Column Sort By: %album%'-|?|-'%discnumber%'/|/'%track%'++*'%title%
... or this ...
Column Sort By: %album%$char(7)%discnumber%$char(7)%track%$char(7)%title%

DD.20110428.0800.CEST


Why doesn't this sort by track, too?
Multi Column sorting
Share your custom Actions
Second Sort
#7

I edit the "Sort by" field for a given column using parameters as described. Are those parameters detailed all laid out in the Help documentation? Sure would be nice to click once and sort everything.

Now, any idea why the Artist field is right-justified, instead of left-justified like everything else?


#8

Have you tried the hint in post #3?
"I hope so: check in the Context Menu "Colums" for the title column if the box "numerical" is ticked. If so: unselect."


#9

Yeah, that was it--numeric was checked for the Artist column. Thanks.


#10

I inserted %artist%%album%%track% into the Artist "Sort By" field and now everything is great. I can just click that one field and have large groups of assorted MP3s organized the way I need.

What an awesome program!

Thanks for all the help.

%artist% Artist
%album% Album
%genre% Genre
%title% Title
%track% Track-Number
%year% Year


#11

My new sort column script is this:

Sort by: %artist% - %year% - $if2(%ALBUMSORTORDER%,%album%) - %track%

Enjoy!


#12

This kind of sorting may be suitable for your personal approach.
For me, it is not suitable as putting the %year% tag so far in front will lead to strange results if you have artists with antologies (like the Beatles and their blue and red album and the album "1") and you have assigned the original release year to the tracks.
In this case these albums are torn apart if you have organized your folders that you first see the artist, then the albums.
Filling the %year% with the album release date and %origyear% with the song release date is not the best way as a lot of players do not read the %origyear% tag.


#13

Good point.

I use the following special sorting expressions in my columns.ini.
But I have never checked them for all possible circumstances.

[#0]
width=227
numeric=0
name=Artist
value=$meta_sep(ARTIST,'\\\\')
sort=%ARTIST%$char(7)%ALBUM%$char(7)%DISCNUMBER%$char(7)%TRACK%$char(7)%TITLE%
field=%ARTIST%
enabled=1

[#0]
width=264
numeric=0
name=Album
value=$meta_sep(ALBUM,'\\\\')
sort=%ALBUM%$char(7)%ARTIST%$char(7)%DISCNUMBER%$char(7)%TRACK%$char(7)%TITLE%
field=%ALBUM%
enabled=1

[#0]
width=88
numeric=0
name=Jahr
value=%YEAR%
sort=%YEAR%$char(7)%ALBUM%$char(7)%DISCNUMBER%$char(7)%TRACK%
field=%YEAR%
enabled=1

[#0]
width=185
numeric=0
name=Genre
value=$meta_sep(GENRE,'\\\\')
sort=%GENRE%$char(7)%ARTIST%$char(7)%ALBUM%$char(7)%DISCNUMBER%$char(7)%TRACK%$char(7)%TITLE%
field=%GENRE%
enabled=1

DD.20110428.1242.CEST


#14

True. My method wouldn't work for you.

I've always dealt with compilation or "greatest hits" albums this way:

If a track on the compilation was previously released on a prior album or single, I list the track only as part of the original album or single with that album's or single's original release date in the "year" tag.

Only if a track on the compilation album has never previously been released or is a new mix do I use the compilation album's name and date in the file's tags.

My collection also includes the Beatles Red and Blue albums and I broke them down this way.

In rare circumstances I do keep a compilation album together (For example, Pink Floyd's "Echoes"; which was creatively arranged as two entire album sides which should each be listened to in one sitting, and who's tracks were sometimes remixed and edited so that they segued seamlessly together, one into the next, much like Floyd's studio albums did) ... and in such case I always use the date of album release.

Long story short: For me, "Year" tag is always the year that the "Album" tag was released. Not the date the track was recorded or anything else.


#15

Noticed you included the "Disc Number" tag as well. Makes sense! I use to always included the disc number as part of the album title tag (ex: "Echoes [Disc 1]") and simply erased all the disc number tags; but have just realized it makes more sense to use the disc number tag now that all my iDevices support it! I'm going back and updating all my multi-disc sets as I write this!

Therefor, my new "Sort by" sequence is this:

Sort by:

$if2(%artistsort%,%artist%) - %year% - $if2(%albumsort%,%album%) - %discnumber% - %track%

[Edited a lot May 1, 2011 as I've seen the light on using the Disc Number tag, and version 2.47!]