# Transform rating stars into values and vice versa

**URL:** <https://community.mp3tag.de/t/transform-rating-stars-into-values-and-vice-versa/63069>\
**Category:** Support\
**Created:** [December 12, 2023, 6:38am UTC](https://community.mp3tag.de/t/transform-rating-stars-into-values-and-vice-versa/63069 "2023-12-12T06:38:33Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![rama](https://community.mp3tag.de/user_avatar/community.mp3tag.de/rama/32/10166_2.png) [@rama](https://community.mp3tag.de/u/rama)\
**Post date:** [December 15, 2023, 7:37am UTC](https://community.mp3tag.de/t/transform-rating-stars-into-values-and-vice-versa/63069/21 "2023-12-15T07:37:07Z")

</div>

> [@ohrenkino](#):
>
> As this whole topic takes a lot of effort - is it really worth it?

hi @ohrenkino  
I guess you did the point , i'm asking if it's really worth it , seeing the a music collection could be pretty huge.

> But in any case - if you have 4,000 files in the best category ... does this really help?  
> Or would a playlist for a dedicted purpose be of a much higher value?

I would like to uniform the rating tags , since many audio applications do use different rating values ,like foobar2000 (the auto playlist "smart playlist" are not so easy to create i'm talking about the rules ,there is not a gui) , musicbee , aimp , media monkey (V4 is even better)  
I use musicbee for smart playlist and foobar2000 for others , both great audio player  
May I ask you what software do you use?

> Or in short: I would create playlists.  
> But, of course, this is a very individual decision.

well to create a playlist or even a smart playlist , would be a good idea ,but i don't think I could export a musicbee smartplayst to foobar  
do you use mp3tag to uniform some tags with mp3tag?

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:** [December 15, 2023, 7:55am UTC](https://community.mp3tag.de/t/transform-rating-stars-into-values-and-vice-versa/63069/22 "2023-12-15T07:55:54Z")

</div>

> [@rama](#):
>
> smart playlist" are not so easy to create

I use mainly foobar as player.  
You are right that every player has its own ways to maintain automatic playlists.

In Foobar you simply create a filter (which has a very similar syntax as the MP3tag filter has - and vice versa) and then, depending on where you applied the filter, there is a function to create an automatic playlist from the result.  
An example for a filter could be:  
`%album% HAS Abba AND %rating% IS 3`

In general: I do not use any other program to modify tags than MP3tag.  
I use Foobar as player for the whole collection as this program can deal with more than just 20,000 files as WMP does.

Non-automatic, hard-coded playlists should be exportable as m3u or m3u8 format by the respective player ... and if that does not work: you can drag&drop any collection of files from foobar into MP3tag and create the playlist there.

---

<div class="post-metadata">

**Author:** ![rama](https://community.mp3tag.de/user_avatar/community.mp3tag.de/rama/32/10166_2.png) [@rama](https://community.mp3tag.de/u/rama)\
**Post date:** [December 15, 2023, 2:49pm UTC](https://community.mp3tag.de/t/transform-rating-stars-into-values-and-vice-versa/63069/23 "2023-12-15T14:49:13Z")

</div>

@ohrenkino @LyricsLover  
Hi  
I just wanted to test the action with mp3 for other forum users and it doesn't work  
it does change from  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/4/4220e421afedc35217045bcf282c2b266e28d074.png)  
to  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/c/c7d0f496a306577357a75332ae1560c1c6d4be6a.png)

and the action is

```auto
[#0]
T=5
1=$ifgreater($regexp(%popularimeter%,.*\\|(\\d+)\\|.*,$1),254,10,$ifgreater($regexp(%popularimeter%,.*\\|(\\d+)\\|.*,$1),241,9,$ifgreater($regexp(%popularimeter%,.*\\|(\\d+)\\|.*,$1),195,8,$ifgreater($regexp(%popularimeter%,.*\\|(\\d+)\\|.*,$1),185,7,$ifgreater($regexp(%popularimeter%,.*\\|(\\d+)\\|.*,$1),127,6,$ifgreater($regexp(%popularimeter%,.*\\|(\\d+)\\|.*,$1),117,5,$ifgreater($regexp(%popularimeter%,.*\\|(\\d+)\\|.*,$1),63,4,$ifgreater($regexp(%popularimeter%,.*\\|(\\d+)\\|.*,$1),53,3,$ifgreater($regexp(%popularimeter%,.*\\|(\\d+)\\|.*,$1),12,1,$ifgreater($regexp(%popularimeter%,.*\\|(\\d+)\\|.*,$1),0,2,0))))))))))
F=POPULARIMETER

```

---

<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:** [December 15, 2023, 2:56pm UTC](https://community.mp3tag.de/t/transform-rating-stars-into-values-and-vice-versa/63069/24 "2023-12-15T14:56:36Z")

</div>

> [@rama](#):
>
> and it doesn't work

What did you expect it should do?  
According to the code, any value greater than 254 is replaced with 10 - and to me 255 is greater than 254 and the result is "10".

---

<div class="post-metadata">

**Author:** ![rama](https://community.mp3tag.de/user_avatar/community.mp3tag.de/rama/32/10166_2.png) [@rama](https://community.mp3tag.de/u/rama)\
**Post date:** [December 15, 2023, 3:14pm UTC](https://community.mp3tag.de/t/transform-rating-stars-into-values-and-vice-versa/63069/25 "2023-12-15T15:14:19Z")

</div>

Hi @ohrenkino  
just populate the %rating% or %popularimeter% from 5 to 0 , like the @LyricsLover screenshots  
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:** [December 15, 2023, 3:24pm UTC](https://community.mp3tag.de/t/transform-rating-stars-into-values-and-vice-versa/63069/26 "2023-12-15T15:24:43Z")

</div>

Just to get this right: the valid format for POPULARIMETER is:  
Syntax: `Email|Rating|Playcounter`  
As shown in the documentation:

> **[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.

Any player that uses the field POPULARIMETER has to interpret that data.  
Unfortunately, every player seems to do its own thing: Musicbee shows a "10" and Foobar a "5" for the value 255 in the raw data.  
Also, Foobar labels the POPM field (which MP3tag calls POPULARIMETER) as . I don't know what Musicbee calls it.  
So, if you replace a 255 with a 10 in MP3tag, you actually set a new value.  
If you also set MP3tag to take this new value to be interpreted for rating so that it looks like 5 stars or a 10, then, when writing the tag data, MP3tag will transform that string of stars or number to a value that complies with the format for the POPM field.  
This is all rather complicated.  
And that is why I recommend to treat the rating only with the raw values and not the interpreted ones.  
if you also follow that line, then do not use any $ifgreater() but only the pure field name.

---

<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:** [December 15, 2023, 3:30pm UTC](https://community.mp3tag.de/t/transform-rating-stars-into-values-and-vice-versa/63069/27 "2023-12-15T15:30:12Z")

</div>

> [@ohrenkino](#):
>
> I don't know what Musicbee calls it.

POPM (in the song itself with the Addition `MusicBee`).  
Foobar is adding `Windows Media Player 9 Series` to POPM in the song itself.

To illustrate

> [@ohrenkino](#):
>
> MP3tag will transform that string of stars or number to a value that complies with the format for the POPM field.

@rama could read this topic with screenshots:

> [@Set rating for import in VirtualDJ](https://community.mp3tag.de/t/set-rating-for-import-in-virtualdj/60352/14):
>
> Addendum, 13.03.2023, 16.30 Uhr: There is an additional way to apply the star rating using "[Custom list values](https://docs.mp3tag.de/customization/tag-panel/#editing-fields)" for the Field POPULARIMETER that let you choose your own unicode stars like ★ from a drop-down-box in the Tag Panel. All you need is to add a new field to your Tag Panel like this (you can name it as you like, in this example it's called POPM): This allows you to choose the stars for your selected tracks from the POPM drop down box in the Tag Panel: […

---

<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:30pm UTC](https://community.mp3tag.de/t/transform-rating-stars-into-values-and-vice-versa/63069/28 "2026-02-09T12:30:12Z")

</div>



[Previous page](https://community.mp3tag.de/t/transform-rating-stars-into-values-and-vice-versa/63069.md?page=1)
