Skip to main content
Topic: DADA Auto-Rating (DAR) for foobar2000 (Read 56735 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

DADA Auto-Rating (DAR) for foobar2000

Reply #75
Does the duration adjustment have more impact over a large amount of time and plays than it does over a few weeks with a handful of plays?

I've only been keeping play counts for the last few weeks since I got this plugin/script. I have a situation where I have:

(A) a 3-minute track that's been played 3 times has a higher DAR than
(B) a 22-minute track that's been played 2 times.

It seems to me that (B) should get the higher DAR since I've spent 42 minutes playing it as opposed to only 9 minutes with (A). Will the longer length of (B) give its DAR more "staying power" and cause it to eventually have a higher DAR than (A) if I don't touch either track for a few months? If not, what would be the best way to adjust the code so that duration has a greater impact?

DADA Auto-Rating (DAR) for foobar2000

Reply #76
From: http://www.giantpygmy.net/gpa/index.php?id=dada-autorating

Quote
Low Playcounts & Predictability

When tracks have a very low playcount (i.e. < 5) the effects of the low playcount penalty are a dominant factor in the DAR rating scheme. As the playcount increases this effect diminishes quickly (ultimately to zero). It's primary purpose is to spread the rating over a wide range. Furthermore, a track played just once or twice, whether long or short, young or old cannot be said to be a favourite, and with so few plays predicting its popularity is problematic.


Also see: http://www.hydrogenaudio.org/forums/index....st&p=724934

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

DADA Auto-Rating (DAR) for foobar2000

Reply #77
So in other words, the fact that I just started keeping play counts on a 5 year old library means I'm screwed

DADA Auto-Rating (DAR) for foobar2000

Reply #78
I don't get why the age of the library is relevant? I assume the age of the library, as far as the playback stats component is concerned, is from when it was installed.

In the scenario you gave, if you played both tracks once more, you would notice that the longer track has a higher rating. There's a good reason for partly subordinating the main DAR system to playcounts in the very early / initial stages.

If you have a 30 min track and you play it once, but you don't like it, so you never play it again (but it's part of an album you like and for the sake of cohesion, completeness and harmony you leave it in your library), why should that have a higher rating than a new 1 min song that you like and have already played twice? However, if you multiply it up and you've played the 30 min track 5 times but the 1 min track 10 times, that's clearly telling a different story.

Furthermore, if you think in terms of plotting a trend graph, it's very hard to see a trend from 1, 2 or 3 plots. The more playcounts you have the easier this becomes.

As far as you being screwed because you're starting from scratch ...
I started my test from scratch; you'll get meaningful results quicker than you expect. Unfortunately, the DAR does not know you and does not understand your preferences before they are manifest in action. One day this kind of thing might happen, but that will be a very scary day! Perhaps when Google merges with Last.fm. 

C.

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

DADA Auto-Rating (DAR) for foobar2000

Reply #79
Released DAR version 1.6.4:

New code on first page: http://www.hydrogenaudio.org/forums/index....st&p=724734

Quote
DAR 1.6.4 (12/11/10) - 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 setting it to 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 part of line to edit: $puts(lib0,$date_diff(2000-01-01 00:00:00)).




Updated:
Enjoy!
Feedback, questions etc .. most welcome.

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

DADA Auto-Rating (DAR) for foobar2000

Reply #80
I don't know if I should bother you with this, but I have a couple songs that are exceptionally "hot" so to speak, and distort the ratings heavily. I'll show you what I mean with pictures since it's hard to explain:

Most of my "hottest" songs end up with ratings in the region of 12000 or so, which is fair, however there are 2 or 3 exceptions and they are songs that I had used as my wakeup ringtone for long periods, in addition to normal listening. This has caused them to get almost infeasibly high ratings. My top 3 is as follows:





I realize that those values are "correct", and that I have listened to those few songs an incredible amount within the period that I've had them. For practical reasons they're troublesome though, since I can't put a good "maxdar" value. Either my entire library (except for those 3 or 4 top songs) will have a rating of 5 or less (out of 10), or the top ratings will peak way above the 10. I picked the latter since it only affect those few songs, and I'd rather have more interesting info about the rest of my library, but I thought maybe you'd want to have a look at it.

DADA Auto-Rating (DAR) for foobar2000

Reply #81
Try this:
EDIT: edited the code below. This will be the actual code when I have time to alter front page -- thanks スラッシュ.

Code: [Select]
$puts(maxdar,12700)
$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(150,150,150)$repeat($char(9679),$get(darind3)))
$puts(notplayed,$rgb(200,200,200)- n/a -)
$ifgreater(%play_count%,0,$get(display) $rgb(200,200,200)$get(darind3),$get(notplayed))


