# Edit Traktor POPULARIMETER value in mp3tag

None that I've found

I have to revert to this thread.

I used the following formula (slightly adjusted from this thread) to convert POPM Rating (from MusicBee) to stars:

\$repeat(\$char(9734),\$div(\$sub(\$regexp(%popularimeter%,'MusicBee|(\d{1,3})|\d+',\$1),\$mod(\$regexp(%popularimeter%,'MusicBee|(\d{1,3})|\d+',\$1),51)),51))

With this formula the following conversions (from pattern MusicBee|<points>|0) are performed:

1 point = 0 star
64 points = 1 stars
128 points = 2 stars
196 points = 3 stars
255 points = 5 stars

However according to the "official" values from WMP and mediamonkey from thisWikipedia web page:

the mapping should be:

1 point = 1 star
64 points = 2 stars
128 points = 3 stars
196 points = 4 stars
255 points = 5 stars

So how do I have to adjust the formula above to get the official, real 1,....,5 numbers (resp stars)?

No solution for that?

`\$repeat(\$char(9734),\$div(\$sub(\$regexp(%popularimeter%,'MusicBee|(\d{1,3})|\d+',\$1),\$mod(\$regexp(%popularimeter%,'MusicBee|(\d{1,3})|\d+',\$1),64)),64))`

doesn't match in my environment. I get one star more every 51 points, not every 64 points.

Maybe you can adjust this more obvious example for you?

If everything else fails: you could write a format string with
`\$replace(\$regexp(%popularimeter%,.*\|(\d+)\|.*,\$1),255,*****,196,****,128,***,64,**,1,*)`

This works!
Thank you

I improved it just a little bit more by replacing the tiny by more beautiful stars:

`\$replace(\$regexp(%popularimeter%,.*\|(\d+)\|.*,\$1),255,\$char(9734)\$char(9734)\$char(9734)\$char(9734)\$char(9734),196,\$char(9734)\$char(9734)\$char(9734)\$char(9734),128,\$char(9734)\$char(9734)\$char(9734),64,\$char(9734)\$char(9734),1,\$char(9734))`

Disappointing that users have to invent such a function.
Since the popularimeter values are standard

see: ID3 - Wikipedia

....Mp3Tag should out-of-the-box offer a corresponding built-in conversion/replacement

I am not sure about that.
I take that you have seen in the linked article
"The frame is called POPM and Windows Explorer, Windows Media Player, Winamp, foobar2000, MediaMonkey, and other software all map roughly the same ranges of 0–255 to a 0–5 stars value for display."
And MP3tag shows you much better than any of the mentioned programs the true contents of POPM - I have never seen the values for email or play count (which are also part of the correct POPM syntax) in the named programs.
Please note that MP3tag allows to input ratings as stars, single digit numbers or in the raw format.

1 Like