Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: DADA Auto-Rating (DAR) for foobar2000 (Read 84605 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

DADA Auto-Rating (DAR) for foobar2000

Reply #125
@ MyMaster -- as per tpijag, no more CAPS!

I'm busy with work at present - so I can't go into this in depth. Everything I'm saying is actually covered in this thread (I'd read the whole thread to get a good idea of the code and its workings):

1) What you're talking about really is a limitation of foo_playcount and I've brought this up numerous times (i.e. considering a 45min track played after 1 min, is like leaving a film after 2 mins and saying you've seen it).

2) This is the essence of the duration calculation:

Quote
((%length_seconds% + 540) * 0.25)
Notice if you put 180 (i.e. 3 mins) into that you get 180, if you put anything less it will gain and anything more will lose. So all track durations move to some degree toward 180 secs.


Here's the bit of code we're talking about (I've bolded the variable you could play with):

Quote
$puts(l,%length_seconds%)
$puts(lib0,$date_diff(2000))
$puts(lib1,$div($add($mul($sub(100,$div($date_diff(%added%),$div($get(lib0),100))),15),2600),30))
$puts(d0,$ifgreater($get(l),3599,$muldiv(9000,$get(l),3600),9000))
$puts(d1,$muldiv($add($get(l),540),1,4))
$puts(d2,$muldiv($get(l),$get(l),$get(d0)))
$puts(d3,$add($get(d1),$get(d2)))



Have a look at this graph (notice top left is the part of the code you need to edit, and some alternative are even offered up -- see the key to the right) -- the graph shows their effect of ratings)



If you want to completely cancel the effect of duration, which kind of defeats the point of DAR, then simply change this line of code:

From:
Code: [Select]
$puts(l,%length_seconds%)


To:
Code: [Select]
$puts(l,180)


If you want to weaken the effect of duration, try:
EDIT: This is the "Very Weak Duration Effect" (in the graph above):

Code: [Select]
$puts(l,%length_seconds%)
$puts(lib0,$date_diff(2000))
$puts(lib1,$div($add($mul($sub(100,$div($date_diff(%added%),$div($get(lib0),100))),15),2600),30))
$puts(d0,$ifgreater($get(l),3599,$muldiv(20000,$get(l),3600),20000))
$puts(d1,$muldiv($add($get(l),720),1,5))
$puts(d2,$muldiv($get(l),$get(l),$get(d0)))
$puts(d3,$add($get(d1),$get(d2)))


Also read this:
http://www.giantpygmy.net/gpa/data/uploads..._dar_v1.6.4.txt

ps. You were lucky -- this didn't take too long.

C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #126
Also MyMaster see this post:
http://www.hydrogenaudio.org/forums/index....st&p=731183

This may also be of interest:

Quote
DAR 1.6.4:
Changed the old track suppression multiplier from a static to a dynamic variable.
This reduces the "performance burden" of older tracks with each additional year in the collection.
The lib0 variable can be altered for those with very large or small collections.

For a library of less than 5000 tracks I'd recommend 1900 (which will be close to the DAR 1.6.3 default) or 1950.
For most the default (2000) will work very well.

If you have a large 30k+ library AND you are seeing newer tracks dominating the ratings,
try increasing the lib0 to 2001, then 2002 etc... but do not go beyond the age of your oldest track.
So, if your stats begin in 2007, the max for the lib0 variable will be 2007.
I would suggest that to go to the maximum (i.e. in this example, 2007) would only be appropriate for users
with a very large music collection (say, in the 50k+ region).

Relevant line to edit: $puts(lib0,$date_diff(2000))


C.

PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #127
@ MyMaster -- as per tpijag, no more CAPS!

I'm busy with work at present - so I can't go into this in depth. Everything I'm saying is actually covered in this thread (I'd read the whole thread to get a good idea of the code and its workings):

1) What you're talking about really is a limitation of foo_playcount and I've brought this up numerous times (i.e. considering a 45min track played after 1 min, is like leaving a film after 2 mins and saying you've seen it).

2) This is the essence of the duration calculation:

Quote
((%length_seconds% + 540) * 0.25)
Notice if you put 180 (i.e. 3 mins) into that you get 180, if you put anything less it will gain and anything more will lose. So all track durations move to some degree toward 180 secs.