It puts a ceiling on the rating of maxdar minus 200 (so 12500). So set the maxdar 100 or so above the sensible "hot ratings" in your collection. Set the mindar to what you currently have.

Actually, I'm glad you posted because it would make sense to do it this way anyway. I'll release a new version, where the user sets the maxdar and this is used to cap the DAR value for the "dots display".  Something like a brickwall limiter for the DAR-dots.

C.

EDIT2: Various edits for clarity.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

DADA Auto-Rating (DAR) for foobar2000

Reply #82
Very cool, thanks for the super fast reply! but it only goes up to 9 now, is that intentional?

DADA Auto-Rating (DAR) for foobar2000

Reply #83
Yes, that was how it was designed, but if you want it to go to 10 (I assume), change the first few lines to:

Code: [Select]
$puts(maxdar,12500)
$puts(mindar,8000)
$puts(maxsub,$sub($get(maxdar),0))

That should do it.

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

DADA Auto-Rating (DAR) for foobar2000

Reply #84
Actually 9 is perfectly fine too! I didn't consider that I had sort of chosen my own maximum as a result of those weird outliers...

DADA Auto-Rating (DAR) for foobar2000

Reply #85
Updated the instructions document to include a number of display alternatives for the DAR Index:
http://www.giantpygmy.net/gpa/data/uploads..._dar_v1.6.4.txt

Includes 2 versions for CUI, 1 for DUI and a currently playing track indicator ...
The major functional improvement is that now you don't have to worry about those rogue, outlying, anomalies that got a rating of 50000 because you used them as an egg timer, a substitute looped backing to your Jane Fonda exercise DVD and whatever other weirdnesses you service with glorious music. i.e. I've put a ceiling on the dots, so anything above the max you set will get the max dots or stars or whatever characters you end up using.


II. DAR INDEXED RATING (WITH DOTS)

1. For Columns UI (CUI) users: max 10 dots

Settings: Set the maxdar to the minimum value that will achieve 10 dots, all ratings above that will get the maximum 10 dots. 8000 is likely appropriate for the mindar setting, but this is something that you may need to play around with.
Display: A rating of 6 will show 6 dark grey dots with 4 trailing light grey dots.

Code: [Select]
$puts(maxdar,11000)
$puts(mindar,8000)
$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(%play_count%,0,$get(display),$get(notplayed))

2. Alternative for Columns UI (CUI) users: max 9 dots with number

Settings: Set the maxdar to 200 above the minimum value that will achieve the maximum 9 dots. 8000 is likely appropriate for the mindar setting, but this is something that you may need to play around with.
Display: A rating of 6 will show 6 dark grey dots (with no trailing light grey dots) followed by the number 6.

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(150,150,150)$repeat($char(9679),$get(darind3)))
$puts(notplayed,$rgb(200,200,200)- n/a -)
$ifgreater(%play_count%,0,$get(display) $rgb(200,200,200)$get(darind3),$get(notplayed))

3. For Default UI (DUI) users: max 10 dots with number

Settings: Set the maxdar to the minimum value that will achieve 10 dots, all ratings above that will get the maximum 10 dots. 8000 is likely appropriate for the mindar setting, but this is something that you may need to play around with.
Display: A rating of 6 will show 6 dark grey dots (with no trailing light grey dots) followed by the number 6.

Code: [Select]
$puts(maxdar,11000)$puts(mindar,8000)$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,$repeat($char(9679),$get(darind3)))$puts(notplayed,- n/a -)$ifgreater(%play_count%,0,$get(display) $get(darind3),$get(notplayed))

4. As a currently playing track indicator (CUI, possibly DUI):



Non-playing tracks will show, for example, "Artist - Title" (or whatever titleformatting you set), however, the currently playing track will show the DAR indexed rating with a maximum of 10 dark grey dots followed by "Artist - Title". If you'd rather have this out of 5 dots, you can change the "$puts(darind2 ..." line from 10 to 5.

Set your titleformatting track display for your (probably left-most) column in the "trackinfo" line below (3rd line down).

Code: [Select]
$puts(maxdar,11000)
$puts(mindar,8000)
$puts(trackinfo,[color=#FF0000]%artist% - %title%[/color])
$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,$repeat($char(9679),$get(darind3)))
$puts(notplayed,$char(9679)  first play >)
$puts(rateplay,$ifgreater(%play_count%,0,$get(display),$get(notplayed)))
$puts(noplay,$get(trackinfo))
$puts(play,$get(rateplay) $get(trackinfo))
$ifgreater(%isplaying%,0,$get(play),$get(noplay)))

