IPB

Welcome Guest ( Log In | Register )

> Notice!

Please take a minute to check our Frequently Asked Questions. Use Search to reveal possible related topics.

Also make sure you've read the Forum Guidelines before posting in this forum.

 
Reply to this topicStart new topic
> Switching first and last name of Artist, Editing Tag Fields
chrismp3junkie
post Oct 28 2010, 19:57
Post #1


Member


Group: Members
Posts: 2
Joined: 28-October 10
Member No.: 13140
Mp3tag Version: 2.46a



Hello, let me start by praising this excellent application.

As someone with a large collection of MP3s, I am looking for a way to switch the artist name to a different order.

Right now, most of my MP3s are in the following order:

Bruce Springsteen
Spice Girls

I would like reverse the order for artist names so it reads alphabetically, as follows:

Spice Girls
Springsteen, Bruce

Although I know I can make the change easily using the Artist field - select all the artist and make a global change - when dealing with compilations or soundtracks, this becomes tedious and onerous.

If there is a method to make these changes with a batch of files, please recommend. If not, please take this a suggestion for future versions. Thanks!
Go to the top of the page
 
+Quote Post
pone
post Oct 28 2010, 21:54
Post #2


Member


Group: Full Members
Posts: 1692
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



ZITAT(chrismp3junkie @ Oct 28 2010, 20:57) *
Right now, most of my MP3s are in the following order:

Bruce Springsteen
Spice Girls

I would like reverse the order for artist names so it reads alphabetically, as follows:

Spice Girls
Springsteen, Bruce

Although I know I can make the change easily using the Artist field - select all the artist and make a global change - when dealing with compilations or soundtracks, this becomes tedious and onerous.

If there is a method to make these changes with a batch of files, please recommend. If not, please take this a suggestion for future versions. Thanks!


Action: Format Value
Field: Artist
String: $regexp(%artist%,(.*) (.*),$2',' $1)

BUT:
Works only for artists with one sure name.
If you want Jon Bon Jovi to Bon Jovi, Jon (and not Jovi, Jon Bon) you have to use:
$regexp(%artist%,(.*?) (.*),$2',' $1)

This post has been edited by pone: Oct 28 2010, 21:56
Go to the top of the page
 
+Quote Post
chrismp3junkie
post Nov 18 2010, 16:05
Post #3


Member


Group: Members
Posts: 2
Joined: 28-October 10
Member No.: 13140
Mp3tag Version: 2.46a



Thank you so much for the format string!
Go to the top of the page
 
+Quote Post
Flskydiver
post Nov 26 2010, 15:44
Post #4


Member


Group: Full Members
Posts: 78
Joined: 25-November 10
Member No.: 13285
Mp3tag Version: 2.49



QUOTE (pone @ Oct 28 2010, 15:54) *
Action: Format Value
Field: Artist
String: $regexp(%artist%,(.*) (.*),$2',' $1)

BUT:
Works only for artists with one sure name.
If you want Jon Bon Jovi to Bon Jovi, Jon (and not Jovi, Jon Bon) you have to use:
$regexp(%artist%,(.*?) (.*),$2',' $1)


Do you have a way to reverse that (remove the comma and put everything before the comma at the end)? Started downloading lyrics and none of the artists in that format are being found...

Thanks!
Go to the top of the page
 
+Quote Post
pone
post Nov 26 2010, 16:05
Post #5


Member


Group: Full Members
Posts: 1692
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



ZITAT(Flskydiver @ Nov 26 2010, 15:44) *
Do you have a way to reverse that (remove the comma and put everything before the comma at the end)? Started downloading lyrics and none of the artists in that format are being found...

Thanks!

to transform "Springsteen, Bruce" into "Bruce Springsteen":
Action: Format Value
Field: ARTIST
Fromatstring: $regexp(%artist%,(.*)',' (.*),$2 $1)

This post has been edited by pone: Nov 26 2010, 16:06
Go to the top of the page
 
+Quote Post
Flskydiver
post Apr 24 2011, 18:54
Post #6


Member


Group: Full Members
Posts: 78
Joined: 25-November 10
Member No.: 13285
Mp3tag Version: 2.49



QUOTE (pone @ Nov 26 2010, 11:05) *
to transform "Springsteen, Bruce" into "Bruce Springsteen":
Action: Format Value
Field: ARTIST
Fromatstring: $regexp(%artist%,(.*)',' (.*),$2 $1)


Awesome, thanks!
Go to the top of the page
 
+Quote Post
Flskydiver
post May 22 2011, 00:07
Post #7


Member


Group: Full Members
Posts: 78
Joined: 25-November 10
Member No.: 13285
Mp3tag Version: 2.49



QUOTE (Flskydiver @ Apr 24 2011, 13:54) *
Awesome, thanks!


Taking what I've learned here and elsewhere, I've not got the following 5 actions to choose from when renaming Artists in this fashion; perhaps compiling them here may help others. (*Most of mine are set up as format field with the $regexp function but I tried to standardize them in describing them):