Here's the bit of code we're talking about (I've bolded the variable you could play with):

Quote
$puts(l,%length_seconds%)
$puts(lib0,$date_diff(2000))
$puts(lib1,$div($add($mul($sub(100,$div($date_diff(%added%),$div($get(lib0),100))),15),2600),30))
$puts(d0,$ifgreater($get(l),3599,$muldiv(9000,$get(l),3600),9000))
$puts(d1,$muldiv($add($get(l),540),1,4))
$puts(d2,$muldiv($get(l),$get(l),$get(d0)))
$puts(d3,$add($get(d1),$get(d2)))



Have a look at this graph (notice top left is the part of the code you need to edit, and some alternative are even offered up -- see the key to the right) -- the graph shows their effect of ratings)



If you want to completely cancel the effect of duration, which kind of defeats the point of DAR, then simply change this line of code:

From:
Code: [Select]
$puts(l,%length_seconds%)


To:
Code: [Select]
$puts(l,180)


If you want to weaken the effect of duration, try:
EDIT: This is the "Very Weak Duration Effect" (in the graph above):

Code: [Select]
$puts(l,%length_seconds%)
   $puts(lib0,$date_diff(2000))
   $puts(lib1,$div($add($mul($sub(100,$div($date_diff(%added%),$div($get(lib0),100))),15),2600),30))
   $puts(d0,$ifgreater($get(l),3599,$muldiv(20000,$get(l),3600),20000))
   $puts(d1,$muldiv($add($get(l),720),1,5))
   $puts(d2,$muldiv($get(l),$get(l),$get(d0)))
   $puts(d3,$add($get(d1),$get(d2)))


Also read this:
http://www.giantpygmy.net/sections/pause/a...est_version.txt

ps. You were lucky -- this didn't take too long.

C.


thank you for the explanation on how to "fix" it.  much appreciated.

DADA Auto-Rating (DAR) for foobar2000

Reply #128
For those having similar issues to MyMaster:

Here's some duration code replacements (just paste over relevant section of existing code):

Weak Duration Effect (see Graph Above)

Code: [Select]
$puts(l,%length_seconds%)
$puts(lib0,$date_diff(2000))
$puts(lib1,$div($add($mul($sub(100,$div($date_diff(%added%),$div($get(lib0),100))),15),2600),30))
$puts(d0,$ifgreater($get(l),3599,$muldiv(10000,$get(l),3600),10000))
$puts(d1,$muldiv($add($get(l),720),1,5))
$puts(d2,$muldiv($get(l),$get(l),$get(d0)))
$puts(d3,$add($get(d1),$get(d2)))



Very Weak Duration Effect (see Graph Above)

Code: [Select]
$puts(l,%length_seconds%)
$puts(lib0,$date_diff(2000))
$puts(lib1,$div($add($mul($sub(100,$div($date_diff(%added%),$div($get(lib0),100))),15),2600),30))
$puts(d0,$ifgreater($get(l),3599,$muldiv(20000,$get(l),3600),20000))
$puts(d1,$muldiv($add($get(l),720),1,5))
$puts(d2,$muldiv($get(l),$get(l),$get(d0)))
$puts(d3,$add($get(d1),$get(d2)))



Extremely Weak Duration Effect

Code: [Select]
$puts(l,%length_seconds%)
$puts(lib0,$date_diff(2000))
$puts(lib1,$div($add($mul($sub(100,$div($date_diff(%added%),$div($get(lib0),100))),15),2600),30))
$puts(d0,$ifgreater($get(l),3599,$muldiv(20000,$get(l),3600),20000))
$puts(d1,$muldiv($add($get(l),900),1,6))
$puts(d2,$muldiv($get(l),$get(l),$get(d0)))
$puts(d3,$add($get(d1),$get(d2)))



Super Weak Duration Effect

Code: [Select]
$puts(l,%length_seconds%)
$puts(lib0,$date_diff(2000))
$puts(lib1,$div($add($mul($sub(100,$div($date_diff(%added%),$div($get(lib0),100))),15),2600),30))
$puts(d0,$ifgreater($get(l),3599,$muldiv(20000,$get(l),3600),20000))
$puts(d1,$muldiv($add($get(l),1080),1,7))
$puts(d2,$muldiv($get(l),$get(l),$get(d0)))
$puts(d3,$add($get(d1),$get(d2)))



Mega Weak Duration Effect


Code: [Select]
$puts(l,%length_seconds%)
$puts(lib0,$date_diff(2000))
$puts(lib1,$div($add($mul($sub(100,$div($date_diff(%added%),$div($get(lib0),100))),15),2600),30))
$puts(d0,$ifgreater($get(l),3599,$muldiv(20000,$get(l),3600),20000))
$puts(d1,$muldiv($add($get(l),1260),1,8))
$puts(d2,$muldiv($get(l),$get(l),$get(d0)))
$puts(d3,$add($get(d1),$get(d2)))


