Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: A sorting question (Read 1501 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

A sorting question

I'm tagging songwriter information  in Columns UI. I've created a column called writers. Here's an example of what a field may look like, "John Lennon / Paul McCartney / George Harrison". My question is, how can I sort by just ONE name like for example  George Harrison?
I'm using foobar2000 v2.0 beta 24 [64bit]
With Columns UI Version 2.0.0 beta 1

Re: A sorting question

Reply #1
I'm tagging songwriter information  in Columns UI. I've created a column called writers. Here's an example of what a field may look like, "John Lennon / Paul McCartney / George Harrison". My question is, how can I sort by just ONE name like for example  George Harrison?
I'm not an expert so someone may correct me but I think this is just about the character you use to "Split values".

Go to the Properties of a track (Alt+P on a selected track) and stay in the Metadata tab.

Right-click on one of the fields e.g. your "Writers" field (but I don't think it matters which field you click on because I think the separator is used for all fields that support multi-value entries).

Click on "Split values..."


You will get this box, but with more characters than just the semi-colon that you see here


This is where you tell Foobar2000 how to split the entries in a single field into multiple single values. So in my case, I choose the semi-colon as the separator and click OK.

Then I would enter e.g. John Lennon; Paul McCartney; George Harrison in the Writers field.

Now fb2k will treat those three Beatles as individual entries in your Writers field.

You could choose to use / instead of ; but I think it's a good idea to choose carefully because don't forget that whenever fb2k sees that character, it will split the values either side of that character into individual values.

So, for instance, if you choose a comma as the separator, "Crosby, Stills & Nash" would get split (in fb2k's database) into "Crosby" and "Stills & Nash", which you probably don't want.

Let's say you choose a semicolon instead of your forward slash, but you've already got lots of entries using the forward slash, you could use Mp3tag to replace all forward slashes with semicolons in the Writers field. (You might be able to that in fb2k, but I don't know how.) If you want to use Mp3tag and don't know how, I can explain how to do it if you want.

I hope I haven't misunderstood your question or said anything wrong/misleading, and I hope this helps.  8)

Re: A sorting question

Reply #2
I'm tagging songwriter information  in Columns UI. I've created a column called writers. Here's an example of what a field may look like, "John Lennon / Paul McCartney / George Harrison". My question is, how can I sort by just ONE name like for example  George Harrison?
I'm not an expert so someone may correct me but I think this is just about the character you use to "Split values".

Go to the Properties of a track (Alt+P on a selected track) and stay in the Metadata tab.

Right-click on one of the fields e.g. your "Writers" field (but I don't think it matters which field you click on because I think the separator is used for all fields that support multi-value entries).

Click on "Split values..."


You will get this box, but with more characters than just the semi-colon that you see here


This is where you tell Foobar2000 how to split the entries in a single field into multiple single values. So in my case, I choose the semi-colon as the separator and click OK.

Then I would enter e.g. John Lennon; Paul McCartney; George Harrison in the Writers field.

Now fb2k will treat those three Beatles as individual entries in your Writers field.

You could choose to use / instead of ; but I think it's a good idea to choose carefully because don't forget that whenever fb2k sees that character, it will split the values either side of that character into individual values.

So, for instance, if you choose a comma as the separator, "Crosby, Stills & Nash" would get split (in fb2k's database) into "Crosby" and "Stills & Nash", which you probably don't want.

Let's say you choose a semicolon instead of your forward slash, but you've already got lots of entries using the forward slash, you could use Mp3tag to replace all forward slashes with semicolons in the Writers field. (You might be able to that in fb2k, but I don't know how.) If you want to use Mp3tag and don't know how, I can explain how to do it if you want.

I hope I haven't misunderstood your question or said anything wrong/misleading, and I hope this helps.  8)

Thanks for the reply, I tried to play around with it. All my entries so far are in this format "John Lennon / Paul McCartney / George Harrison" When I follow your method and add "/" to the writers properties field and click ok it changes the selected writers field to "John Lennon, Paul McCartney, George Harrison". I can also select multiple entries and those gets the "/" swapped with ","

I have no issue with using "," instead of "/" My question now is how do I for example just show "George Harrison"? When I click at the top of the writers column in foobar I don't see any difference in the sorting.

Also I would like to know how to do what you described with Mp3tag. I can see how that would be very handy to know.
I'm using foobar2000 v2.0 beta 24 [64bit]
With Columns UI Version 2.0.0 beta 1

Re: A sorting question

Reply #3
If your field is WRITER and it has Lennon and McCartney and Harrison in that order, you can single them out with
$meta(writer,0) → "John Lennon"
$meta(writer,1) → "Paul McCartney"
$meta(writer,2) → "George Harrison"

... you might ("might" as in "I don't know, too lazy to check") need to go to Preferences -> Advanced and type "multi" in the search box, and add WRITER to the list of multivalue fields.

But I don't understand what you want to sort by.

Re: A sorting question

Reply #4
If your field is WRITER and it has Lennon and McCartney and Harrison in that order, you can single them out with
$meta(writer,0) → "John Lennon"
$meta(writer,1) → "Paul McCartney"
$meta(writer,2) → "George Harrison"

... you might ("might" as in "I don't know, too lazy to check") need to go to Preferences -> Advanced and type "multi" in the search box, and add WRITER to the list of multivalue fields.

But I don't understand what you want to sort by.

I want to be able to just see the songs where e.g. George Harrison is either the writer or the co writer.
I'm using foobar2000 v2.0 beta 24 [64bit]
With Columns UI Version 2.0.0 beta 1

Re: A sorting question

Reply #5
;WRITERS have now been added to the multivalue fields in preferences > advanced
I'm using foobar2000 v2.0 beta 24 [64bit]
With Columns UI Version 2.0.0 beta 1

Re: A sorting question

Reply #6
If your field is WRITER and it has Lennon and McCartney and Harrison in that order, you can single them out with
$meta(writer,0) → "John Lennon"
$meta(writer,1) → "Paul McCartney"
$meta(writer,2) → "George Harrison"

Where do I fill out this information?
I'm using foobar2000 v2.0 beta 24 [64bit]
With Columns UI Version 2.0.0 beta 1

Re: A sorting question

Reply #7
Where did you make this column? In Preferences > Display > Columns UI > Filters > Fields tab? Did you enter -

Name=Writers
Field=Writers

(By the way, the field WRITER is the standard field name to use (without the S) - see ID3 Tag Mapping / Tag Mapping - but that makes no difference to anything, aside from other software being able to read the correct field)

Then secondly as InchPerfect showed, in right-click tracks > Properties the Writers field should appear with semi-colons ; as separator between the names - use the right-click > Split Values option and enter whatever the current separator is - comma , or slash /

With the above done, you should see a Filter column with individual names - just click on "George Harrison" and the next Filter / Playlist will show only those tracks.

EDIT: On the other hand, if you're talking about a Playlist View column, that is not really how sorting a playlist works. Playlist columns are sorted by the first character of the field. If you wanted to sort by the third value, you'd have to enter it into Edit > Sort > Sort by... menu - this is where you would enter the codes that Porcus wrote above - but that would not really work effectively or be very efficient, better to use a library viewer / Filter column like above to just show the specific tracks.

Let's say you choose a semicolon instead of your forward slash, but you've already got lots of entries using the forward slash, you could use Mp3tag to replace all forward slashes with semicolons in the Writers field.
There is no need to do that. The character itself is not important. When you use Split Values option, foobar replaces whatever character with a hidden null character within the tag, that indicates "the next multi-value starts here". (This is why you can sometimes see values with semi-colon that are actually single value - because they have not been split correctly)

Re: A sorting question

Reply #8
Where did you make this column? In Preferences > Display > Columns UI > Filters > Fields tab? Did you enter -

Name=Writers
Field=Writers

(By the way, the field WRITER is the standard field name to use (without the S) - see ID3 Tag Mapping / Tag Mapping - but that makes no difference to anything, aside from other software being able to read the correct field)

Then secondly as InchPerfect showed, in right-click tracks > Properties the Writers field should appear with semi-colons ; as separator between the names - use the right-click > Split Values option and enter whatever the current separator is - comma , or slash /

With the above done, you should see a Filter column with individual names - just click on "George Harrison" and the next Filter / Playlist will show only those tracks.

EDIT: On the other hand, if you're talking about a Playlist View column, that is not really how sorting a playlist works. Playlist columns are sorted by the first character of the field. If you wanted to sort by the third value, you'd have to enter it into Edit > Sort > Sort by... menu - this is where you would enter the codes that Porcus wrote above - but that would not really work effectively or be very efficient, better to use a library viewer / Filter column like above to just show the specific tracks.

Let's say you choose a semicolon instead of your forward slash, but you've already got lots of entries using the forward slash, you could use Mp3tag to replace all forward slashes with semicolons in the Writers field.
There is no need to do that. The character itself is not important. When you use Split Values option, foobar replaces whatever character with a hidden null character within the tag, that indicates "the next multi-value starts here". (This is why you can sometimes see values with semi-colon that are actually single value - because they have not been split correctly)

I was doing it wrong, in the Playlist view. I have now added Writers to Filters and I'm displaying playlist tabs + filters as my screen layout, and it seems to be working. My question now is, if there's a way to have the writers entered in the Writer field, automatically treated as split values. As it is now I have to to go to properties > Metadata > right click on an entry > Split values. I know I can select multiple songs and then apply the split values process to them all, but it would be nice if the field "Writers" was automatically set up to split anything that was separated by a "/"
I'm using foobar2000 v2.0 beta 24 [64bit]
With Columns UI Version 2.0.0 beta 1

Re: A sorting question

Reply #9
^ That is what the 'Multi-value Fields' option does in Preferences  > Advanced > Display > Properties Dialog... but you have to type the values in Properties with a semi-colon. Then they get split automatically.

 

Re: A sorting question

Reply #10
^ That is what the 'Multi-value Fields' option does in Preferences  > Advanced > Display > Properties Dialog... but you have to type the values in Properties with a semi-colon. Then they get split automatically.

The problem is I copy and paste from internet in this format "John Lennon / Paul McCartney / George Harrison". I have also added "/" to the split values box under properties.
I'm using foobar2000 v2.0 beta 24 [64bit]
With Columns UI Version 2.0.0 beta 1