Thanks to スラッシュ and other posters in this thread who've got me thinking about this display issue.
Please let me know if there's anything that doesn't work properly.

Thanks,

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

DADA Auto-Rating (DAR) for foobar2000

Reply #86
Ooh, you made one that's just like mine! Except your code is way neater, since I added lots of crap with colors and so on  On the plus side, I can now distinguish between a 10 and a 10++!

Also, I just realized why some of my songs have "- n/a -", but still have a ranking anyway: it's cause I use Playback Statistics Custom! So I should've replaced %play_count% with %play_counter% in the dot script.

Which leads me to a question: since I'm using Playback Statistics Custom with a "completion" rate of 75%, does that affect my scores in any significant way, or is the "default" script just fine? I've been reluctant to update the main script since you previously marked the old script as the best for people who use a system where it marks the playcount at 75%.

DADA Auto-Rating (DAR) for foobar2000

Reply #87
Also, I just realized why some of my songs have "- n/a -", but still have a ranking anyway: it's cause I use Playback Statistics Custom! So I should've replaced %play_count% with %play_counter% in the dot script.

Yes, correct.

Which leads me to a question: since I'm using Playback Statistics Custom with a "completion" rate of 75%, does that affect my scores in any significant way, or is the "default" script just fine? I've been reluctant to update the main script since you previously marked the old script as the best for people who use a system where it marks the playcount at 75%.

The default script is absolutely fine, in fact the default settings are intentionally calibrated for a sane playcount system (i.e. one that counts played at 50%, 67%, or 75%). There are variables that can be tweaked to cater for the kind of distortions that the current official playcount stats method naturally introduces.

So yes, it's completely safe to go with the new version (and any subsequent ones I release).

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

DADA Auto-Rating (DAR) for foobar2000

Reply #88
I'm thinking to setup this plugin on my foobar. But I'm wondering if it's possible to use this plugin in the following scenario. I like to listen at work ripped radioshows with *.cue files. So basically I listen the tracks only once per radioshow. But some tracks are common to multiple radioshows. In my understanding these common tracks should get more popular than the other. But playcount plugin counts by:
Quote
Playback statistics are now pinned to a combination of artist + album + disc number + track number + track title information

And radishows album is tagged usually as "name - episode" so each track will have always unique combination of tags. Is it possible to use DAR in the following scenario?
Regards.

DADA Auto-Rating (DAR) for foobar2000

Reply #89
Simple answer is if fb2k can read the cue and distinguish individual tracks and they are tagged in such a way that foo_playcount also sees them as unique, then so will DAR.

But unless I've misunderstood you, you've answered the question yourself:
And radishows album is tagged usually as "name - episode" so each track will have always unique combination of tags. Is it possible to use DAR in the following scenario?

Yes. I don't see why not.
Just check that foo_playcount gives different values to each of the tracks in the cue sheet, if it does, DAR will too.

C.

EDIT:
Quote
But some tracks are common to multiple radioshows

Oh I see, so you are saying that the same track could have the following names:
Radio Show X - Track X1
Radio Show Y - Track Y5

This is not a DAR issue, but more a UID / play stats issue. The only solution to something like this is what odyssey has suggested, a UID based on foo_biometrics / audio content signature (CRC) rather than tags / filename. At present, I don't see a way (outside of renaming) for these uniquely named tracks to be treated as one.

Hope that helps,

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

DADA Auto-Rating (DAR) for foobar2000

Reply #90
That I was afraid of. It's too bad that playcount cannot be configured to count tracks by artist - trackname only. I was looking for something like offline last.fm stats. Anyway thanks for clearing this.
Regards.

DADA Auto-Rating (DAR) for foobar2000

Reply #91
If you can use last.fm, then you can actually make foobar get the stats from last.fm using marc2003's awesome script. You'll just have to adjust the DADA script to use the stats as downloaded from last fm, but it's straightforward.

DADA Auto-Rating (DAR) for foobar2000

Reply #92
Yes I saw that script, but I was looking for full offline solution.
Regards.

DADA Auto-Rating (DAR) for foobar2000

Reply #93
I post my request here like cartman suggested.

I'm missing an option in foo_dynfil where I can put in a pattern like:
- %album% or %genre% or $directory_path(%path%)
Normally this should also be your grouping pattern in columnsUI

With this option set foo_dynfil should only calculate ratings within this pattern