C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #129
Since this kind of thing affects DAR ratings I've linked to a recent post to find "foo_playcount duplicates" (which may not be duplicates - for me I had 6 - and if you like Baroque composers it's pretty easy - unless you put the catalogue no., if there is one, in the title or stick with the CD track numbering --- neither of which I do, but that's me).

Finding foo_playcount tag (i.e. not path) duplicates, Excel sheet to save anyone else the bother
http://www.hydrogenaudio.org/forums/index....st&p=830592

C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #130
GPA site (and thus DAR info page) moved/updated and thus all the links changed (html to php).
http://www.giantpygmy.net/gpa/index.php?id=dada-autorating

MODS: I'm taking the old site offline so I took the liberty of preemptively "repairing" (updating) the soon to be broken links in a few of the earlier posts in this thread - no other content was changed.

C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #131
CHANGES TO DAR CODE (prior to release as v.1.7.0)

LOW PLAYCOUNT PENALTY EQUATION ALTERATIONS

With over 6 years of playcount stats to play with, something had begun to bother me with the existing DAR formula:
  • New tracks were getting too high a rating too easily, and
  • Long tracks were getting too high a rating on too low a playcount

So I've made, what I hope is a significant improvement to the "Low Playcount Penalty" part of the DAR formula.


EFFECTS OF THE NEW LOW PLAYCOUNT EQUATION ON THE OVERALL DAR RATINGS
  • A significant drop in ratings whose playcounts are between 2 and 10, while tracks with high playcounts (20+) will remain pretty much the same. If you imagine your current DAR ratings are like a washing line with high ratings on the left and low ratings on the right - the new penalty version is like hanging a heavy garment on the very right side of the line (a clumsy and overly simplistic analogy - but pretty much correct).
  • The penalty differential between long and short tracks has been reduced. So long duration tracks still reduce their penalty quicker than short duration tracks but this duration benefit has been significantly reduced.
  • No major jump going from 1 play to 2 plays (as there was in the prior version)
  • The role of delaying first playing a track (no. days between added and first played) has been reduced.
  • The new penalty reduces to zero slightly faster than previously.


Here's the maths:




Here's the difference between the new and old penalties in isolation:




And here's the effect on the overall DAR rating:




Here's the new code to cut and paste:

Code: [Select]
$puts(pc,%play_count%)
$puts(x,$add($date_diff(%added%),2))
$puts(y,$date_diff(%added%,%last_played%))
$puts(z,$sub($get(x),$get(y),2))
$puts(l,%length_seconds%)
$puts(lib0,$date_diff(2000))
$puts(lib1,$div($add($mul($sub(100,$div($date_diff(%added%),$div($get(lib0),100))),15),2600),30))
$puts(lib2,135)
$puts(pc1,$add($get(pc),2))
$puts(pc3,$mul($get(pc1),$get(pc1),$get(pc1)))
$puts(d0,$ifgreater($get(l),3599,$muldiv(9000,$get(l),3600),9000))
$puts(d1,$muldiv($add($get(l),540),1,4))
$puts(d2,$muldiv($get(l),$get(l),$get(d0)))
$puts(d3,$add($get(d1),$get(d2)))
$puts(r0,$mul($add(1000,$muldiv($get(d3),$get(pc),100)),10))
$puts(dd,$div($add($get(y),50),10))
$puts(pp,$muldiv($get(pc),10000,$get(x)))
$puts(2,$muldiv($get(dd),$get(pp),100))
$puts(3,$muldiv($get(x),$get(lib1),100))
$puts(4,$div($get(pp),50))
$puts(5,$div($muldiv($add($date_diff(%added%,%first_played%),5000),500,$add($div($get(l),20),140)),$add($div($get(pc3),58),3)))
$puts(6,$muldiv($get(pc),625,$get(x)))
$puts(7,$add($get(3),$get(5),$get(6)))
$puts(r1,$add($get(2),$get(r0)))
$puts(r2,$add($get(4),$sub($get(r1),$get(7))))
$puts(r3,$sub($get(r2),$div($mul($get(r2),$get(l),$get(z),$get(pc)),500000000)))
$puts(r4,$ifgreater($get(r3),0,$get(r3),1))
$ifgreater($get(pc),0,$num($get(r4),5),-----)



Below I've highlighted the parts of the code that have been added (GREEN) and altered (RED).

