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: foo_DAR: auto rating (Read 126615 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_DAR: auto rating

Reply #25
Just trying gauge the dynamic range so I can convert a number into something more "glanceable".


In the download linked to in the first post is a spreadsheet which is pretty much for this kind of testing. Put in your highest and lowest variables and see what comes out. That should give you your gauge.

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

foo_DAR: auto rating

Reply #26
I've followed your instructions and I was wondering if you have found any problems when the added date is later than the last played date?

I have only just added an %added% tag to my music (using custominfo) and obviously since my playback stats existed before I added this tag my Days Since Added is negative. Every rating for every song that I've played in my library is 10000, no matter how many times I've played the song.

The excel spreadsheet returns what seem like realistic values for various songs. Could excels behaviour with negative numbers be different to foobars?

This is the modified rating formula I'm using (%play_counter% ---> %play_count% should be the only change)
Code: [Select]
$puts(ra,$add(1000,$div($mul(%length_seconds%,$sub(%play_count%,$div(%skip%,2))),100)))$puts(ra2,$mul($get(ra),10))$puts(dd,$div($add($cwb_datediff(%added%,%last_played%),50),10))$puts(pp,$div($mul(%play_count%,10000),$cwb_datediff(%added%,%cwb_systemdatetime%)))$puts(pd,$mul($get(dd),$get(pp)))$puts(pd2,$div($get(pd),100))$puts(pd3,$div($mul($cwb_datediff(%added%,%cwb_systemdatetime%),125),100))$puts(pd4,$div($get(pp),40))$puts(r1,$add($get(pd2),$get(ra2)))$puts(r2,$add($get(pd4),$sub($get(r1),$get(pd3))))$puts(r3,$ifgreater($cwb_datediff(%added%,%cwb_systemdatetime%),7,$get(r2),10000))$ifgreater(%play_count%,0,$num($get(r3),5),-----)

foo_DAR: auto rating

Reply #27
hi cmdrpaddy

Thanks for the feedback.
Firstly, the reason you are getting a rating of 10000 for every track is because of this line:

$puts(r3,$ifgreater($cwb_datediff(%added%,%cwb_systemdatetime%),7,$get(r2),10000))

This is the "pseudo rating" applied to new tracks less than 7 days old. The reason for this is that in the first few days the rating is "vulnerable" to skewing caused by the "plays per time period" problem. Obviously if you add a new track and play it twice and then extropolate that behaviour you'd listen to it 730 times a year. The formula's pretty good at smoothing this out after 4 or 5 days. Thus the pseudo rating is there to prevent brand new tracks from jumping straight to the top of the ratings (it's a fudge - but a necessary one).

What I would do and have done is this:

There are two methods for dealing with this, the first is the best and relies on the %first_played% field. If you don't have that info then use the second method:

1) Setup a custom info Context Menu Command:
Got to: Preferences > Tools > Custom Info
Select the Context Menu Commands tab

Click "New"
Enter the following:

Display name:  Custom Info/Date/Added (first played)
Field name:  ADDED
Value: %first_played%

Save all

Highlight a few tracks first to test this:
Right click > Custom Info > Date > [left click on] Added (first played)

That should resolve the date problem.
If you don't have first played data then:

2) As above but add the following instead:

Display name:  Custom Info/Date/Added (date modified)
Field name:  ADDED
Value: %lastmodified%

Save all

Highlight a few tracks first to test this:
Right click > Custom Info > Date > [left click on] Added (date modified)

That should give you reasonable date %added% info.

Let me know if that works.

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

foo_DAR: auto rating

Reply #28
The first option worked perfectly thanks!

foo_DAR: auto rating

Reply #29
Updated the 1st and 2nd posts to account for recent changes and new versions for foo_playcount users.

There are now 3 versions of foo_DAR:

