# Replay gain code

**URL:** https://community.mp3tag.de/t/replay-gain-code/42347
**Category:** Support
**Created:** [July 15, 2018, 12:14pm UTC](https://community.mp3tag.de/t/replay-gain-code/42347 "2018-07-15T12:14:25Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![sheepdisease](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@sheepdisease](https://community.mp3tag.de/u/sheepdisease)
#### Post date: [July 15, 2018, 12:14pm UTC](https://community.mp3tag.de/t/replay-gain-code/42347/1 "2018-07-15T12:14:25Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [July 15, 2018, 12:21pm UTC](https://community.mp3tag.de/t/replay-gain-code/42347/2 "2018-07-15T12:21:50Z")

</div>

> [@sheepdisease](#):
>
> 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?

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.

---

<div class="post-metadata">

### Author: ![sheepdisease](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@sheepdisease](https://community.mp3tag.de/u/sheepdisease)
#### Post date: [July 15, 2018, 12:34pm UTC](https://community.mp3tag.de/t/replay-gain-code/42347/3 "2018-07-15T12:34:14Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [July 15, 2018, 1:01pm UTC](https://community.mp3tag.de/t/replay-gain-code/42347/4 "2018-07-15T13:01:25Z")

</div>

> [@sheepdisease](#):
>
> (\\+|-)?\\s?(\\d\*\\.\\d\*)\\sDB

Use one of the many regular expression online sites like

> **[regex101: build, test, and debug regex](https://regex101.com)**
>
> Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET, Rust.

or

> **[Regexper](https://regexper.com/)**
>
> Regular expression visualizer using railroad diagrams

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](https://community.mp3tag.de/uploads/default/original/2X/4/451c9fe6410c4eb87fbf360470ef0ca305474e37.png)

Mp3tag is a tagging program. Not a "do-any-modification-to-my-music" application.  
Further explanation for [REPLAYGAIN Metadata](https://en.wikipedia.org/wiki/ReplayGain#Metadata).

---

<div class="post-metadata">

### Author: ![sheepdisease](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@sheepdisease](https://community.mp3tag.de/u/sheepdisease)
#### Post date: [August 7, 2018, 6:07am UTC](https://community.mp3tag.de/t/replay-gain-code/42347/6 "2018-08-07T06:07:15Z")

</div>

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](https://community.mp3tag.de/uploads/default/original/2X/3/362f499ebc5d8c2dab942cd341c81535f9a39797.png)

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

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [August 7, 2018, 6:09am UTC](https://community.mp3tag.de/t/replay-gain-code/42347/7 "2018-08-07T06:09:31Z")

</div>

> [@sheepdisease](#):
>
> My question now is, how do I find all the files affected by this and then reverse/remove the gain?

See this thread, post

> [@Replay gain code](https://community.mp3tag.de/t/replay-gain-code/42347/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 r…

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.

---

<div class="post-metadata">

### Author: ![sheepdisease](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@sheepdisease](https://community.mp3tag.de/u/sheepdisease)
#### Post date: [August 7, 2018, 6:14am UTC](https://community.mp3tag.de/t/replay-gain-code/42347/8 "2018-08-07T06:14:37Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [August 7, 2018, 6:21am UTC](https://community.mp3tag.de/t/replay-gain-code/42347/9 "2018-08-07T06:21:49Z")

</div>

> [@sheepdisease](#):
>
> I haven't edited any outside of mp3tag

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

> [@sheepdisease](#):
>
> to reverse the 'tagging'

Delete the fields?

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:27pm UTC](https://community.mp3tag.de/t/replay-gain-code/42347/10 "2026-02-09T12:27:32Z")

</div>