Quote
$puts(pc,%play_count%)
$puts(x,$add($date_diff(%added%),2))
$puts(y,$date_diff(%added%,%last_played%))
$puts(z,$sub($get(x),$get(y),2))
$puts(l,%length_seconds%)
$puts(lib0,$date_diff(2000))
$puts(lib1,$div($add($mul($sub(100,$div($date_diff(%added%),$div($get(lib0),100))),15),2600),30))
$puts(lib2,135)
$puts(pc1,$add($get(pc),2))
$puts(pc3,$mul($get(pc1),$get(pc1),$get(pc1)))

$puts(d0,$ifgreater($get(l),3599,$muldiv(9000,$get(l),3600),9000))
$puts(d1,$muldiv($add($get(l),540),1,4))
$puts(d2,$muldiv($get(l),$get(l),$get(d0)))
$puts(d3,$add($get(d1),$get(d2)))
$puts(r0,$mul($add(1000,$muldiv($get(d3),$get(pc),100)),10))
$puts(dd,$div($add($get(y),50),10))
$puts(pp,$muldiv($get(pc),10000,$get(x)))
$puts(2,$muldiv($get(dd),$get(pp),100))
$puts(3,$muldiv($get(x),$get(lib1),100))
$puts(4,$div($get(pp),50))
$puts(5,$div($muldiv($add($date_diff(%added%,%first_played%),5000),500,$add($div($get(l),20),140)),$add($div($get(pc3),58),3)))
$puts(6,$muldiv($get(pc),625,$get(x)))
$puts(7,$add($get(3),$get(5),$get(6)))
$puts(r1,$add($get(2),$get(r0)))
$puts(r2,$add($get(4),$sub($get(r1),$get(7))))
$puts(r3,$sub($get(r2),$div($mul($get(r2),$get(l),$get(z),$get(pc)),500000000)))
$puts(r4,$ifgreater($get(r3),0,$get(r3),1))
$ifgreater($get(pc),0,$num($get(r4),5),-----)



So far I've not added this to the site or the first post of this thread, so it's "unofficial". But I've been running this for a little while and IMO the ratings are better and the issues I outlined at the beginning have been resolved.

Finally, in my case I found I needed to drop the "mindar" part of the DAR Index code by about 1000.
Code: [Select]
$puts(mindar,5000)


As always, any and all feedback greatly appreciated.

C.

EDIT: !!! Important !!! made changes to code and graphs. If you've already started testing the code please use the updated code in this post. Explanation to follow.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #132
CODE & GRAPHS UPDATED ABOVE

I'm running a test parallel to my full library to simulate what happens for a new user of both foo_playcount and DAR Auto-Rating - i.e. how quickly do results start to make some kind of sense. This test highlighted a minor problem with the new version due to the way foobar2000 rounds numbers (always down). In short this meant the new penalty didn't decrease going from a playcount of 1 to 2 (after that it was fine). I always get caught out when going from Excel to foobar2000. Anyway it's now fixed.

I've modified the equation so the numbers come out pretty much the same, except now there's a more even distribution to the penalty reduction over playcounts 1 to 5.
And foobar2000 more closely mirrors Excel.

C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #133
Hi carpman and thank you for your work.

I tried your suggestion, but now all my songs have a single dot.

I think the problem is perhaps in my CUI column code. I haven't touched it for years and I'm not sure how should I modify it: could you have a look?
Code: [Select]
$puts(maxdar,11200)
$puts(mindar,8000)
$puts(maxsub,$sub($get(maxdar),200))
$puts(r3,$ifgreater(%_dynamic_rating%,$get(maxsub),$get(maxsub),%_dynamic_rating%))
$puts(r4,$ifgreater($get(r3),0,$get(r3),1))
$puts(minmax,$sub($get(maxdar),$get(mindar)))
$puts(darind1,$sub($get(r4),$get(mindar)))
$puts(darind2,$div($mul($get(darind1),10),$get(minmax)))
$puts(darind3,$ifgreater($get(darind2),1,$get(darind2),1))
$puts(display,$rgb(0,128,128)$repeat($char(9679),$get(darind3)))
$puts(notplayed,$rgb(200,200,200) n/a)
$ifgreater(%_dynamic_rating%,0,$get(display),$get(notplayed))

Also I'd like to ask you if the 8th line of your new code ($puts(lib2,135)) is really needed, as I can't see lib2 used anywhere else and was not present in previous version.

Regards.

Alessandro

DADA Auto-Rating (DAR) for foobar2000

Reply #134
Funny that you posted this problem. I've just finished an updated release that will resolve such problems.