1) foo_DAR_full: for foo_playback_custom (this is the official release and has full functionality)
2) foo_DAR_noskip: for foo_playcount (thanks to Bollerkopp for raising this issue - this has been modified for users of the official playback stats plugin and lacks the %skip% function)
3) foo_DAR_noadded: for foo_playcount (thanks to Purple Monkey for raising this issue - this has been modified for users who don't have either a %skip% or an %added% field)

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

foo_DAR: auto rating

Reply #30
Tested all versions of the formula with cue sheet + wavpack file and worked fine; more due to foobar than anything I've done. I preferred the results from foo_DAR_full (but this is more to do with foo_playback_custom).

Both foo_playcount and foo_playback_custom treated the cue sheet "tracks" as real tracks and thus assigned ratings correctly.

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

foo_DAR: auto rating

Reply #31
Would you consider making a version that incorporates the %RATING% tag? I rate my songs between 0 and 5, the higher the value the better.

foo_DAR: auto rating

Reply #32
Regarding foo_DAR_noskip:

How much emphasis is given to %length_seconds% and %last_played%?

My top two rated tracks are as follows

Code: [Select]
Track     Time     %play_count%     %added%        %last_played%    Rating
--------------------------------------------------------------------------
a         5:28        40            2006-12-31      2008-04-30       11159
b         3:01        47            2007-05-15      2008-04-24       10969

foo_DAR: auto rating

Reply #33
Hi metal_termite
Would you consider making a version that incorporates the %RATING% tag? I rate my songs between 0 and 5, the higher the value the better.

I thought about that and chose not to. However, I will consider it.

The reason I didn't like the idea was because it defeats the purpose of foo_DAR which is to allow your actual behaviour to inform you about how much you really like a song; i.e. it attempts to by-pass unconscious judgements about a song. For example I was unpleasantly (in relation to how cool I might think I am) shocked about how much I liked Ready For The Times To Get Better by Crystal Gayle. Silly judgement, sure .. but that's why I wrote foo_DAR. I believe it's a better judge than "I" am.

How much emphasis is given to %length_seconds% and %last_played%?

That's a good question - and has made me think.
Download this and you can see for yourself.

The answer is that in this case the %length_seconds% is the predominant factor.
In the spreadsheet linked to above, you can see that if both tracks were 5:28 and both tracks were played 40 times:

Track a) 11159  (foobar)  --- (excel gives 11167)
Track b) 11352  (excel) 

(the disparity is due to Excel's treatment of dates and rounding versus foobar's -- but close enough to get the idea)

That should show you that the date elements have an effect but not as much as the duration.
The reason for the duration is that foo_DAR_full has %skip% and the longer the track the more likely it is to be skipped, but I'm now thinking at present this may be a little clumsy and I might need to smooth this somewhat.

So thanks for this example as it's a good one since the duration difference (although almost double) is still marginal in relation to normal track lengths.

I'll see if I can find a way to normalise this and yet still provide advantage for long tracks like Free Jazz by Ornette Coleman (37 mins). Sitting through that might make me cool but it's quicker to listen to Ready For The Times To Get Better by Crystal Gayle 10 times. 

Hope that answers your question.
C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

foo_DAR: auto rating

Reply #34
Okay - I've got a nice and simple solution which so far seems to work really well. Looking at it I had something similar but not as good or simple which I abandoned - I think this will make a decent improvement.

I'll do some testing this evening, and will hopefully have this done by tonight.

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

foo_DAR: auto rating

Reply #35
Thanks, and I see your point regarding the %RATING% tag.

 

foo_DAR: auto rating

Reply #36
Okay. foo_DAR v.3's are out, for download see Post 2.

@metal termite: v.3 smooths out the duration part of foo_DAR_noskip, so now it looks like this:

 ).

<edit>Oh yeah, in v.3 I've added a floor (00001) to the rating to stop it going negative due to the penalty calc - if you added a track 6 years ago and only just got round to playing it today the penalty (quite rightly is pretty severe and) would push it into the negative. </edit>

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

foo_DAR: auto rating

Reply #37
Thanks Carpman, the updated algorithm produces better results. 