From "First Name(s) Last Name(s)" to "Last Name(s), First Name(s)" Format:

1) Transform Artist from "A B" to "B, A" or "A B C" to "C, A B"

ex: "John Smith" to "Smith, John" or "John Michael Smith" to "Smith, John Michael"

Regular Expression Replace: "(.*) (.*)" with: "$2, $1"


2) Transform Artist from "A B C" to "B C, A"

ex: "John Smith Jones" to "Smith Jones, John"

Regular Expression Replace: "(.*?) (.*)" with: "$2, $1"


3) Transform Artist from "A B ©" to "B, A ©"

where "©" is any suffix you like following a two word name

Regular Expression Replace: "(.*?) (.*) (.*)" with: "$2, $1 $3"


From "Last Name(s), First Name(s)" to "First Name(s) Last Name(s)" Format:

4] Transform Artist from "B, A" to "A B" or "B, A ©" to "A B ©"

ex: "Smith, John" to "John, Smith" or "Joel, Billy & Elton John" to "Billy Joel & Elton John"

Regular Expression Replace: "^([\w]+),\s([\w]+)" with: "$2 $1"

I find this works well with all two-word names no matter if you've added more stuff to the end and it is safe to run on all artist who DON'T have comma's in their name field too; except for those who have more than two words in their proper name.


5] Transform Artist from "B C, A" to "A B C" or "C, A B" to "A B C"

ex: "Smith Jones, John" to "John Smith Jones" or "Smith, John Michael" to "John Michael Smith"

Regular Expression Replace: "(.*)',' (.*)" with: "$2 $1"

This simply takes everything before the comma and puts it at the end, which works great for all names, no matter how many words in the first or last, but doesn't play nice with non-name suffixes you may have added (like "Joel, Billy and Elton John").


Adding or Removing Leading "The "

6] Restore Leading "The " to Artists' Names

7] Delete Leading "The " and "A " from Artists' Names



This post has been edited by Flskydiver: May 22 2011, 00:11
Attached File(s)
Attached File  Artist_Name_Actions.zip ( 1.77K ) Number of downloads: 349
 
Go to the top of the page
 
+Quote Post
HighEnder
post Sep 20 2014, 13:55
Post #8


Member


Group: Full Members
Posts: 7
Joined: 13-December 12
Member No.: 17282
Mp3tag Version: 2.53



Thank you very much for providing a solution to change the names.
It works for my director case as well.
But - to be very honest - I do not know why.
I am looking for a manual for this magix regexp-function.

Is there anybody in the forum who has created such a manual?
I checked the help pages but I do not understand how this fromatstring works.

Fromatstring: $regexp(%artist%,(.*)',' (.*),$2 $1)

What does the string (.*) means?
What does the string $2 $1 means?

From a very high perspective I believe it is clear.
1) Look for the last letter in artist. Name this phrase as $1.
2) Continue to search in artist. Name that phrase in $2.
3) Replace $1 by $2 and add a comma.

Furthermore I saw in the forum the following expression: (.+?) (.+) ohmy.gif
What does that means?

I would be very happy to get more information about the regexp-function.
Go to the top of the page
 
+Quote Post
ohrenkino
post Sep 20 2014, 16:34
Post #9


Member


Group: Full Members
Posts: 9021
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.84b



ZITAT(HighEnder @ Sep 20 2014, 14:55) *
...Furthermore I saw in the forum the following expression: (.+?) (.+) ohmy.gif
What does that means?

I would be very happy to get more information about the regexp-function.

You may have a look at this part of the help:
http://help.mp3tag.de/options_format.html#regexp

The $regexp() function is more or less the same as the action "Replace with regular expression".


--------------------
42 - wie war die Frage / what was the question / quelle était la question
Go to the top of the page
 
+Quote Post
HighEnder
post Sep 20 2014, 17:26
Post #10


Member


Group: Full Members
Posts: 7
Joined: 13-December 12
Member No.: 17282
Mp3tag Version: 2.53



QUOTE (ohrenkino @ Sep 20 2014, 17:34) *
You may have a look at this part of the help:
http://help.mp3tag.de/options_format.html#regexp

The $regexp() function is more or less the same as the action "Replace with regular expression".


Hallo Ohrenkino,

Du hast mir bereits letztes Mal weitergeholfen. Die Hilfeseite habe ich mit auch schon angesehen. Ich werde dabei allerdings nicht schlau. daher habe ich meinen Text gepostet.
- Wo ist dort beispielsweise die Beschreibung für (.*?)?
- Warum sind Klammern notwendig ?
- Was bedeutet der Punkt nach der ersten Klammer ? Dies finde ich nicht in der Beschreibung
- Vielleicht liegt es auch nur an meinen mangelndem Sprachkenntnissen
Für mich bedeutet " * repeated any number of times including zero" wiederholt jedes Mal einschließlich Null.
- Warum braucht man zusätzlich das Fragezeichen? Laut Beschreibung. Wiederholt keinmal oder einmal? Was soll den wiederholt werden?

