Skip to main content
Topic: Masstagger | replace value - from every possible field? (Read 3478 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Masstagger | replace value - from every possible field?

When editing tags within foobar2000 there isn't an option to work with all fields including filename.
mp3tag is able to do this with the option to work with all possible fields with the "_ALL" option.

In order to replace values, such as:
lil > Lil'
mr > Mr.
I don't want to have to redo the process twice for %albumartist% & %artist% if that's the case.

By default, foobar2000's properties > tools > (tageditor) isn't that useful in function as compared to masstager. So my question really regards to masstagger since i'm already using it, but if this could be done using Foobar2000's default tageditor that'll be great.

Masstagger | replace value - from every possible field?

Reply #1
You can already handle multiple tags at once if you choose the option that let's you use titleformatting as source (not at my PC to check the exact phrases used). For example:

Source:
Code: [Select]
$replace(%album artist% -- %artist%,mr ,Mr. )

Then you can use this to recreate your fields with the replaced data from source:
Code: [Select]
%album artist% -- %artist%

I put '--' (or anything that is unlikely to be part of a real tag) to mark where one tag began and where it ends.

The only thing I can think of (and am unable to test right now) is that maybe the $replace function doesn't accept multiple tags at once, in which case you'd need two of them for artist and album artist, but that would still be within the same step (and I don't think that limitation exists in the first place, I just recall me having some problems in some very specific situations with $replace, but don't remember details by now).

Masstagger | replace value - from every possible field?

Reply #2
simply use 2 format value actions in masstagger. one format "ARTIST" using $replace([%ARTIST%,a,b] and second one format "ALBUM ARTIST" using $replace([%ALBUM ARTIST%,a,b]. where both actions include the same pattern (b replaces a). or didnt i get "So my question really regards to masstagger" right???

Masstagger | replace value - from every possible field?

Reply #3
I put '--' (or anything that is unlikely to be part of a real tag) to mark where one tag began and where it ends.


The double hyphen is often used in manual typewriting to signify n-dash, and could find its way into e.g. comment fields.

In my collection I have no real tags containing the ¨ symbol, only very few containing ^,  one-ish containing the broken pipe (which you likely don't have on a keyboard). Ticks ` and ´ seem to always get their way into externally populated comment tags.
Also, surprisingly few containing other currency symbols than the dollar sign, none containing the generic currency symbol ¤, however I think Windows collation (and thus fb2k, which depends on it) identifies it with other currency symbols and thus makes it useless, at least in my locales.

This is closing in on a digression, but hopefully it is worth something ...
High Voltage socket-nose-avatar

Masstagger | replace value - from every possible field?

Reply #4
Source:

Selection > Properties > Tools > Automatically Fill Values...

Code: [Select]
$replace(%album artist% -- %artist%,mr ,Mr. )


Pattern:
Code: [Select]
%album artist% -- %artist%


Oh, cool and you don't need masstagger  , but the only problem I can find is case-sensitivity. How would I have the following be replaced using this very same format provided here? Let's use the following as an example:

BoB DyLaN > Bob Dylan



Masstagger | replace value - from every possible field?

Reply #6
Inconsistencies like that can (and should) be approached in various ways depending on the situation. For example:

- You can do quick search for all occurrences of an artist using 'Library/Search' (case insensitive) then do a mass overwrite on said artist with the capitalization you know is right.
- You can use 'Properties/<right click on field>/Capitalize' to let foobar decide capitalization for you. Even if it's not perfect, you can always do a second pass using 'Properties/Tools/Automatically fill values' since the values are now normalized.
- You can use $replace() with any number of arguments. Such as: '$replace(%artist%,BaD Name,Good Name,bAD nAmE,Good Name,BAd NAmE,Good Name)'.
- You can use whichever online database you prefer to overwrite the metadata for you.
- You could probably write an overly complex titleformatting script that takes 'Bob Dylan' as input from you, converts that string to lowercase, compares that to the actual value of ARTIST also converted to lowercase. If those two match, it will also compare the regular version of your string with the regular version of ARTIST, and mark files that do not match (ergo they are the same name but the capitalization is different). But that sounds a serious overkill for no real reason.

Besides bad metadata should be few and far between in any decent library. Cleaning up the metadata of any album that is about be added shouldn't take more than a minute or a few even if you need to type in one or two by hand.

Make sure to check the wiki:
http://wiki.hydrogenaud.io/index.php?title...tting_Reference


The double hyphen is often used in manual typewriting to signify n-dash, and could find its way into e.g. comment fields.

Possible. My recommendation was to use something you know won't come up. For the sake of renaming a few albums which I can guarantee won't contain '--', I can safely use that. If you are dealing with a library you don't personally know, you can go the extra mile and use some impossible combination of letters, twice. But for just casual renaming of 1-1 album it's rare you'd run into trouble even with the simplest not-so-common pattern, especially if you took a quick glance on what you are working with.

Masstagger | replace value - from every possible field?

Reply #7
i'd use facets to browse your library by artist. that shows anything with inconsistent capitalisation as separate entities rather than grouping them together like album list does.

Masstagger | replace value - from every possible field?

Reply #8
Inconsistencies like that can (and should) be approached in various ways depending on the situation...


Oops, actually Daeron I mean to say how can I change BoB DyLaN to Bob Dylan without having to specify @Source:BoB DyLaN with it being capitalized in that fashion?

In other words how can I use a general formatting to plainly specify anything regardless of how it's capitalized, this might be a challenge but this will indefinitely answer all my questions about 'Automatically filling values' with foobar2000:

[a href="http://postimg.org/image/inphmxkwl/" target="_blank"]

Masstagger | replace value - from every possible field?

Reply #9
The only 'fix everything' command is '<Right click on a field>/Capitalize' or its equivalent, '$caps()' in titleformatting:
This will blanket-normalize ALL inconsistencies, resulting in: 'Robbery (Part 1) [Bonus]'. It's not necessarily safe (with weird titles and artist names - their probability also increases the larger the selection is). Notice that 'part' and 'bonus' are also capitalized. If you for whatever reason don't like that, you can usually run a second pass using $replace() to correct those.

The safer way is to filter and isolate the problematic files:
For example, this script shows what tracks will be effected by Capitalize (use Library/Search):
Code: [Select]
NOT "$strcmp(%title%,$caps(%title%))" IS 1

Or same thing with Facets/Columns UI filter panels:
Code: [Select]
$if($strcmp(%title%,$caps(%title%)),TRUE,FALSE)

By looking at them you can decide what course of action you wish to take.

How you deal with inconsistencies depends on their variance and quantity:
1) Retype them manually one by one
If after isolation it's just a few tracks with no similar patterns, you might as well just retype them manually. Otherwise you will have to look for common patterns that can be exploited to save time and energy.

2) For example, if the inconsistent parts are always within the brackets, you can use that fact:
Split the string into two tags (TITLE and TEMP):

Press OK to save these tags (so they show up in the Properties window and you can work with them on a second pass). Launch another tagging window.

Fix the undesired value in the latter tag (TEMP) using $lower(), put the whole thing inside brackets (to recreate how they originally was), then join it together with the other part (TITLE):


3) If the misstyped value repeats across all tracks, you can specifically correct that:
Code: [Select]
$replace(%title%,bOB DyLAn,Bob Dylan)

4) Etc.
I'm bad at examples but there are probably more ways to approach this. Just try to use the tools available (specifically the ones dealing with strings in titleformatting) creatively. You can usually slice a tag into multiple ones, deal with the parts that need to be dealt with, then join the small tags together as they were originally.

