# If FLAC do this, if MP3 do that?

**URL:** https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514
**Category:** Support
**Created:** [July 30, 2018, 1:35pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514 "2018-07-30T13:35:05Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![bascurtiz](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@bascurtiz](https://community.mp3tag.de/u/bascurtiz)
#### Post date: [July 30, 2018, 1:35pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/1 "2018-07-30T13:35:05Z")

</div>

Example:

Action for altering the star rating for FLAC would be like this:  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/3/3036c613b4a518f694eaaffbe0927aa0eed46165.png)

but...  
Action for altering the star rating for MP3 would be like this:  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/c/ccea26db3e8e4d9656fcec15b6bcbca80557b410.png)

Since my collection contains both formats, I have to sort them by extension and then apply one of above.  
How can I combine the 2 actions into 1?

So if it's a FLAC, alter the RATING WMP, and if it's a MP3, alter the POPULARIMETER  
\*Mind you: both fields are not there from the get-go, they need to be set using these actions.

Added scripts for easier editing:

> RATING WMP | $replace(%energy%,[EN]High,255,[EN]Mid,153,[EN]Low,51)
> 
> RATING WMP | $cutLeft(%RATING WMP%,4)
> 
> %RATING WMP% | %RATING WMP% [%dummy%
> 
> ENERGY
> 
> * * *
> 
> POPULARIMETER | $replace(%energy%,[EN]High,255,[EN]Mid,153,[EN]Low,51)
> 
> POPULARIMETER | $cutLeft(%POPULARIMETER%,4)
> 
> %popularimeter% | %POPULARIMETER% [%dummy%
> 
> ENERGY

---

<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 30, 2018, 3:29pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/2 "2018-07-30T15:29:02Z")

</div>

IMHO it is all the same.  
You should write only the field POPULARIMETER.  
Rating WMP, Rating MM, Rating WInamp and original POPULARIMETER all map to the same POPM field  
Then it depends on the data in the field whether it is interpreted as one or the other.  
So if you want to keep Popularimeter, use x|y with y operating as bits, the lowest number is 32, I think for 1 star.  
If there is no | and the numbers are below 6 or there are asterisks then it works as one of the rating xyz fields.  
I have seen that WMP transforms genuine POPM fields into rating wmp fields.

---

<div class="post-metadata">

### Author: ![bascurtiz](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@bascurtiz](https://community.mp3tag.de/u/bascurtiz)
#### Post date: [July 30, 2018, 4:16pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/3 "2018-07-30T16:16:07Z")

</div>

When I simply used the ''Action for altering the star rating for MP3'' on my FLAC files, it doesnt show the stars in Traktor.

Same for an action like this...

For MP3 I need to use:  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/3/3e0d8bdf38953ccd0e731e0dc6bcc12368ff2184.png)

For FLAC I need to use:  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/6/6aeb8f2b9af3c1911d34d4fd5112b7cc8f208c9d.png)

...Which I'd like to combine in 1 action.

---

<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 30, 2018, 5:05pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/4 "2018-07-30T17:05:52Z")

</div>

You can create a mapping in File\>Options\>Mapping to cater for different naming schemes

---

<div class="post-metadata">

### Author: ![bascurtiz](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@bascurtiz](https://community.mp3tag.de/u/bascurtiz)
#### Post date: [July 30, 2018, 5:58pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/5 "2018-07-30T17:58:37Z")

</div>

Works!  
Thanks again ohrenkino.

Using the ''Action for altering the star rating for MP3'' and adding this value to Mappings:  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/b/b19582137fe67289ae89f19278031289f2eea2cb.png)

---

<div class="post-metadata">

### Author: ![bascurtiz](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@bascurtiz](https://community.mp3tag.de/u/bascurtiz)
#### Post date: [July 30, 2018, 6:05pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/6 "2018-07-30T18:05:17Z")

</div>

However, the stars don't show up in Traktor.

The Extended tags shows the value in RATING WMP though:  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/5/5216a986740d0a5d08b3f7e94d1f9e8b3f6a7aca.png)

---

<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 30, 2018, 6:12pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/7 "2018-07-30T18:12:02Z")

</div>

Perhaps just stars is not enough. See here on traktor ratings

> [@Show Traktor ratings as stars in comment field](https://community.mp3tag.de/t/show-traktor-ratings-as-stars-in-comment-field/17667):
>
> Hello there, I read a lot in the forum, but until now i did not find an answer and I'm not familiar with scripting language. I rated all my music with tractor, but also like to use other DJ-software, like mixxx. No I recognized, that the rating of traktor is only shown in traktor. Traktor writes a field called "POLULARITY" and uses a special code for the rating: traktor@native-instruments.de|xxx|yyy xxx is for the rating and yyy for a playcount. The values of xxx are fixed to: 0 = no val…

---

<div class="post-metadata">

### Author: ![bascurtiz](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@bascurtiz](https://community.mp3tag.de/u/bascurtiz)
#### Post date: [July 30, 2018, 6:23pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/8 "2018-07-30T18:23:11Z")

</div>

> [@ohrenkino](#):
>
> cater f

Nope, that's not it.  
It's because Mp3tag is masking?  
When I check the file with dbpoweramp, it shows POPULARIMETER instead of RATING WMP:  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/d/d4ec747b01f66905003130bd8d31a05e776a6b4c.png)

---

<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 30, 2018, 6:28pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/9 "2018-07-30T18:28:49Z")

</div>

As far as I interpreted it, the format for the popularimeter is  
string bar number:  
xxx@yyy|51

---

<div class="post-metadata">