Code: [Select]
Track     Time     %play_count%     %added%        %last_played%    Rating
--------------------------------------------------------------------------
b         3:01        47            2007-05-15      2008-04-24       10957
c         3:04        27            2008-03-03      2008-04-11       10906
a         5:28        40            2006-12-31      2008-04-30       10857

foo_DAR: auto rating

Reply #38
metal termite

Just out of interest, are these results from the formula pasted above or from the new v.3 formula from post no. 2?
Results look good, thanks for bringing this up, it's definitely improved foo_DAR_noskip.

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

foo_DAR: auto rating

Reply #39
Those are the results from the formula of the above code in post number 37.

foo_DAR: auto rating

Reply #40
Okay. Thanks.

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

foo_DAR: auto rating

Reply #41
EDIT: Nevermind. You're already aware that the new playback statistics component messes up foo_dar.

foo_DAR: auto rating

Reply #42
The most recent Playback Statistics (2.1.1) component causes havoc with foo_dar. All my tracks have a score of 10000. I suppose it has something to do with the added tag.

Yes, I'm afraid it does. As far as foo_DAR is concerned (or anything else for that matter) all your tracks are now < 1 day old.

I posted about this.

I'm staying well away from Playback Statistics until it measures up to foo_playback_custom. I ran it on my test install and it did the same thing.

The new Playback Statistics made the %added% work from the time now!

I think something has been implimented which may now copy %first_played% as %added% instead - but %first_played% and %added% are not the same thing and this obviously negates some of the foo_DAR stuff. Why some kind of transfer of existing data to PlaybackStatistics.dat can't be sorted out I don't know, perhaps it can be, or even will be, I don't know.

Why foo_playcount can't have a % played before being counted as played I don't know either.
And why foo_playcount can't have a %skip% count I don't know either.
These are question for foobar2k devs, not me.

Hope you have your data backed up.

Sorry I can't be any more helpful.

C.

<edit>What's nice about foo_playback_custom and the cutom info db it uses is that this kind of thing can't happen - it's so easy to manipulate the data in the database. So for example I can easily add the date I installed foobar2k (or foo_playback_custom) as an %added% date to a large proportion of my tracks.</edit>
PC = TAK + LossyWAV  ::  Portable = Opus (130)

foo_DAR: auto rating

Reply #43
Hope you have your data backed up.


Yeah, Windows Shadow Copy just saved my butt because I hadn't backed up foo_playcount.dll and PlaybackStatistics.dat

Hopefully future versions of the Playback Statistics components will incorporate already existing %added% tag values into the database as you said.

foo_DAR: auto rating

Reply #44
Glad you were saved.

