# Edit Traktor POPULARIMETER value in mp3tag

**URL:** https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178
**Category:** Support
**Created:** [November 28, 2019, 12:44pm UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178 "2019-11-28T12:44:01Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![seb303](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/41988e/32.png) [@seb303](https://community.mp3tag.de/u/seb303)
#### Post date: [November 28, 2019, 12:44pm UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/1 "2019-11-28T12:44:01Z")

</div>

Hi,

I predominately DJ using Traktor (Pro 2) software, but when organising/tagging my music I tend to use mp3tag.

The main fields I use to organise my music are Genre, Comment & Rating (POPULARIMETER). The first 2 are easy, but Rating is a bit tricky to integrate.

As is documented in various places, Traktor stores rating in the POPM/POPULARIMETER field in the format:  
traktor@native-instruments.de|xxx|0  
with xxx being 0, 51, 102, 153, 204, 255 for 0 to 5 stars.  
(the POPM field may also be missing completely for 0 stars)

I've managed to get the Traktor star rating to display as an mp3tag column using this Value expression:

$repeat($char(9734),$if2($ifgreater($regexp(%popularimeter%,'^traktor@native-instruments.de|(\d{1,3})|\d+$',$1),204,5,$ifgreater($regexp(%popularimeter%,'^traktor@native-instruments.de|(\d{1,3})|\d+$',$1),153,4,$ifgreater($regexp(%popularimeter%,'^traktor@native-instruments.de|(\d{1,3})|\d+$',$1),102,3,$ifgreater($regexp(%popularimeter%,'^traktor@native-instruments.de|(\d{1,3})|\d+$',$1),51,2,$ifgreater($regexp(%popularimeter%,'^traktor@native-instruments.de|(\d{1,3})|\d+$',$1),0,1,))))),0))

However, I'm struggling to find a way to edit the Traktor Rating value using the mp3 Tag Panel. If I add the field POPULARIMETER then I can see the raw value "traktor@native-instruments.de|xxx|0" but what I really want is a dropdown with 0 to 5 stars or the numbers 0 to 5.

I'm not even sure this is possible, but knowing what a deep program mp3tag is, perhaps there is a way that I'm not aware of. I saw that there are some other application specific fields for rating: RATING\_MM, RATING\_WINAMP, RATING\_WMP. Perhaps these work as desired, but not for the Traktor specific format. Is there a way to configure a field such as "RATING\_TRAKTOR" ?

Seb

---

<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: [November 28, 2019, 1:51pm UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/2 "2019-11-28T13:51:39Z")

</div>

> [@seb303](#):
>
> what I really want is a dropdown with 0 to 5 stars or the numbers 0 to 5.

It is not possible to get user-defined values into the drop-down menus.  
So far, the usual advice is to create Actions of the type "Format value" (here for POPULARIMETER) that write the value.  
If you use the # as name separator in the actions names then you get a submenu, e.g.  
Traktor#0 stars  
Traktor#1 star  
Traktor#2 stars  
etc.

---

<div class="post-metadata">

### Author: ![Patch](https://community.mp3tag.de/user_avatar/community.mp3tag.de/patch/32/9350_2.png) [@Patch](https://community.mp3tag.de/u/Patch)
#### Post date: [November 29, 2019, 6:51pm UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/3 "2019-11-29T18:51:17Z")

</div>

Welcome, Seb.

I’m a Traktor user too, and MP3Tag is something I couldn’t do without for my library/collection management.

I’m gonna have to look into that method of showing Traktor Rating in MP3Tag. I’m currently using BeaTunes to get Traktor Rating into a readable and useable tag.

---

<div class="post-metadata">

### Author: ![seb303](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/41988e/32.png) [@seb303](https://community.mp3tag.de/u/seb303)
#### Post date: [November 29, 2019, 10:42pm UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/4 "2019-11-29T22:42:53Z")

</div>

Thanks @ohrenkino for that tip! Works perfectly 😀  
The submenu feature keeps things neat but I ended up not using this so as to keep the keystrokes to a minimum when using the menu shortcuts.

So now I can just press Alt+A then 0 to 5 to set the rating.

In case it helps anyone else, here are the action groups:  
[Traktor Rating actions.zip](https://community.mp3tag.de/uploads/short-url/tOaoGzuubsupQ2k6mNG4xRkOon6.zip) (1.4 KB)  
Just unzip into %userprofile%\AppData\Roaming\Mp3tag\data\actions

---

<div class="post-metadata">

### Author: ![seb303](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/41988e/32.png) [@seb303](https://community.mp3tag.de/u/seb303)
#### Post date: [November 29, 2019, 10:51pm UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/5 "2019-11-29T22:51:27Z")

</div>

> [@Patch](#):
>
> I’m gonna have to look into that method of showing Traktor Rating in MP3Tag. I’m currently using BeaTunes to get Traktor Rating into a readable and useable tag.

It's super easy to set up...

- Right click on column headings -\> Customize columns...
- Add a new column name = "Rating" or whatever
- Value =  
$repeat($char(9734),$if2($ifgreater($regexp(%popularimeter%,'traktor@native-instruments.de|(\d{1,3})|\d+',$1),204,5,$ifgreater($regexp(%popularimeter%,'traktor@native-instruments.de|(\d{1,3})|\d+',$1),153,4,$ifgreater($regexp(%popularimeter%,'traktor@native-instruments.de|(\d{1,3})|\d+',$1),102,3,$ifgreater($regexp(%popularimeter%,'traktor@native-instruments.de|(\d{1,3})|\d+',$1),51,2,$ifgreater($regexp(%popularimeter%,'traktor@native-instruments.de|(\d{1,3})|\d+',$1),0,1,))))),0))

Note the Value expression is slightly edited since my first post - I changed the regexp so it would work if there are multiple Ratings present from different software in the POPM field (not sure if this can happen, but just in case). I'm only interested in showing the Traktor rating. If you need to display ratings from other software as well, see this post:

> [@Column Script to Show POPM Ratings as "Stars"](https://community.mp3tag.de/t/column-script-to-show-popm-ratings-as-stars/11806):
>
> Hello folks, The latest version of Winamp (5.61) adds an option to store Mp3 ratings in the POPM tag in files. Since Mp3tag supports this field, I decided to add a custom column that would display the ratings properly. I wrote a script, but it turned into a monster (453 characters!). Perhaps someone here can help me simplify the logic in this and other scripts that use regular expressions to compare values. The attached screen shot shows the raw data in the center and the script output on t…

---

<div class="post-metadata">

### Author: ![Patch](https://community.mp3tag.de/user_avatar/community.mp3tag.de/patch/32/9350_2.png) [@Patch](https://community.mp3tag.de/u/Patch)
#### Post date: [November 30, 2019, 9:30am UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/6 "2019-11-30T09:30:37Z")

</div>

Cheers Seb. Do you use iTunes with Traktor?

---

<div class="post-metadata">

### Author: ![Patch](https://community.mp3tag.de/user_avatar/community.mp3tag.de/patch/32/9350_2.png) [@Patch](https://community.mp3tag.de/u/Patch)
#### Post date: [November 30, 2019, 1:11pm UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/7 "2019-11-30T13:11:42Z")

</div>

Seb - also, you’re going to run into issues when you change the Traktor Rating OUTSIDE of Traktor.

When you add a star rating in Traktor (first time) the rating gets stored in the .mp3 file (POPM) and it also gets stored in Traktors Collection (.xml).

If you change the POPM value in MP3Tag, the next time you open the .mp3 in Traktor, Traktor will take the Rating value from its own Collection.xml.

So you see - 2 different Ratings for the same .mp3 file...

---

<div class="post-metadata">

### Author: ![Crissov](https://community.mp3tag.de/user_avatar/community.mp3tag.de/crissov/32/6619_2.png) [@Crissov](https://community.mp3tag.de/u/Crissov)
#### Post date: [November 30, 2019, 1:28pm UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/8 "2019-11-30T13:28:40Z")

</div>

Does either of the following shorter codes work as well for you?

```auto
$repeat($char(9734),$mod($regexp(%popularimeter%,'traktor@native-instruments\.de|(\d{1,3})|\d+',$1),16))

```

```auto
$repeat($char(9734),$div($sub(
    $regexp(%popularimeter%,'traktor@native-instruments\.de|(\d{1,3})|\d+',$1),
    $mod($regexp(%popularimeter%,'traktor@native-instruments\.de|(\d{1,3})|\d+',$1), 51), 51
)))

```

---

<div class="post-metadata">

### Author: ![seb303](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/41988e/32.png) [@seb303](https://community.mp3tag.de/u/seb303)
#### Post date: [November 30, 2019, 2:29pm UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/9 "2019-11-30T14:29:00Z")

</div>

> [@Patch](#):
>
> Cheers Seb. Do you use iTunes with Traktor?

No, prefer to use more lightweight software. Outside of Traktor, I use Mp3tag and Media Player Classic to play/manage my collection. (Around the house I use Logitech Media Server to make the music accessible in different rooms and on different devices.)

---

<div class="post-metadata">

### Author: ![seb303](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/41988e/32.png) [@seb303](https://community.mp3tag.de/u/seb303)
#### Post date: [November 30, 2019, 2:49pm UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/10 "2019-11-30T14:49:22Z")

</div>

> [@Patch](#):
>
> If you change the POPM value in MP3Tag, the next time you open the .mp3 in Traktor, Traktor will take the Rating value from its own Collection.xml.

I haven't found this to be the case. You just need to do "Check Consistency" in Traktor, either on the whole collection or on the individual files. This will sync the tag data.

I don't think the extra Traktor info is stored in the collection.nml file by the way. I think it's also stored in the ID3 tag, in the private subdirectory under tag "TRAKTOR4". It's binary format, not very intelligible.

The only time I've had a problem with external ID3 tag changes not syncing back into Traktor is when you set a tag to empty, then Traktor will always prefer the previous value stored in the private tag. To get round this you have to "Delete from Collection" in Traktor, choosing option "additionally remove Traktor tags". Then when you next Import Music Folders it will reload the track, using only the standard ID3 tag data.

---

<div class="post-metadata">

### Author: ![seb303](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/41988e/32.png) [@seb303](https://community.mp3tag.de/u/seb303)
#### Post date: [November 30, 2019, 3:19pm UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/11 "2019-11-30T15:19:39Z")

</div>

> [@Crissov](#):
>
> Does either of the following shorter codes work as well for you?

Almost 🙂  
The 2nd expression just has the brackets in the wrong place. This works:

 ![Annotation%202019-11-30%20152207](https://community.mp3tag.de/uploads/default/original/2X/9/9f3fc2aea74d969c23c6031f1d2a20f6c9ee478a.png)  
OR:

`$repeat($char(9734),$div($sub($regexp(%popularimeter%,'traktor@native-instruments\.de\|(\d{1,3})\|\d+',$1),$mod($regexp(%popularimeter%,'traktor@native-instruments\.de\|(\d{1,3})\|\d+',$1),51)),51))`

Shame there's no function to round down a number, would have been even shorter.

---

<div class="post-metadata">

### Author: ![Patch](https://community.mp3tag.de/user_avatar/community.mp3tag.de/patch/32/9350_2.png) [@Patch](https://community.mp3tag.de/u/Patch)
#### Post date: [November 30, 2019, 3:21pm UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/12 "2019-11-30T15:21:44Z")

</div>

Interesting. Maybe I need to re-test the way Traktor handles metadata... My own testing was back on Traktor 2.11, so maybe things have changed in 3.

---

<div class="post-metadata">

### Author: ![seb303](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/41988e/32.png) [@seb303](https://community.mp3tag.de/u/seb303)
#### Post date: [November 30, 2019, 3:31pm UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/13 "2019-11-30T15:31:12Z")

</div>

I'm still using Traktor Pro v2 (v2.11.2 11)

---

<div class="post-metadata">

### Author: ![Patch](https://community.mp3tag.de/user_avatar/community.mp3tag.de/patch/32/9350_2.png) [@Patch](https://community.mp3tag.de/u/Patch)
#### Post date: [November 30, 2019, 7:29pm UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/14 "2019-11-30T19:29:50Z")

</div>

Just doing a bit of checking now, and you're absolutely right.

Is there a way to display the Traktor Rating value in a separate column, displayed as Stars?

☆ white star: **$char(9734)**

---

<div class="post-metadata">

### Author: ![seb303](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/41988e/32.png) [@seb303](https://community.mp3tag.de/u/seb303)
#### Post date: [November 30, 2019, 9:28pm UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/15 "2019-11-30T21:28:51Z")

</div>

> [@Patch](#):
>
> Is there a way to display the Traktor Rating value in a separate column, displayed as Stars?

- Right click on column headings -\> Customize columns...
- Add a new column with name = "Rating" or whatever
- Value =  
$repeat($char(9734),$div($sub($regexp(%popularimeter%,'traktor@native-instruments.de|(\d{1,3})|\d+',$1),$mod($regexp(%popularimeter%,'traktor@native-instruments.de|(\d{1,3})|\d+',$1),51)),51))

---

<div class="post-metadata">

### Author: ![Patch](https://community.mp3tag.de/user_avatar/community.mp3tag.de/patch/32/9350_2.png) [@Patch](https://community.mp3tag.de/u/Patch)
#### Post date: [December 1, 2019, 10:03am UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/16 "2019-12-01T10:03:51Z")

</div>

I’m loving this thread!!!

I’ve been using BeaTunes to get my Traktor rating OUT of the Traktor Collection.xml, and INTO iTunes Library.nml - this allows me to create iTunes SmartPlaylists based on my own Traktor Ratings...

Knowing now that I can view my own Traktor Rating in MP3Tag as “real” Star Ratings (Star Outline OR Filled Star!) saves me some switching between iTunes & MP3Tag. 👍🏻

---

<div class="post-metadata">

### Author: ![Patch](https://community.mp3tag.de/user_avatar/community.mp3tag.de/patch/32/9350_2.png) [@Patch](https://community.mp3tag.de/u/Patch)
#### Post date: [December 2, 2019, 10:31pm UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/17 "2019-12-02T22:31:26Z")

</div>

Any way to get the Star Rating (displayed as Stars) to show up in the tag panel?

---

<div class="post-metadata">

### Author: ![clsven7](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/ecae2f/32.png) [@clsven7](https://community.mp3tag.de/u/clsven7)
#### Post date: [November 30, 2020, 6:30am UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/18 "2020-11-30T06:30:14Z")

</div>

The last code from seb303 works only partial for MusicBee player. I adjusted it a little bit to

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

However %popularimeter% values like

MusicBee|1|0

are NOT converted to 1 Star. Can the value expression be corrected?

However I found some other, old %popularimeter% values from other players in the past:

Easy CD-DA Extractor|255

So my questions: Can the "repeat()" value be more general and cover all possible player/software labels?

As you can see in my "Easy CD-DA Extractor" sample above the original value lacks of the second vertical line and the third value. Could this have a negative impact on the repeat() expression and star calculation?

---

<div class="post-metadata">

### Author: ![seb303](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/41988e/32.png) [@seb303](https://community.mp3tag.de/u/seb303)
#### Post date: [November 30, 2020, 10:01am UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/19 "2020-11-30T10:01:26Z")

</div>

You can have alternative regexp matches by using the | operator within ().

e.g.  
`(MusicBee|Easy CD-DA Extractor)|(\d{1,3})(\|\d+|)`

Matches:  
MusicBee|1|0  
and  
Easy CD-DA Extractor|255

Note that the first value 1 or 255 will now be in $2 (not $1)  
The `{1,3}` means to match 1 to 3 occurrences of the preceding item, digits in this case.

Note also that within () you have to escape | if you want to match a literal |  
e.g. `(\|\d+|)` matches either "| followed by 1 or more digits" or nothing.

---

<div class="post-metadata">

### Author: ![Patch](https://community.mp3tag.de/user_avatar/community.mp3tag.de/patch/32/9350_2.png) [@Patch](https://community.mp3tag.de/u/Patch)
#### Post date: [November 30, 2020, 12:55pm UTC](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178/20 "2020-11-30T12:55:55Z")

</div>

But, still no way to get Star Rating (as ⭐’s) to show up in the tag panel?

[Next page](https://community.mp3tag.de/t/edit-traktor-popularimeter-value-in-mp3tag/47178.md?page=2)
