tag:help.beatunes.com,2009-07-24:/discussions/suggestions/3212-itunes-traktor-collectionbeaTunes: Discussion 2022-07-22T08:13:04Ztag:help.beatunes.com,2009-07-24:Comment/444907812019-05-28T11:37:35Z2019-05-28T11:37:37ZiTunes & Traktor Collection<div><p>Can we apply any "rounding" to the conversion from Traktor Ranking to Beatunes Ratings?</p>
<p>I'm noticing some errors where Beatunes support 1/2 stars and Traktor does not...</p></div>Patchtag:help.beatunes.com,2009-07-24:Comment/444907812019-05-28T11:38:49Z2019-05-28T11:38:49ZiTunes & Traktor Collection<div><p>Sure—you just have to make sure you convert the 0-255 values to the range 0-100.</p></div>hendriktag:help.beatunes.com,2009-07-24:Comment/444907812019-05-28T11:47:11Z2019-05-28T11:47:11ZiTunes & Traktor Collection<div><p>That is done, using the syntax that you kindly provided above.</p>
<p>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...</p></div>Patchtag:help.beatunes.com,2009-07-24:Comment/444907812019-05-28T12:06:09Z2019-05-28T12:06:09ZiTunes & Traktor Collection<div><p>beaTunes renders stars based on the range 0-100:</p>
<ul>
<li>0-9: 0 stars</li>
<li>10-19: 0.5 stars</li>
<li>20-29: 1 stars</li>
<li>30-39: 1.5 stars</li>
<li>40-49: 2 stars</li>
<li>50-59: 2.5 stars</li>
<li>60-69: 3 stars</li>
<li>70-79: 3.5 stars</li>
<li>80-89: 4 stars</li>
<li>90-99: 4.5 stars</li>
<li>100: 5 stars</li>
</ul>
<p>You can easily implement some custom mapping by changing this</p>
<pre>
<code>int r = java.lang.Math.round(Integer.valueOf(ranking.getValue()) / 2.55f)
song.setRating(r)</code>
</pre>
<p>to something like this:</p>
<pre>
<code>int traktorRating = Integer.valueOf(ranking.getValue()
int r = 0
if (traktorRating < 10) {
r = 0
} else if (traktorRating < 20) {
r = 10
} else if (traktorRating < 30) {
[...]
}
song.setRating(r)</code>
</pre>
<p>Obviously you need to adjust this to your custom ranges.</p></div>hendriktag:help.beatunes.com,2009-07-24:Comment/444907812019-05-28T18:47:33Z2019-05-28T18:47:34ZiTunes & Traktor Collection<div><p>What have I done wrong here???</p>
<p>int traktorRating = Integer.valueOf(ranking.getValue()<br>
int r = 0<br>
if (traktorRating < 1) {<br>
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)</p></div>Patchtag:help.beatunes.com,2009-07-24:Comment/444907812019-05-28T19:52:44Z2019-05-28T19:52:44ZiTunes & Traktor Collection<div><p>There‘s a parenthesis missing at the end of the first line.</p></div>hendriktag:help.beatunes.com,2009-07-24:Comment/444907812019-05-29T10:56:47Z2019-05-29T10:56:48ZiTunes & Traktor Collection<div><p>It works! But somethings still not right. I’m getting different values between Traktor & BeaTunes.</p></div>Patchtag:help.beatunes.com,2009-07-24:Comment/444907812019-05-29T11:31:22Z2019-05-29T11:31:24ZiTunes & Traktor Collection<div><p>This looks helpful. I’ll have a look tonight:</p>
<p>The following list details how Windows Explorer reads and writes the POPM frame:</p>
<p>224–255 = 5 stars when READ with Windows Explorer, writes 255<br>
160–223 = 4 stars when READ with Windows Explorer, writes 196<br>
096-159 = 3 stars when READ with Windows Explorer, writes 128<br>
032-095 = 2 stars when READ with Windows Explorer, writes 64<br>
001-031 = 1 star when READ with Windows Explorer, writes 1</p></div>Patchtag:help.beatunes.com,2009-07-24:Comment/444907812019-05-30T07:32:48Z2019-05-30T07:32:48ZiTunes & Traktor Collection<div><p>Yeah.. I remember Explorer doing something crazy like that...</p></div>hendriktag:help.beatunes.com,2009-07-24:Comment/444907812019-06-01T16:25:13Z2019-06-01T16:25:14ZiTunes & Traktor Collection<div><p>Hendrik - does Beatunes have any issues with special characters?</p>
<p>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 (é).</p>
<p>When I removed it, the errors disappeared. It might be iTunes, or BeaTunes or Traktor that doesn't like special characters...</p>
<p>Can you rule out Beatunes?</p></div>Patchtag:help.beatunes.com,2009-07-24:Comment/444907812019-06-01T17:05:38Z2019-06-01T17:05:38ZiTunes & Traktor Collection<div><p>I’m not aware of any issues.</p></div>hendriktag:help.beatunes.com,2009-07-24:Comment/444907812019-06-01T17:34:44Z2019-06-01T17:34:44ZiTunes & Traktor Collection<div><p>Just FYI: I will be traveling during the next 3 weeks and won’t be able to answer quickly.</p></div>hendriktag:help.beatunes.com,2009-07-24:Comment/444907812019-06-01T18:14:07Z2019-06-01T18:14:08ZiTunes & Traktor Collection<div><p>Thanks for the heads-up! Travelling for pleasure I hope?</p></div>Patchtag:help.beatunes.com,2009-07-24:Comment/444907812019-06-01T18:21:21Z2019-06-01T18:21:21ZiTunes & Traktor Collection<div><p>Yep!</p></div>hendriktag:help.beatunes.com,2009-07-24:Comment/444907812019-06-01T18:56:08Z2019-06-01T18:56:10ZiTunes & Traktor Collection<div><p>Have fun mate.</p>
<p>I promise I won't save up all my questions for when you return! X-)</p></div>Patchtag:help.beatunes.com,2009-07-24:Comment/444907812019-06-01T19:55:08Z2019-06-01T19:55:10ZiTunes & Traktor Collection<div><p>Well, goddamnit. It looks like I've cracked this!!!</p>
<p>But I'm very confused - because the code I've written doesn't really corelate with what I think should happen???</p>
<p>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:</p>
<p>1* = RANKING="51"<br>
2* = RANKING="102"<br>
3* = RANKING="153"<br>
4* = RANKING="204"<br>
5* = RANKING="255"</p>
<p>Traktor also writes that to the POPM tag in each.mp3 file as:</p>
<p>1* = <a href="mailto:traktor@native-instruments.de">traktor@native-instruments.de</a>|51|0<br>
2* = <a href="mailto:traktor@native-instruments.de">traktor@native-instruments.de</a>|102|0<br>
3* = <a href="mailto:traktor@native-instruments.de">traktor@native-instruments.de</a>|153|0<br>
4* = <a href="mailto:traktor@native-instruments.de">traktor@native-instruments.de</a>|204|0<br>
5* = <a href="mailto:traktor@native-instruments.de">traktor@native-instruments.de</a>|255|0</p>
<p>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:</p>
<p>if (ranking != null) {<br>
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 }</p>
<p>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, <<>> the POPM tag in the .mp3 also files gets updated to:</p>
<p>1* = <a href="mailto:traktor@native-instruments.de">traktor@native-instruments.de</a>|23<br>
2* = <a href="mailto:traktor@native-instruments.de">traktor@native-instruments.de</a>|64<br>
3* = <a href="mailto:traktor@native-instruments.de">traktor@native-instruments.de</a>|128<br>
4* = <a href="mailto:traktor@native-instruments.de">traktor@native-instruments.de</a>|196<br>
5* = <a href="mailto:traktor@native-instruments.de">traktor@native-instruments.de</a>|252</p>
<p>You'll notice that the "|0" from the end of the POPM tag (indicating playcount) is gone at this point. It doesn't matter.</p>
<p>Those final "<a href="mailto:traktor@native-instruments.de">traktor@native-instruments.de</a>|xxx" values in the POPM tag synchronises the * ratings in Traktor, Beatunes/iTunes, and WE!!! (VICTORY!)</p>
<p>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 <em>know</em> it's wrong...)</p>
<p>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:</p>
<p>} else if (traktorRating < 070) { r = 20 }</p>
<p>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?</p></div>Patchtag:help.beatunes.com,2009-07-24:Comment/444907812022-07-21T00:18:55Z2022-07-21T00:19:00ZiTunes & Traktor Collection<div><p>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?</p></div>drvenomtag:help.beatunes.com,2009-07-24:Comment/444907812022-07-22T08:13:03Z2022-07-22T08:13:03ZiTunes & Traktor Collection<div><blockquote>
<p>Based on this convo, I'm guessing there is no easy way to have Beatunes and Traktor communicate the rating of songs?</p>
</blockquote>
<p>Yes, that's probably true.</p>
<blockquote>
<p>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?</p>
</blockquote>
<p>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.</p></div>hendrik