Edit Traktor POPULARIMETER value in mp3tag

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

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.

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.

Thanks @ohrenkino for that tip! Works perfectly :grinning:
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 (1.4 KB)
Just unzip into %userprofile%\AppData\Roaming\Mp3tag\data\actions

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:

Cheers Seb. Do you use iTunes with Traktor?

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

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

$repeat($char(9734),$mod($regexp(%popularimeter%,'traktor@native-instruments\.de|(\d{1,3})|\d+',$1),16))
$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
)))

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.)

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.

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


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.

1 Like

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.

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

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)

  • 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))
1 Like

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. :+1:t2:

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