Why: Lets presume I have a 10-dots rating column and two albums A and B each with 3 songs.
I played album A only on December 2009 with song1, song2 and song3. They get high ratings 4,5 and 9 dots.
In June 2010 i only played album B and all 3 respective songs get high ratings. In the same time all 3 songs of album A are getting lower ratings.
Over time they only have 1 dot. In December 2010 I like album A again and want to see 'hey, what was this great song here last year'
But thats now impossible. The good rating range of a 4,5 and 9 dots are gone.


You see what I mean? Maybe some users don't want this generel calculation and want to divide this into several sections
I know that most users want exactly this behavior where ratings are calculated over whole database.
With this in mind this option should be empty by default so nothing changes on upgrading for other users.

Maybe this is already possible: If so a little option field and a hint would be great.



DADA Auto-Rating (DAR) for foobar2000

Reply #94
I post my request here like cartman suggested.
carpman.

Yes, I'm still puzzled.
a) I don't understand the bit about patterns and foo_dynfil. Calculating with this pattern:
Quote
%album% or %genre% or $directory_path(%path%)
Surely just means everything gets calculated? I'm confused.

b) You seem to want the rating to not change over time. Is that correct?

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

DADA Auto-Rating (DAR) for foobar2000

Reply #95
Ah I missed a detail:
- lets say I choose as pattern %album%
- If only song1 from album A was recently played, then only album A should be recalculated.
Other albums should stay with their ratings. Seems not useful to you, right?


My main thought was to get a wide range of dots calculated per album.

PS: Aren't you developing foo_dynfil together with Yirkha?


DADA Auto-Rating (DAR) for foobar2000

Reply #96
PS: Aren't you developing foo_dynfil together with Yirkha?

No, Yirkha is entirely responsible for foo_dynfil. It's probably confusing because he's appended its development related posts to my old "foo_DAR" thread. I imagine pretty soon, he will give it its own thread.

You're better off posting foo_dynfil related queries here:
http://www.hydrogenaudio.org/forums/index....2864&st=200

However, there may be a problem with what you're asking, in that most title formatting / calculations are track based, and not album based. i.e. AFAIK you can't have a %number_of_tracks_in_this_album% field. So I imagine you wouldn't be able to have a %latest_played_track_in_this_album% kind of question. I may be wrong though.

That said, isn't this what static manual ratings are made for?
You could use DAR to determine each month which tracks you give 5 stars etc ... then it's fixed while the DAR rating slowly declines.

Additionally you could, based on certain criteria:
Right click > Tagging > Manage Scripts > "format values from other fields"
Destination:  DARFIXED
Formatting pattern:  %_dynamic_rating%

Then [untested] have $if(%darfixed%,%_dynamic_rating%) in your DAR dots code.

Just some thoughts.

C.

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

DADA Auto-Rating (DAR) for foobar2000

Reply #97
@ Nixdagibts

re. your post
Try this:

Code: [Select]
$puts(maxdar,11000)
$puts(mindar,8000)
$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))
This will give "- n/a -" for played tracks outside the library.

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

DADA Auto-Rating (DAR) for foobar2000

Reply #98
Simple and clean.  Thank you.
I would suggest to use this as default since it solves a little cosmetic problem?

PS: This is my customized column code.
It displays dots within the same column as title, shows dots on all non-playing files but hides them on a playing file for readability.
Longer titles are shown as marquee.

Code: [Select]
$puts(len,23)
$puts(title, [%title%])

$iflonger($get(title),$get(len)
,$puts(diff,$sub($len($get(title)),$get(len)))
$puts(start,$add(1,$mod(%_time_elapsed_seconds%,$get(diff))))
$puts(start2,$select($add($div($add(1,$mod( %_time_elapsed_seconds%,$mul($get(diff),2))),$add($get(diff),1)),1),$get(start),$sub($add($get(diff),1),$get(start))))

$substr($get(title),$get(start2),$add($get(start2),$get(len)))
,$get(title))

$puts(maxdar,11000)
$puts(mindar,8000)
$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,$repeat($char(9679),$get(darind3)))
$puts(rateplay,$ifgreater(%_dynamic_rating%,0,$get(display),))

$if(%isplaying%,,$tab()$blend($rgb(200,200,200),$rgb(100,100,0),$get(darind3),5)$get(rateplay))

DADA Auto-Rating (DAR) for foobar2000

Reply #99
Simple and clean.  Thank you.
I would suggest to use this as default since it solves a little cosmetic problem?

Yes, I agree. When I wrote the code I actually thought foo_playcount was limited to library items and foo_dynfil was not. So I've learnt something new. I'll update when I have more time.

Many thanks.

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

 
SimplePortal 1.0.0 RC1 © 2008-2019