Converting the format of a tag field

When I started using MP3TAG I chose to use the 'Composer' tag with the format First Name Last Name. So Vivaldi is tagged as Antonio Vivaldi.

I've decided I want to change this so the tagging format is Last Name, First Name, i.e. Vivaldi, Antonio.

My database contains some 3,500 different music albums so I do not want to try and do this manually! Can anyone tell me if it's possible to set up an automated process to do this, or guide me to other topics that might help me to do it?

Many thanks,
Richard

perhaps see this thread: /t/15886/1
it leads to other threads but gives you fairly thorough picture about the technicalities and the semantics.

Still my opinion: leave the name as it is.

Maybe you should not change the composer-tag but add the additional tag %composersort%.

Ohrenkino, thanks for all those links. There's probably everything I need to be able to do what I needed from that.

I had one issue with the format values suggested. Some of my Composers have three-part names, e.g. Ludwig Van Beethoven, Jimmy Van Heusen. The default conversion results in Beethoven, Ludwig Van (which is what I want), but also Heusen, Jimmy Van (when it should be Van Heusen, Jimmy).

This is by no means a big problem as I have relatively few three part names, and I think the most likely workaround will be to do the conversion and then manually do search and replace for the small number of rogue entries I will still have. but any suggestions on how best to deal with this would be most helpful.

Poster, I'm not sure what the tag ComposerSort would do here? Are you suggesting it could be used to avoid re-tagging the file altogether?

Thanks,
R

Sorry, no help there, you have to do it manually.

The COMPOSERSORT field could help to leave the COMPOSER field as it is and still find Beethoven under B instead of L (for Ludwig).
You could even abbreviate the name to just Beethoven in the COMPOSERSORT field. Not all players support the "-SORT" fields.

I think now I have almost everything working to do the conversion as I want. My Format string is

$trimLeft($regexp(%COMPOSER%,'([^;]+)(\s[^;]+)','$2, $1'))

This performs the conversion correctly and removes the leading spaces. The few remaining problems I have with some three-part names can be resolved manually I think.

The one remaining question I have concerns the separator I'm using to split the fields. All my different composers are separated by \\ rather than ; as the string requires. I've experimented with changing the string to

$trimLeft($regexp(%COMPOSER%,'([^\\]+)(\s[^\\]+)','$2, $1'))

but that didn't work for me.

Can anyone advise me on either:

  1. Adapting my string to account for the different separator I use
  2. Using some other string to convert my separator from \\ to ;

Many thanks for any help you can give me.

R

PS Ohrenkino thanks for your further advice on three-part names and on using ComposerSort. I'll just do the manual tidy-up for three-part names, but I don't think ComposerSort will work for me.

Anyway, instead of changing and maybe destroying your already existing composer-tags, you should change your actions in saving the new content to %composersort%.

If you are satistied with the final result saving the composersort-content to %composer% will be done in seconds user a format-value-action.

A string list of textual values, which are separated by the sequence '; ' ...
can be converted into a multi-value tag-field by replacing each occurence of '; ' with '\\'.
Example ...

ARTIST <== $replace('Artist1; Artist2','; ','\\\\')

The other way round ...

ARTIST <== $meta_sep(ARTIST,'; ')

DD.20160408.1456.CEST

$trimLeft($regexp(%COMPOSER%,'([^;]+)(\s[^;]+)','$2, $1')) .. gives the same result as ... $regexp(%COMPOSER%,'([^;]+)\s([^;]+)','$2, $1')

DD.20160408.1502.CEST

Detlev, I used the TrimLeft function as I found there were leading spaces left in front of the tag information if I didn't use it. It works well, anyway! R