iTunes & Traktor Collection
I’m using BeaTunes and love it.
I’ve been searching for a long time for a way to manipulate the metadata that Traktor creates and stores in iTunes.
For example - I’d love to create an iTunes smart playlist that is based on the number of times a track has been played in Traktor.
It would mean comparing the Traktor Collection .xml with the iTunes Library .xml, and updating the iTunes .nml with the Traktor playcount from the Collection .xml.
Could BeaTunes be the bridge that sits between Traktor and iTunes, to allow us to manipulate the Traktor metadata in iTunes???
Showing page 4 out of 4. View the first page
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
91 Posted by Patch on 28 May, 2019 11:37 AM
Can we apply any "rounding" to the conversion from Traktor Ranking to Beatunes Ratings?
I'm noticing some errors where Beatunes support 1/2 stars and Traktor does not...
Support Staff 92 Posted by hendrik on 28 May, 2019 11:38 AM
Sure—you just have to make sure you convert the 0-255 values to the range 0-100.
93 Posted by Patch on 28 May, 2019 11:47 AM
That is done, using the syntax that you kindly provided above.
But, I'm seeing some differences between the rating in the actual .mp3 file, and the rating shown in Beatunes. There is sometimes a 1/2 star difference...
Support Staff 94 Posted by hendrik on 28 May, 2019 12:06 PM
beaTunes renders stars based on the range 0-100:
You can easily implement some custom mapping by changing this
to something like this:
Obviously you need to adjust this to your custom ranges.
95 Posted by Patch on 28 May, 2019 06:47 PM
What have I done wrong here???
int traktorRating = Integer.valueOf(ranking.getValue()
int r = 0
if (traktorRating < 1) {
r = 0
} else if (traktorRating < 51) {
r = 20
} else if (traktorRating < 102) {
r = 40
} else if (traktorRating < 153) {
r = 60
} else if (traktorRating < 204) {
r = 80
} else if (traktorRating < 255) {
r = 100
}
song.setRating(r)
Support Staff 96 Posted by hendrik on 28 May, 2019 07:52 PM
There‘s a parenthesis missing at the end of the first line.
97 Posted by Patch on 29 May, 2019 10:56 AM
It works! But somethings still not right. I’m getting different values between Traktor & BeaTunes.
98 Posted by Patch on 29 May, 2019 11:31 AM
This looks helpful. I’ll have a look tonight:
The following list details how Windows Explorer reads and writes the POPM frame:
224–255 = 5 stars when READ with Windows Explorer, writes 255
160–223 = 4 stars when READ with Windows Explorer, writes 196
096-159 = 3 stars when READ with Windows Explorer, writes 128
032-095 = 2 stars when READ with Windows Explorer, writes 64
001-031 = 1 star when READ with Windows Explorer, writes 1
Support Staff 99 Posted by hendrik on 30 May, 2019 07:32 AM
Yeah.. I remember Explorer doing something crazy like that...
100 Posted by Patch on 01 Jun, 2019 04:25 PM
Hendrik - does Beatunes have any issues with special characters?
I've had a stumble when using tags in a Wendy Rene track, and I traced it to the accent on the 2nd "e" in Rene (é).
When I removed it, the errors disappeared. It might be iTunes, or BeaTunes or Traktor that doesn't like special characters...
Can you rule out Beatunes?
Support Staff 101 Posted by hendrik on 01 Jun, 2019 05:05 PM
I’m not aware of any issues.
Support Staff 102 Posted by hendrik on 01 Jun, 2019 05:34 PM
Just FYI: I will be traveling during the next 3 weeks and won’t be able to answer quickly.
103 Posted by Patch on 01 Jun, 2019 06:14 PM
Thanks for the heads-up! Travelling for pleasure I hope?
Support Staff 104 Posted by hendrik on 01 Jun, 2019 06:21 PM
Yep!
105 Posted by Patch on 01 Jun, 2019 06:56 PM
Have fun mate.
I promise I won't save up all my questions for when you return! X-)
106 Posted by Patch on 01 Jun, 2019 07:55 PM
Well, goddamnit. It looks like I've cracked this!!!
But I'm very confused - because the code I've written doesn't really corelate with what I think should happen???
I am ONLY applying * ratings tag in TRAKTOR. That is, I click on the graphical star rating in Traktor (to assign 0 - 5 *'s), and Traktor then writes the corresponding value to the Collection.nml, like this:
1* = RANKING="51"
2* = RANKING="102"
3* = RANKING="153"
4* = RANKING="204"
5* = RANKING="255"
Traktor also writes that to the POPM tag in each.mp3 file as:
1* = [email blocked]|51|0
2* = [email blocked]|102|0
3* = [email blocked]|153|0
4* = [email blocked]|204|0
5* = [email blocked]|255|0
To get the RANKING value into BeaTunes and iTunes, we read from the .nml, then convert to Beatunes own star rating values. Believe it or not, I came to the values (<001, <070, <103, <154, <205, <256) for traktorRating using a bit of trial and error:
if (ranking != null) {
log.debug("Setting rating/ranking for " + song + ": " + ranking.getValue())
// convert string with 0-255 to integer with 0-100:
int traktorRating = Integer.valueOf(ranking.getValue())
int r = 0
if (traktorRating < 001) {
r = 0
} else if (traktorRating < 070) {
(1* =) r = 20
} else if (traktorRating < 103) {
(2* =) r = 40
} else if (traktorRating < 154) {
(3* =) r = 60
} else if (traktorRating < 205) {
(4* =) r = 80
} else if (traktorRating < 256) {
(5* =) r = 100
}
So now, I apply the rating as a graphical star value in Traktor, that gets copied to the Traktor Collection.nml as an integer, then it gets converted in BeaTunes to the corresponding Beatunes/iTunes integer for those * ratings, and, <<<SOMEHOW>>> the POPM tag in the .mp3 also files gets updated to:
1* = [email blocked]|23
2* = [email blocked]|64
3* = [email blocked]|128
4* = [email blocked]|196
5* = [email blocked]|252
You'll notice that the "|0" from the end of the POPM tag (indicating playcount) is gone at this point. It doesn't matter.
Those final "[email blocked]|xxx" values in the POPM tag synchronises the * ratings in Traktor, Beatunes/iTunes, and WE!!! (VICTORY!)
But - I don't understand why?!? (At this point part of me is saying "Don't worry! It works! Just forget about it!", but if I don't understand WHY it's happening, if it is wrong, I won't *know* it's wrong...)
The only thing I can think of, is Beatunes is assigning a number within a range, and not a specific integer when doing the conversion. What I mean is, for 1*, where I think BeaTunes is assigning a value of r = 20 here:
} else if (traktorRating < 070) {
r = 20
}
Is it actually assigning r = 23 (from the range 0 to 69) for some reason, and writing that to BeaTunes/iTunes AND the .mp3 file?
107 Posted by drvenom on 21 Jul, 2022 12:18 AM
Based on this convo, I'm guessing there is no easy way to have Beatunes and Traktor communicate the rating of songs? That's what I'm looking for, something like beatunes to organize my library, and that traktor can read the data written on files. Traktor reads the comments column from beatunes, but it doesn't seem to read the rating (stars). I'm I doing something wrong, or is this just not something that is currently possible?
Support Staff 108 Posted by hendrik on 22 Jul, 2022 08:13 AM
Yes, that's probably true.
I cannot really comment on what Traktor can or cannot do. beaTunes writes ratings, perhaps Traktor needs to re-scan the files to read those ratings. But it's entirely possible it simply can't do it.