# Automating foo\_dr.txt Dynamic Range to Comments Field

**URL:** <https://community.mp3tag.de/t/automating-foo-dr-txt-dynamic-range-to-comments-field/43072>\
**Category:** Support\
**Created:** [September 24, 2018, 1:21pm UTC](https://community.mp3tag.de/t/automating-foo-dr-txt-dynamic-range-to-comments-field/43072 "2018-09-24T13:21:16Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xenasys](https://community.mp3tag.de/user_avatar/community.mp3tag.de/xenasys/32/5722_2.png) [@Xenasys](https://community.mp3tag.de/u/Xenasys)\
**Post date:** [September 24, 2018, 1:21pm UTC](https://community.mp3tag.de/t/automating-foo-dr-txt-dynamic-range-to-comments-field/43072/1 "2018-09-24T13:21:16Z")

</div>

Hi Guys

First time on the forum so be gentle did search but couldnt seem to find answer am looking for basically want to copy the Dynamic range Value from Each Track into the comments field in each track automatically if its possible.

Below is an example of the file thats created from Foobar

So would it be possible to import the text file or write a script that would delimit or find the track no and its associated value then copy to the same tracks comment field?

```auto
foobar2000 1.3.7 / Dynamic Range Meter 1.1.1
log date: 2016-01-01 23:01:44

--------------------------------------------------------------------------------
Analyzed: 10cc / The Original Soundtrack (SACD) (DSD64)
--------------------------------------------------------------------------------

DR Peak RMS Duration Track
--------------------------------------------------------------------------------
DR12 -2.81 dB -18.52 dB 8:46 01-Une Nuit A Paris: One Night In Paris / The Same Night In Paris / Later The Same Night In Paris
DR11 -4.72 dB -19.07 dB 6:10 02-I'm Not In Love
DR12 -3.51 dB -17.06 dB 4:30 03-Blackmail
DR12 -1.37 dB -17.12 dB 4:31 04-The Second Sitting For The Last Supper
DR12 -4.54 dB -20.17 dB 4:04 05-Brand New Day
DR13 -4.20 dB -20.81 dB 4:16 06-Flying Junk
DR12 -4.32 dB -18.57 dB 4:47 07-Life Is A Minestrone
DR11 -5.11 dB -19.09 dB 5:03 08-The Film Of My Love
--------------------------------------------------------------------------------

Number of tracks: 8
Official DR value: DR12

Samplerate: 2822400 Hz / PCM Samplerate: 176400 Hz
Channels: 2
Bits per sample: 24
Bitrate: 5645 kbps
Codec: DSD64
================================================================================

```

---

<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:** [September 24, 2018, 2:00pm UTC](https://community.mp3tag.de/t/automating-foo-dr-txt-dynamic-range-to-comments-field/43072/2 "2018-09-24T14:00:49Z")

</div>

See the Help on Convert\>Text file-Tag

> **[Import Tags from Text Files – Mp3tag Documentation](https://docs.mp3tag.de/converters/import-tags-from-text-files/)**
>
> Documentation on Text File to Tag, a converter to import tags from text files. Mp3tag is the universal Tag Editor.

Please note the paragraph in the help "Matching files from text file to file list in Mp3tag".  
You would have to supply one line per file which also contains the filename or the order of data in the text file matches that of the target files.  
It is not clear to me what you want to be done with

> [@Xenasys](#):
>
> foobar2000 1.3.7 / Dynamic Range Meter 1.1.1  
> log date: 2016-01-01 23:01:44
> 
> `## Analyzed: 10cc / The Original Soundtrack (SACD) (DSD64)`
> 
> `## DR Peak RMS Duration Track`

and

> [@Xenasys](#):
>
> Number of tracks: 8  
> Official DR value: DR12
> 
> `# Samplerate: 2822400 Hz / PCM Samplerate: 176400 Hz`  
> Channels: 2  
> Bits per sample: 24  
> Bitrate: 5645 kbps  
> Codec: DSD64

---

<div class="post-metadata">

**Author:** ![Xenasys](https://community.mp3tag.de/user_avatar/community.mp3tag.de/xenasys/32/5722_2.png) [@Xenasys](https://community.mp3tag.de/u/Xenasys)\
**Post date:** [September 24, 2018, 2:30pm UTC](https://community.mp3tag.de/t/automating-foo-dr-txt-dynamic-range-to-comments-field/43072/3 "2018-09-24T14:30:22Z")

</div>

@ohrenkino Thanks for the reply so the text which identifies the Track No and Specifically the DR of that track needs to be entered in the comments field example

DR12 -3.51 dB -17.06 dB 4:30 03-Blackmail i need the DR12 to be copied to the Comments Tag

So the Comments Tag would read DR12

---

<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:** [September 24, 2018, 2:39pm UTC](https://community.mp3tag.de/t/automating-foo-dr-txt-dynamic-range-to-comments-field/43072/4 "2018-09-24T14:39:05Z")

</div>

As I wrote: it is one line per file.  
So if there are lines in the original text file that should be skipped, then they should not be in the data file. You would have to delete them prior to the import.  
If you really only need the first column, it would be best to add a unique identifier to separate the useful data from the rest.

To me it looks as though there are almost more steps involved to get the source format of the data file right for the automatic import than if you would enter it manually....

---

<div class="post-metadata">

**Author:** ![Xenasys](https://community.mp3tag.de/user_avatar/community.mp3tag.de/xenasys/32/5722_2.png) [@Xenasys](https://community.mp3tag.de/u/Xenasys)\
**Post date:** [September 24, 2018, 5:12pm UTC](https://community.mp3tag.de/t/automating-foo-dr-txt-dynamic-range-to-comments-field/43072/5 "2018-09-24T17:12:43Z")

</div>

@ohrenkino I think you are right and manual entry may be the only way thanks for your help anyhow

---

<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:** [September 24, 2018, 5:26pm UTC](https://community.mp3tag.de/t/automating-foo-dr-txt-dynamic-range-to-comments-field/43072/6 "2018-09-24T17:26:11Z")

</div>

I mean:  
first create the text file  
open it and remove all the lines that do not descirbe the individual tracks  
save the file.  
Open Mp3tag  
Load the audio files  
Select the files  
I don't know: would a field and separator string like  
%comment% -%dummy%  
import only the first column?  
If that works, it may still be worthwhile to go the more automatic way...

---

<div class="post-metadata">

**Author:** ![Xenasys](https://community.mp3tag.de/user_avatar/community.mp3tag.de/xenasys/32/5722_2.png) [@Xenasys](https://community.mp3tag.de/u/Xenasys)\
**Post date:** [September 25, 2018, 4:36am UTC](https://community.mp3tag.de/t/automating-foo-dr-txt-dynamic-range-to-comments-field/43072/7 "2018-09-25T04:36:10Z")

</div>

@ohrenkino Hi i have had some success with your suggestion thanks so its semi-automatic as deleting text i dont need is time consuming but the import works perfectly.

do you know if its possible to export %album% and %comment% into a csv file with two seperate columns i tried the csv export but it delimits but puts all data into one column

Thanks

---

<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:** [September 25, 2018, 4:46am UTC](https://community.mp3tag.de/t/automating-foo-dr-txt-dynamic-range-to-comments-field/43072/8 "2018-09-25T04:46:47Z")

</div>

> [@Xenasys](#):
>
> do you know if its possible to export %album% and %comment% into a csv file

Yes.  
Yet, the data structure from the data file and that in the import mask have to match exactly. No additional blank or a blank less are allowed.

---

<div class="post-metadata">

**Author:** ![Xenasys](https://community.mp3tag.de/user_avatar/community.mp3tag.de/xenasys/32/5722_2.png) [@Xenasys](https://community.mp3tag.de/u/Xenasys)\
**Post date:** [September 25, 2018, 4:59am UTC](https://community.mp3tag.de/t/automating-foo-dr-txt-dynamic-range-to-comments-field/43072/9 "2018-09-25T04:59:39Z")

</div>

@ohrenkino Thanks i tried that and it works fine

How do i seperate them into two seperate columns ? when i open the csv the data is in one column in excel?

---

<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:** [September 25, 2018, 5:04am UTC](https://community.mp3tag.de/t/automating-foo-dr-txt-dynamic-range-to-comments-field/43072/10 "2018-09-25T05:04:38Z")

</div>

csv means "comma separated value" .  
So the individual fields should be separated with a comma or semicolon.  
Blanks are not enough.  
Even better would be: the tab character.  
If you use MS products anyway, it may be easiest to load the text file into Word and replace multi-blanks (at least 2) with the tab character, `^t` in Word notation.  
If this leads to several consecutive tabs replace `^t^t` with `^t`. Repeat until there are only single tabs left.  
Save the cleaned up file as text file,  
import it in Excel. You should now have clean columns.

---

<div class="post-metadata">

**Author:** ![Xenasys](https://community.mp3tag.de/user_avatar/community.mp3tag.de/xenasys/32/5722_2.png) [@Xenasys](https://community.mp3tag.de/u/Xenasys)\
**Post date:** [September 25, 2018, 5:12am UTC](https://community.mp3tag.de/t/automating-foo-dr-txt-dynamic-range-to-comments-field/43072/11 "2018-09-25T05:12:46Z")

</div>

Thanks will give it a try great support btw and great software

---

<div class="post-metadata">

**Author:** ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)\
**Post date:** [September 25, 2018, 5:29am UTC](https://community.mp3tag.de/t/automating-foo-dr-txt-dynamic-range-to-comments-field/43072/12 "2018-09-25T05:29:29Z")

</div>

Alternatively, you can simply use Excel's data import "From Text" feature, where you can choose delimited file type and specify the separator character (it's the semicolon ; in Mp3tag's default csv export).

 ![Excel](https://community.mp3tag.de/uploads/default/original/2X/3/3f71ac201da758c244ff1c90f0c4230190847813.png)

---

<div class="post-metadata">

**Author:** ![Xenasys](https://community.mp3tag.de/user_avatar/community.mp3tag.de/xenasys/32/5722_2.png) [@Xenasys](https://community.mp3tag.de/u/Xenasys)\
**Post date:** [September 25, 2018, 5:41am UTC](https://community.mp3tag.de/t/automating-foo-dr-txt-dynamic-range-to-comments-field/43072/13 "2018-09-25T05:41:46Z")

</div>

Thats a good idea Thanks will try that

---

<div class="post-metadata">

**Author:** ![vilsen](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/e95f7d/32.png) [@vilsen](https://community.mp3tag.de/u/vilsen)\
**Post date:** [September 25, 2018, 8:11am UTC](https://community.mp3tag.de/t/automating-foo-dr-txt-dynamic-range-to-comments-field/43072/14 "2018-09-25T08:11:08Z")

</div>

> [@ohrenkino](#):
>
> %comment% -%dummy%

I think one would get unwanted blanks after e.g. DR12 with this string, that may or may not be a disturbance. To get rid of the blanks, and only keep the first 4 characters of the imported string, one could use

Format value: $left(%comment%,4)

---

<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:** [September 25, 2018, 8:17am UTC](https://community.mp3tag.de/t/automating-foo-dr-txt-dynamic-range-to-comments-field/43072/15 "2018-09-25T08:17:08Z")

</div>

Yes or  
Format value: $trim(%comment%)

---

<div class="post-metadata">

**Author:** ![vilsen](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/e95f7d/32.png) [@vilsen](https://community.mp3tag.de/u/vilsen)\
**Post date:** [September 25, 2018, 10:19am UTC](https://community.mp3tag.de/t/automating-foo-dr-txt-dynamic-range-to-comments-field/43072/16 "2018-09-25T10:19:06Z")

</div>

Better! Especially if DR\<10

---

<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/automating-foo-dr-txt-dynamic-range-to-comments-field/43072/17 "2026-02-09T12:27:41Z")

</div>