It's a funny situation at present, with cwb_hooks soon to be deprecated.
I normally run 2 copies of foobar (with foo_DAR going on I've got 3 on the go for testing). I can easily see a situation in 5 years from now where for playing my music I'm still using 9.4.3 and my other version (which is very lightweight for work, processing, ABX etc ..) is the very latest version 11.5.6 or something. I wonder if they will even be on speaking terms by then? 

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

foo_DAR: auto rating

Reply #45
EDIT: Nevermind. You're already aware that the new playback statistics component messes up foo_dar.

Just for the sake of clarification and accuracy:
The new playback statistics component appears to substantially alter the user's existing %added% data, which in turn "messes up foo_dar".

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

foo_DAR: auto rating

Reply #46
Hello,

i try to use foo_DAR in foobar 0.9.5.2 with DUI
I have all the components installed without "columns UI"
I have done all as described in your "foo_DAR_fullsetupinfo.rtf"
In my Playlist i can show the column "DAR" and "DARSET".
The column "DAR" is always empty.
The column "DARSET" i can fill by the context menu: "Custom Info - Rating - Set DAR"
Why is the column "DARSET" not filled automatically while playing (or after playing) the title ?

Paul

foo_DAR: auto rating

Reply #47
Hello,

i made some experiments: I choosed the Systemdate of my PC to see what happens.
I have played a song a second time and the Rating was still 10000 (as before)

Is it possible to make it work with 0.9.5.2 DUI ?

Paul

Hello,

i made some experiments: I choosed the Systemdate of my PC to see what happens.
I have played a song a second time and the Rating was still 10000 (as before)

Is it possible to make it work with 0.9.5.2 DUI ?

Paul

foo_DAR: auto rating

Reply #48
Just for the sake of clarification and accuracy:
The new playback statistics component appears to substantially alter the user's existing %added% data, which in turn "messes up foo_dar".

C.


Does using $meta(added) work? I would assume that this would only use tag info. (or $cinfo(added) if you only store it in foo_custominfo.)

foo_DAR: auto rating

Reply #49
Hello,
i try to use foo_DAR in foobar 0.9.5.2 with DUI
I have all the components installed without "columns UI"
I have done all as described in your "foo_DAR_fullsetupinfo.rtf"
In my Playlist i can show the column "DAR" and "DARSET".

Hi northwall

foo_DAR has been tested with foobar 0.9.5.2 DUI and works fine.

I need to know which version of foo_DAR you are using.
I assume it's foo_DAR_full?

As far as DARSET (as per foo_DAR_fullsetupinfo.rtf) this is purely to take a "snapshot" of your ratings.
So for example, if at the start of the year you want to make a benchmark rating - you'd use the DARSET instructions. At the end of the year you'd be able to see who's going up and who's going down.

Are you getting 10000 ratings for all your tracks? If so this will be related to your %added% data. If this is less than 8 days ago you will get a 10000 rating. So for a brand new setup you WILL get 10000 for the first week (that means it's working).

Also you can change the 7 in the code below to 0 to test this:

$puts(ra,$mul($add(1000,$div($mul(%length_seconds%,$sub(%play_counter%,$div(%skip%,2))),100)),10))
$puts(dd,$div($add($cwb_datediff(%added%,%last_played%),50),10))
$puts(pp,$div($mul(%play_counter%,10000),$cwb_datediff(%added%,%cwb_systemdatetime%)))
$puts(pd,$mul($get(dd),$get(pp)))
$puts(pd2,$div($get(pd),100))
$puts(pd3,$div($mul($cwb_datediff(%added%,%cwb_systemdatetime%),125),100))
$puts(pd4,$div($get(pp),40))
$puts(pd5,$div($mul($cwb_datediff(%added%,%first_played%),5),%play_counter%))
$puts(pd6,$add($get(pd3),$get(pd5)))
$puts(r1,$add($get(pd2),$get(ra)))
$puts(r2,$add($get(pd4),$sub($get(r1),$get(pd6))))
$puts(r3,$ifgreater($get(r2),0,$get(r2),1))
$puts(r4,$ifgreater($cwb_datediff(%added%,%cwb_systemdatetime%),7,$get(r3),10000))
$ifgreater(%play_counter%,0,$num($get(r4),5),-----)

If that "solves" the issue, then remember to change this back to 7 later. See this post for why.

If it's something else then what I suggest is setting up a test column enter the following fields one by one and post the outcome for an example track:

1) %play_counter% or %play_count%
2) $cwb_datediff(%added%,%cwb_systemdatetime%)
3) $cwb_datediff(%added%,%first_played%)
4) $cwb_datediff(%added%,%last_played%)

Also, let me know which version you are using (i.e. foo_DAR_full v.3) and we'll take it from there.



Just for the sake of clarification and accuracy:
The new playback statistics component appears to substantially alter the user's existing %added% data, which in turn "messes up foo_dar".

C.


Does using $meta(added) work? I would assume that this would only use tag info. (or $cinfo(added) if you only store it in foo_custominfo.)

@ purple monkey: I'm going to wait and see what happens with foo_playcount. Rather than try and second guess ways to get round its various peculiarities. Do you think users will always date stamp their tags with %added%? I'm not sure. At the moment it's a mess, we'd be better off with one stats component, that successfully manages all the relevant fields (skip, last and first played, added, played etc.) But hey, in the old days web devs had to make 2 different websites one for IE users and one for Netscape users.

C.

<edit>whoops -- HA posting went funny. That should be better </edit>
PC = TAK + LossyWAV  ::  Portable = Opus (130)