### Author: ![bascurtiz](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@bascurtiz](https://community.mp3tag.de/u/bascurtiz)
#### Post date: [July 30, 2018, 6:31pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/10 "2018-07-30T18:31:16Z")

</div>

It is... for mp3, not for FLAC.

But the point is, why is dbpoweramp showing POPULARIMETER and Mp3tag is showing RATING WMP?  
I bet the Mapping does some sort of masking.  
Hence in Traktor it tries to read out the RATING WMP, which isnt there. because POPULARIMETER is.

---

<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 30, 2018, 6:34pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/11 "2018-07-30T18:34:25Z")

</div>

Please note that there is only one field, called POPM, so all applications read the same field (if they read it at all).  
See e.g. the help on POPM:

> **[Tag Field Mappings – Mp3tag Documentation](https://docs.mp3tag.de/mapping/#popularimeter)**
>
> Overview of all available tag fields, their names in Mp3tag, and how they are mapped to the internal structures of the different tag formats. Mp3tag is the universal Tag Editor.

The problem is that different programs expect different data in that field.

---

<div class="post-metadata">

### Author: ![bascurtiz](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@bascurtiz](https://community.mp3tag.de/u/bascurtiz)
#### Post date: [July 30, 2018, 7:02pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/12 "2018-07-30T19:02:07Z")

</div>

Traktor wants the xxx@yyy|51 in POPM for MP3;  
Traktor wants 51 in POPM for FLAC.

That's the issue right?

Considering my older approach (using Energy level from MIK generated output in comment field), in order to make the stars show up, I have to go this route:  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/f/fb3f3ebeb25e93b6c4c9e39b86d3490f4747ab70.png)

And for FLAC, this route:  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/c/c37fab8b4ad1a62cef7fffdf86cc94144895e81e.png)

---

<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: [July 30, 2018, 7:02pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/13 "2018-07-30T19:02:24Z")

</div>

`POPULARIMETER` is the Mp3tag field name for the ID3v2 POPM frame. It has nothing to do with FLAC's VorbisComments and I strongly advise against adding such tags to FLAC files.

`RATING WMP` is an artificial Mp3tag field to be used with ID3v2 tags that adds an ID3v2 POPM frame in the format expected by Windows Media Player.

If you add mappings at "Options \> Tags \> Mappings" without knowing what you do, expect incompatibilities and lots of surprises.

To identify which field name is used by Traktor for the FLAC rating, just add a rating in Traktor on a new file and review the tags via the extended tag dialog at Alt + T in Mp3tag. I doubt that it's `RATING WMP` for FLAC.

---

<div class="post-metadata">

### Author: ![bascurtiz](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@bascurtiz](https://community.mp3tag.de/u/bascurtiz)
#### Post date: [July 30, 2018, 7:06pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/14 "2018-07-30T19:06:05Z")

</div>

I altered the amount of Stars in traktor, and opened the track in mp3tag.  
Looks like Traktor IS using RATING WMP however:

 ![image](https://community.mp3tag.de/uploads/default/original/2X/d/dd0a3b5a24ec128103e90c3dbb1f4c999183b1c8.png)

---

<div class="post-metadata">

### Author: ![bascurtiz](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@bascurtiz](https://community.mp3tag.de/u/bascurtiz)
#### Post date: [July 30, 2018, 7:09pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/15 "2018-07-30T19:09:30Z")

</div>

After d/ling a new track - not processed yet - analyzed in Traktor, gave it 1 star, same result:

 ![image](https://community.mp3tag.de/uploads/default/original/2X/2/2e6126b31e4d8fca061f524681440398a691ea74.png)

---

<div class="post-metadata">

### Author: ![bascurtiz](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@bascurtiz](https://community.mp3tag.de/u/bascurtiz)
#### Post date: [July 30, 2018, 7:11pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/16 "2018-07-30T19:11:01Z")

</div>

Since Traktor is using RATING WMP to define the amount of stars, is Mapping simply not an option?

---

<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: [July 30, 2018, 7:14pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/17 "2018-07-30T19:14:40Z")

</div>

Yes. If Traktor is using `RATING WMP` as field name (a real surprise to me), mapping the field to another field is not needed.

Have you tried using `RATING WMP` for both MP3 and FLAC files?

---

<div class="post-metadata">

### Author: ![bascurtiz](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@bascurtiz](https://community.mp3tag.de/u/bascurtiz)
#### Post date: [July 30, 2018, 7:17pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/18 "2018-07-30T19:17:38Z")

</div>

I doubt that that would be working, but i will try asap.  
For overall completeness, I d/led the mp3 variant of the same track too, and did same approach.  
Concluded: RATING WMP for FLAC and xxx@yyy.de|\*\* for MP3:  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/b/b96097b6400213852ece475b01a4283d5047cba0.png)

---

<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: [July 30, 2018, 7:19pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/19 "2018-07-30T19:19:44Z")

</div>

OK, it won't work then — Traktor is using a different format for the POPM ID3v2 frame than the one that is used by Mp3tag's ID3v2 RATING WMP.

---

<div class="post-metadata">

### Author: ![bascurtiz](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@bascurtiz](https://community.mp3tag.de/u/bascurtiz)
#### Post date: [July 30, 2018, 7:23pm UTC](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514/20 "2018-07-30T19:23:10Z")

</div>

Ok, it's getting stranger ...  
IT IS working!  
using RATING WMP for both mp3 and flac.

they show up in Traktor.  
Just the moment u close Traktor, it writes the xx@yy.de|\*\* to the mp3, while not to the FLAC =)

[Next page](https://community.mp3tag.de/t/if-flac-do-this-if-mp3-do-that/42514.md?page=2)