Ich denke, mir würde schon eine deutsche Beschreibung für den $regexp(%artist%,(.*) (.*),$2',' $1) nach dem %artist% und $regexp(%artist%,^([\w]+)\s([\w]+), $2',' $1) weiterhelfen.

Den letzten Teil habe ich mit meinen Halbkenntnissen mal versucht:
1) Finde den Anfang des Textes
2) Jeder Buchstabe wird bis auf einen Unterstrich wiederholt und in den String $1 abgelegt.
3) Dann folgt ein Leerzeichen
4) Anschließend wird der verbleibende Text erneut eingelesen und in den String $2 abgelegt
5) Zum Schluß werden die beiden Strings vertauscht und mit einem Koma separiert.

Ist dies korrekt?


Go to the top of the page
 
+Quote Post
HighEnder
post Sep 20 2014, 17:48
Post #11


Member


Group: Full Members
Posts: 7
Joined: 13-December 12
Member No.: 17282
Mp3tag Version: 2.53



Hallo Ohrenkino,

was müßte ich schreiben, daß automatisch erkannt wird, daß wenn der Dirigentenname aus 3 Namensbestandteilen besteht z.B. Sir Charles Mackerras in Mackerras, Sir Charles umbenannt wird und wenn der Difigentenname nur aus 2 Namensbestandteilen wie z.B. Niklaus Harnoncourt besteht in Harnoncourt, Nikolaus umbenannt wird.

Falls 3 Bestandteile vorhanden (*.) (*.) (*.), dann $3, $1 $2 sonst $2, $1

Die if-Weiche kann ich nicht programmieren.
Falls ich die 3 Bestandteile nehme, läuft er mir bei den normalen zwei Bestandteilen ins Leere und macht nichts.

Gibt es hier eine Möglichkeit, dies zu programmieren? Wenn ja, wie?
Go to the top of the page
 
+Quote Post
HighEnder
post Sep 20 2014, 17:56
Post #12


Member


Group: Full Members
Posts: 7
Joined: 13-December 12
Member No.: 17282
Mp3tag Version: 2.53



Hallo Ohrenkino,

habe die Lösung bereits selbst gefunden. rolleyes.gif
Auch bei drei Namensbestandteilen klappt es auch mit dem Suchmuster (.*) .(*).
Go to the top of the page
 
+Quote Post
ohrenkino
post Sep 20 2014, 18:19
Post #13


Member


Group: Full Members
Posts: 9021
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.84b



ZITAT(HighEnder @ Sep 20 2014, 18:56) *
Hallo Ohrenkino,

habe die Lösung bereits selbst gefunden. rolleyes.gif
Auch bei drei Namensbestandteilen klappt es auch mit dem Suchmuster (.*) .(*).

This is the English part of the forum, so please stay in English.

You see the (English) help pages in your local language, if you call the help from Mp3tag with F1 - so this might shed some more light on the topic.

The reason why your expression works is due to the "greadiness" of the expression: the first expression tries to grab as many hits as possible.

In general I am not a friend of swapping first and last name as this always causes havoc with names that have to stay that way: Pink Floyd, Rolling Stones, "Dave Dee, Dozy, Beaky, Mick & Tich", "Katrina & the Waves" and so on.
So, unless you want to keep a special advisory which name gets swapped and which one doesn't, I think it is easiest not to swap anything at all. My opinion.


--------------------
42 - wie war die Frage / what was the question / quelle était la question
Go to the top of the page
 
+Quote Post
HighEnder
post Sep 20 2014, 19:57
Post #14


Member


Group: Full Members
Posts: 7
Joined: 13-December 12
Member No.: 17282
Mp3tag Version: 2.53



Hi Ohrenkino,

Thank you so much for the hint with the F1 Button.
Now the things are clear.

So sorry for replying in German. However I tried to find a solution in the forum and than I was forwarded to the international page.


I fully agree to your remarks regarding the artist names when we talk about pop music. The same applies for the "The" in the artist's name. I like the original name.
However talking about classic music I want to have Mozart, Amadeus as a composer and Solti, Sir Georg as a conductor when I want to select some music from my streaming agent. But that's my personel optinion. Other people might have different opinions.

Thank you for your time you invested into my topic and help. It was always appreciated.
Go to the top of the page
 
+Quote Post
ohrenkino
post Sep 20 2014, 20:04
Post #15


Member


Group: Full Members
Posts: 9021
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.84b



Perhaps you get the best of both worlds with the additional fields
ARTISTSORT
ALBUMSORT
ALBUMARTISTSORT
COMPOSERSORT

These allow to apply a different naming scheme for the sorting ...


--------------------
42 - wie war die Frage / what was the question / quelle était la question
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd September 2017 - 13:54