Replay gain code


#1

Hello there, I have been applying some tags to files inadvertently from the Grammartron code.

Specfically:

[#62]
T=4
! Replay Gain Correction [1]=
F=REPLAYGAIN_TRACK_GAIN
1=(\\+|-)?\\s?(\\d*\\.\\d*)\\sDB
2=$1$2 dB
3=0

[#63]
T=4
! Replay Gain Correction [2]=
F=REPLAYGAIN_ALBUM_GAIN
1=(\\+|-)?\\s?(\\d*\\.\\d*)\\sDB
2=$1$2 dB
3=0

Can someone please tell me exactly what this will have done to my files and what impact it will have when music is played on my laptop or mp3 player (Sandisk)? Is it increasing the volume that these tracks are player at?

If so, what filter could I use to locate tracks which have been modified with this code and what code would I need to then undo it?


#2

you can filter for any known field with
%fieldname% PRESENT

You can also get an overview which tag fields are in your collection like this:
Load all your files
Select all your files
Press Alt-T to open the extended tags dialogue.
In this dialogue you see all fields that are present in any file.
It would then be a good way to filter for these fields and see which files actually contain them. as probably not all files will feature the more exotic fields.

As far as I see it these actions replace a DB with dB.
And if there is no such field, then no replacing should be possible.


#3

Thank you for your help. So it's a change of case and no actual change in the volume of the file? Makes sense given the nature of the script.


#4

Use one of the many regular expression online sites like
https://regex101.com
or
https://regexper.com/

and you get:

1st Capturing Group (\\+|-)?
   ? Quantifier β€” Matches between zero and one times, as many times as possible, giving back as needed (greedy)
   1st Alternative \\+
      \\+ matches the character \ literally (case sensitive)
        + Quantifier β€” Matches between one and unlimited times, as many times as possible, giving back as needed (greedy)
   2nd Alternative -
        - matches the character - literally (case sensitive)

\\ matches the character \ literally (case sensitive)
   s? matches the character s literally (case sensitive) 
   ? Quantifier β€” Matches between zero and one times, as many times as possible, giving back as needed (greedy)

2nd Capturing Group (\\d*\\.\\d*)
   \\ matches the character \ literally (case sensitive)
      d* matches the character d literally (case sensitive)
       * Quantifier β€” Matches between zero and unlimited times, as many times as possible, giving back as needed (greedy)
   \\ matches the character \ literally (case sensitive)
      . matches any character (except for line terminators)
   \\ matches the character \ literally (case sensitive)
      d* matches the character d literally (case sensitive)

\\ matches the character \ literally (case sensitive)
   sDB matches the characters sDB literally (case sensitive)

or

RegEx

Mp3tag is a tagging program. Not a "do-any-modification-to-my-music" application.
Further explanation for REPLAYGAIN Metadata.


#6

Thanks for your detailed reply, that is very helpful.

I have decided I want to get rid of the tags from all files affected by the replaygain action which was inadvertently incorporated within one of my actions.

So the action group being used:
image

My question now is, how do I find all the files affected by this and then reverse/remove the gain?


#7

See this thread, post

That action that you mention will only do something to that field if the field is actually there. So you must have applied a program that calculates replay gain values.


#8

Just tried the filter you suggested:

REPLAYGAIN_TRACK_GAIN PRESENT

It's picking up files, I haven't edited any outside of mp3tag.

I'm not sure what I need to do to reverse the 'tagging' though.


#9

As replay gain effects the audio part, it would mean that MP3tag would have to look at that data - which it does not.

Delete the fields?