In terms of the  ($puts(lib2,135)). That was to do with making the old track suppression multiplier a dynamic variable.  I left the old code there to make it easy to switch back to the previous version should anyone wish to do so.
So, indeed you can delete that line of code. 

Alessandro can you do me a favour and use the following DAR code and then tell me what your min and max DAR values (not number of dots) are (your min value may be minus - I'll explain all this later):

Code: [Select]
$puts(pc,%play_count%)
$puts(x,$add($date_diff(%added%),2))
$puts(y,$date_diff(%added%,%last_played%))
$puts(z,$sub($get(x),$get(y),2))
$puts(l,%length_seconds%)
$puts(lib0,$date_diff(2000))
$puts(lib1,$div($add($mul($sub(100,$div($date_diff(%added%),$div($get(lib0),100))),15),2600),30))
$puts(pc1,$add($get(pc),2))
$puts(pc3,$mul($get(pc1),$get(pc1),$get(pc1)))
$puts(b1,0)
$puts(b2,$add($div($get(b1),100),500))
$puts(d0,$ifgreater($get(l),3599,$muldiv(9000,$get(l),3600),9000))
$puts(d1,$muldiv($add($get(l),540),1,4))
$puts(d2,$muldiv($get(l),$get(l),$get(d0)))
$puts(d3,$add($get(d1),$get(d2)))
$puts(r0,$mul($add(1000,$muldiv($get(d3),$get(pc),100)),10))
$puts(dd,$div($add($get(y),50),10))
$puts(pp,$muldiv($get(pc),10000,$get(x)))
$puts(2,$muldiv($get(dd),$get(pp),100))
$puts(3,$muldiv($get(x),$get(lib1),100))
$puts(4,$div($get(pp),50))
$puts(5,$div($muldiv($add($date_diff(%added%,%first_played%),5000),$get(b2),$add($div($get(l),20),140)),$add($div($get(pc3),58),3)))
$puts(6,$muldiv($get(pc),625,$get(x)))
$puts(7,$add($get(3),$get(5),$get(6)))
$puts(r1,$add($get(2),$get(r0)))
$puts(r2,$add($get(4),$sub($get(r1),$get(7))))
$puts(r3,$sub($get(r2),$div($mul($get(r2),$get(l),$get(z),$get(pc)),500000000)))
$puts(r4,$add($get(r3),$get(b1)))
$ifgreater($get(pc),0,$num($get(r4),5),-----)


To give you an example mine are:

MAX = 10550
MIN = 4692

Simply, the above code takes the floor out of the rating - so it can give you a minus figure.

Thanks,

C.

EDIT: minor edit for clarity
PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #135
Alessandro can you do me a favour and use the following DAR code and then tell me what your min and max DAR values (not number of dots) are
I created a new CUI column displaying %_dynamic_rating%. If this is enough to get the values you requested, then the range on 4500 tracks is 01113 - 08395 (plus a couple of songs never played, hence without rating - there I see -----).

Cheers.

Alessandro

DADA Auto-Rating (DAR) for foobar2000

Reply #136
Alessandro

Thanks. You're a perfect test case for the new release.
Use the code below (DAR 1.7.0  -- to be released in the next few days) and then change the top 2 lines of your DAR Index values to:

$puts(maxdar,18000)
$puts(mindar,10000)

or

$puts(maxdar,17000)
$puts(mindar,9000)


Code: [Select]
$puts(pc,%play_count%)
$puts(x,$add($date_diff(%added%),2))
$puts(y,$date_diff(%added%,%last_played%))
$puts(z,$sub($get(x),$get(y),2))
$puts(l,%length_seconds%)
$puts(lib0,$date_diff(2000))
$puts(lib1,$div($add($mul($sub(100,$div($date_diff(%added%),$div($get(lib0),100))),15),2600),30))
$puts(pc1,$add($get(pc),2))
$puts(pc3,$mul($get(pc1),$get(pc1),$get(pc1)))
$puts(b1,10000)
$puts(b2,$add($div($get(b1),100),500))
$puts(d0,$ifgreater($get(l),3599,$muldiv(9000,$get(l),3600),9000))
$puts(d1,$muldiv($add($get(l),540),1,4))
$puts(d2,$muldiv($get(l),$get(l),$get(d0)))
$puts(d3,$add($get(d1),$get(d2)))
$puts(r0,$mul($add(1000,$muldiv($get(d3),$get(pc),100)),10))
$puts(dd,$div($add($get(y),50),10))
$puts(pp,$muldiv($get(pc),10000,$get(x)))
$puts(2,$muldiv($get(dd),$get(pp),100))
$puts(3,$muldiv($get(x),$get(lib1),100))
$puts(4,$div($get(pp),50))
$puts(5,$div($muldiv($add($date_diff(%added%,%first_played%),5000),$get(b2),$add($div($get(l),20),140)),$add($div($get(pc3),58),3)))
$puts(6,$muldiv($get(pc),625,$get(x)))
$puts(7,$add($get(3),$get(5),$get(6)))
$puts(r1,$add($get(2),$get(r0)))
$puts(r2,$add($get(4),$sub($get(r1),$get(7))))
$puts(r3,$sub($get(r2),$div($mul($get(r2),$get(l),$get(z),$get(pc)),500000000)))
$puts(r4,$add($get(r3),$get(b1)))
$ifgreater($get(pc),0,$num($get(r4),5),-----)


Here's the DAR Index code I use in CUI with the suggested variables:

Code: [Select]
$puts(maxdar,18000)
$puts(mindar,10000)
$puts(maxsub,$sub($get(maxdar),0))
$puts(r3,$ifgreater(%_dynamic_rating%,$get(maxsub),$get(maxsub),%_dynamic_rating%))
$puts(r4,$ifgreater($get(r3),0,$get(r3),1))
$puts(minmax,$sub($get(maxdar),$get(mindar)))
$puts(darind1,$sub($get(r4),$get(mindar)))
$puts(darind2,$div($mul($get(darind1),10),$get(minmax)))
$puts(darind3,$ifgreater($get(darind2),1,$get(darind2),1))
$puts(display,$rgb(100,100,100)$repeat($char(9679),$get(darind3))$rgb(220,220,220)$repeat($char(9679),$sub(10,$get(darind3))))
$puts(notplayed,$rgb(200,200,200)- n/a -)
$ifgreater(%_dynamic_rating%,0,$get(display),$get(notplayed))


Then let me know how that works.
The new version will be explained in a future post, but simply it removes the floor on the rating and allows for an across the board boost to all ratings to keep them positive.

An analogy:

The per track DAR Ratings works like fish swimming up stream. Time is the stream's flow and each play is the energy the track (fish) requires to move against the flow. However, if one listens to some music only rarely and their library is old; that's the equivalent of the fish getting too tired. The floor on the ratings is like a dam. Over time all these old tired fish will get pushed up against the wall of the dam. The new DAR formula allows users to move the dam down stream. Thus all these old fish now have miles of river before they hit the (now imaginary) dam (since the floor has been removed - the dam is just where ratings go negative). The athletic fish (the tracks you play a lot) will now be even further from the dam (have a higher rating) than they already were. This can be done numerous times, effectively extending the ratings game decades into the future.

All this will be laid out in detail in a future post and will be the new code released as 1.7.0. For now you can be the guinea pig.

Let me know if you get sensible results.

ps. Nothing else about the ratings mechanics has changed. I've tested the code and it works well.

C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #137
Thanks. You're a perfect test case for the new release.
You're welcome: glad to help.
let me know how that works.
I copied your code and quickly glanced at my library: now I have my ratings (yay!) but I see only 18 tracks with 1 dot. I'm not saying it's wrong, but it strikes me as odd. If I set min/max at 9000/17000 it's even worse: only 4 tracks with 1 dot. Thoughts?

Also, I'd prefer the scale on 5 dots instead of 10 (simply for space reasons): do you think that would not be enough to accurately represent ratings? Or is it doable?

Thanks again.

Alessandro

DADA Auto-Rating (DAR) for foobar2000

Reply #138
Keep increasing the mindar value on the 2nd line of the DAR Index code by 1000 (or 500) until you get the number of 1 dots you want:

$puts(mindar,11000)

Try this code for 5 dots only:

Code: [Select]
$puts(maxdar,18000)
$puts(mindar,11000)
$puts(maxsub,$sub($get(maxdar),0))
$puts(r3,$ifgreater(%_dynamic_rating%,$get(maxsub),$get(maxsub),%_dynamic_rating%))
$puts(r4,$ifgreater($get(r3),0,$get(r3),1))
$puts(minmax,$sub($get(maxdar),$get(mindar)))
$puts(darind1,$sub($get(r4),$get(mindar)))
$puts(darind2,$div($mul($get(darind1),5),$get(minmax)))
$puts(darind3,$ifgreater($get(darind2),1,$get(darind2),1))
$puts(display,$rgb(100,100,100)$repeat($char(9679),$get(darind3))$rgb(220,220,220)$repeat($char(9679),$sub(5,$get(darind3))))
$puts(notplayed,$rgb(200,200,200)- n/a -)
$ifgreater(%_dynamic_rating%,0,$get(display),$get(notplayed))


Here's the lines I've changed:

Quote
$puts(darind2,$div($mul($get(darind1),5),$get(minmax)))

Quote
$puts(display,$rgb(100,100,100)$repeat($char(9679),$get(darind3))$rgb(220,220,220)$repeat($char(9679),$sub(5,$get(darind3))))

C.

EDIT: Forgot to change both lines of code. This should work now.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #139
Alessandro

In regard to the DAR Index. There's no right or wrong and it will be different for everyone. It's merely done by indexing (to 10 or 5) the DAR Rating number having set an upper and lower bound. So the upper means anything equal to or higher will get 10 (or 5 depending on the index value). The DAR Index is just a way to express the ratings in a more general and user friendly (at a glance) way.

EDIT:
Also you may find in 3 years time it's necessary to change the mindar and maxdar values. They're a moveable feast and users should set them purely according to what makes sense to them.

EDIT2:

As a general rule for min and max DAR Index values:
  • MAX: Take the highest DAR Rating and round down to the nearest 1000 (so 10500 becomes 10000)
  • MIN: Take the lowest DAR Rating and round up to the nearest 1000 (so 2500 becomes 3000)

You may want to do this every 2 or 3 years.

C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #140
NEW VERSION RELEASED

DAR 2.0.0:

- Major upgrade to the Low Playcount Penalty.
- Removed the floor from the ratings system and added a simple Auto-Boost mechanism (on by default).
- Simplified and improved the robustness of the Fall Rate Mechanism which defines how fast tracks fall when not played.


LINKS
Enjoy!

If you're in a hurry, probably the most important and interesting read is this:
https://www.giantpygmy.net/studio/?post=dada-music-auto-rating-algorithm-foobar2000#-The-Floor,-the-Fish-&-the-Auto-Boost

As always, any feedback, questions etc ... most welcome.

C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #141
UPDATE RELEASED

DAR 2.0.1:

- Fixed a minor error in the Fall Rate Mechanism (since 2.0.0) which defines how fast tracks fall when not played. Users should see an uptick in the ratings of low rated tracks that haven't been played for a while.

The Fall Rate is connected to "days since last played". Think of it like a weird gravity: The higher the rating the faster the track falls back down when not being played, this is a "weak force" (ho ho), but aids in the recycling of tracks at the top. i.e. to stay top of the pops you have to get played. As a track falls out of favour, its rating drops, and as its rating drops so does the rate at which it falls. That's the Fall Rate Mechanism. Which is now fixed. 

For those who have altered parts of their code, here's the section of the code you can cut and paste over the top (r1 to r4 + last line):

Code: [Select]
$puts(r1,$add($get(2),$get(r0)))
$puts(r2,$add($get(4),$sub($get(r1),$get(7))))
$puts(r2a,$ifgreater($get(r2),0,$get(r2),1))
$puts(r3,$sub($get(r2),$div($mul($get(r2a),$get(z),3),50000)))
$puts(r4,$add($get(r3),$get(b1)))
$ifgreater($get(pc),0,$num($get(r4),5),-----)

The full code is here:
https://www.giantpygmy.net/studio/data/uploads/files/dada_autorating_dar_latest_version.txt

Or the first post of this thread:
http://www.hydrogenaud.io/forums/index.php...st&p=724734

Sorry for any inconvenience.

C.

EDIT: Grammar
PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #142
Has anyone played around with a way to make it so that if a song already has a rating that is displayed instead of the dynamic rating?

DADA Auto-Rating (DAR) for foobar2000

Reply #143
Hi slcc2c

The code below (assuming you already have DAR setup and can call %_dynamic_rating%) will give you a number between 1 and 5. How you choose to show that number (i.e. as stars etc..) is up to you and others here will have more expertise on that. But simply, if you have given your track a %rating% > 0 it will show that, if it is NOT > 0 it will show the  %_dynamic_rating% as an indexed number between 1 and 5.

As always with DAR Indexing the min and max values in lines 1 and 2 below, will determine the spread of values. For more info go here:
https://www.giantpygmy.net/studio/?post=dada-music-auto-rating-algorithm-foobar2000

Code: [Select]
$puts(maxdar,10000)
$puts(mindar,5000)
$puts(maxsub,$sub($get(maxdar),0))
$puts(r3,$ifgreater(%_dynamic_rating%,$get(maxsub),$get(maxsub),%_dynamic_rating%))
$puts(r4,$ifgreater($get(r3),0,$get(r3),1))
$puts(minmax,$sub($get(maxdar),$get(mindar)))
$puts(darind1,$sub($get(r4),$get(mindar)))
$puts(darind2,$div($mul($get(darind1),5),$get(minmax)))
$puts(darind3,$ifgreater($get(darind2),1,$get(darind2),1))
$puts(notplayed,- n/a -)
$puts(dardisplay,$ifgreater(%_dynamic_rating%,0,$get(darind3),$get(notplayed)))
$ifgreater(%rating%,0,%rating%,$get(dardisplay))

Hope that helps.

C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #144
These versions include the display code. As per pic below (but with 5 dots):




Columns UI

Code: [Select]
$puts(maxdar,10000)
$puts(mindar,5000)
$puts(maxsub,$sub($get(maxdar),0))
$puts(r3,$ifgreater(%_dynamic_rating%,$get(maxsub),$get(maxsub),%_dynamic_rating%))
$puts(r4,$ifgreater($get(r3),0,$get(r3),1))
$puts(minmax,$sub($get(maxdar),$get(mindar)))
$puts(darind1,$sub($get(r4),$get(mindar)))
$puts(darind2,$div($mul($get(darind1),5),$get(minmax)))
$puts(darind3,$ifgreater($get(darind2),1,$get(darind2),1))
$puts(notplayed,- n/a -)
$puts(dardisplay,$ifgreater(%_dynamic_rating%,0,$get(darind3),$get(notplayed)))
$puts(value,$ifgreater(%rating%,0,%rating%,$get(dardisplay)))
$rgb(100,100,100)$repeat($char(9679),$get(value))$rgb(220,220,220)$repeat($char(9679),$sub(5,$get(value)))


Default UI


Code: [Select]
$puts(maxdar,10000)$puts(mindar,5000)$puts(maxsub,$sub($get(maxdar),0))$puts(r3,$ifgreater(%_dynamic_rating%,$get(maxsub),$get(maxsub),%_dynamic_rating%))$puts(r4,$ifgreater($get(r3),0,$get(r3),1))$puts(minmax,$sub($get(maxdar),$get(mindar)))$puts(darind1,$sub($get(r4),$get(mindar)))$puts(darind2,$div($mul($get(darind1),5),$get(minmax)))$puts(darind3,$ifgreater($get(darind2),1,$get(darind2),1))$puts(notplayed,- n/a-)$puts(dardisplay,$ifgreater(%_dynamic_rating%,0,$get(darind3),$get(notplayed)))$puts(value,$ifgreater(%rating%,0,%rating%,$get(dardisplay)))$repeat($char(9679),$get(value))$repeat(<<<$char(9679)>>>,$sub(5,$get(value)))

C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #145
I cannot even express how much I appreciate the help. That is the exact functionality I want.
However, having your working code may have exposed what was broken about mine.
For some reason my %rating% tag is totally busted.
RATING however still works.
Here are some screens displaying my issue.
Any thoughts at all? I posted this in the playback stats thread as well.

DADA Auto-Rating (DAR) for foobar2000

Reply #146
I'm no expert on the %rating% tag stuff, but what I can say, is that when I right click on a file, select properties I don't have anything under Metadata. To see the %rating% info, I have to go to the Properties Tab. There, under Playback Statistics is where I see Rating.

So I imagine, this might be the issue. How did you tag %rating%? If you did it with Playback Statistics then I'd have thought all would be fine.

What I suggest is that you test this with one file. For example, take the track in the picture. It has a Rating tag = 4.
Right click on the file > Playback Statistics > Rating > Select 4

Then see what happens. If nothing then, Right Click > Properties > Metadata Tab > Highlight "Rating" and Delete. Then see if you get the correct display.

C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #147
Chances are it's related to foo_playcount taking over rating. Solution is to use either %rating% or $meta(rating) depending on what you want to access.

DADA Auto-Rating (DAR) for foobar2000

Reply #148
Thank you so much. $meta(rating) no longer works. I changed my keyboard shorcut to use playback statistics instead of quicktagger and now I am good to go.
It looks great and I have the exact functionality I have been looking for.

I set it up to where the 5 star summary is a column in facets and %_rating% is a new dynamic field using the 1-5 output algorithm you provided. Now I can find all tracks with a real or dynamic rating above a certain level!

Re: DADA Auto-Rating (DAR) for foobar2000

Reply #149
Hello guys,

I need to do smg. I would like to have my folder Media library stucture sorted as followed:

folders sorted from most played to less played using the DAR filter.
Is it possible?