Masstagger | replace value - from every possible field?

Reply #10
I'm bad at examples but there are probably more ways to approach this...

3) If the misstyped value repeats across all tracks, you can specifically correct that:
Code: [Select]
$replace(%title%,bOB DyLAn,Bob Dylan)


Yes, i'm aware of splitting tags and it seems more complicated than your 3rd option.

But, could it be possible to somehow use $replace like so (considering brackets/format):

Code: [Select]
$replace(%title%,[BoNus],(bonus))
$replace(%title%,[bonus],(bonus))


Those are two different examples of the type of output i'm looking for and this will be as complicated as it gets, hopefully you get my drift of the output. Ultimately I want to just type out the whole-word rather than capitalizing as there could be so many variations.

Masstagger | replace value - from every possible field?

Reply #11
In titleformatting, if you want to use special characters as part of a string, you have to put them inside ' ' apostrophes. Special characters are those used for titleformatting itself, for example: [ ] ( ) ,

This means if you want to write [BoNuS] within a script you have to tell foobar to ignore the special characters by writing '['Bonus']' instead. If you want to write less, '[BoNuS]' also works.

In case of your scripts you can use:
$replace(%title%,'['BoNuS']','('bonus')')

Or alternatively:
$replace(%title%,'[BoNuS]','(bonus)')

Was this all you were looking for? I might have went a bit overboard with the explanation if all you had was a syntax problem. And yes, 2) is more complicated than 3) for the sake of replacing a single capitalization error. I just tried to show the splitting method in case you have so many errors (or strings so long) that typing it out into a $replace() function becomes the worse choice.

Masstagger | replace value - from every possible field?

Reply #12
The safer way is to filter and isolate the problematic files:
For example, this script shows what tracks will be effected by Capitalize (use Library/Search):
Code: [Select]
NOT "$strcmp(%title%,$caps(%title%))" IS 1


absolutely this. i often use Capitalize but only on an album at a time so i can see the effects right before my eyes. i'd never use such a thing or attempt any kind of fancy title formatting gymnastics on a whole collection at once.

maintaining lower case first characters on some tags because of artistic intent is important to me so i'd never want to risk wiping that out.

Re: Masstagger | replace value - from every possible field?

Reply #13
You can already handle multiple tags at once if you choose the option that let's you use titleformatting as source (not at my PC to check the exact phrases used). For example:

I'm curious, multiple or all pre-existing tags.

Just to clarify, there's no similar _TAG field similar to mp3tag?

 
SimplePortal 1.0.0 RC1 © 2008-2020