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 126617 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

foo_DAR: auto rating

Reply #50
northwall, this may help explain:

Example 1:
Played for the first time 1 day ago (Last Played)
Was added 2 days ago (Age)
Thus the difference between when it was Added and when it was First Played is 1 (A:FP).
However because it has not been in the Library for more than a week (Age = 2) it gets a "pseudo rating" of 10000.



Example 2:
Played twice.
Was Added 53 days ago.
Was First Played 16 days after it was added.
Because it has been in the Library for more than a week (Age = 53) it gets a proper rating* (see below).
Furthermore, because it was First Played 16 days after it was Added. It is penalised to the tune of 40 ratings points (Pen):

((First Played - Added) x 5) / Play Count

or:

(16 x 5) / 2 = 40.

* "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 (the 2nd track in the list is a good example of this) 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"

Hope that's helpful.

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

foo_DAR: auto rating

Reply #51
Hello Carpman,

yes you're right i'm using foo_DAR_full v.3
Now i have tried to set the systemdate at the end of may. The rating i'm getting now is higher 10000. So i think everything is working fine. My Problem was that the ADDED-date is today and the first tests of foo_DAR is also today. So the rating is 10000.

I would like to use foo_DAR for rating automatically. In an Autoplaylist i can see the songs with the highest rating. So i can sometimes play the "Highest Rating Autoplaylist". But i think it is important, that the rating is done automatically. Do you think this is possible ?

Why i like the code is, that skipping a song does not take effect to the rating.


Northwall

foo_DAR: auto rating

Reply #52
I would like to use foo_DAR for rating automatically. In an Autoplaylist i can see the songs with the highest rating. So i can sometimes play the "Highest Rating Autoplaylist". But i think it is important, that the rating is done automatically. Do you think this is possible ?

1) I don't quite know what you are doing, but the rating is done automatically. The image above is from an autoplaylist, the ratings are calculated and displayed in real-time and in order.
(However, I've just noticed that the code in post 2 does not paste well into DUI's custom columns setup. I'll change the code format to work around this.)
Are you using foo_autoplaylist? If so simply copy and paste the code for the autoplaylist in post no.2 and that should work. That's what it's there for.

Why i like the code is, that skipping a song does not take effect to the rating.

Skipping a song does effect the rating (if you have foo_playback_custom and foo_custominfo and foo_DAR_full). But only after it is skipped more than once. The reason for this is:
a) the relevant section of the formula is: played - (skipped / 2) and foobar rounds down so that 1 / 2 = 0, or 3 / 2 = 1.
b) Skipping a song is only registered if you hit next (not if you double click on another song) - i.e. by hitting next you are saying on Default Play: "I don't like this song enough to wait for it to finish, I'd rather listen to the next one now"; on Shuffle Play: "I'd rather listen to anything but this", either way this should affect the rating of the song.

Thanks for making me re-look at the DUI custom columns code entry boxes. I'll sort that out very soon.

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

foo_DAR: auto rating

Reply #53
Updated  Post #2

Now the codeboxes are formatted (one long line) so that you can paste easily into either Columns UI or 0.9.5's DUI's custom columns setup.

I've also updated the Setup Instructions for foo_DAR full to cover the Default UI (also useful for people not too familiar with foobar2k installing foo_DAR_noskip).

Contents:
1) TESTING WITH THE foo_DAR FORMULA TEST SHEET
2) SETUP INTRO
3) COMPONENTS SETUP
4) SETTING UP A FOO_DAR RATINGS COLUMN (in DUI and Columns UI)
5) RATINGS BENCHMARK USING CUSTOM INFO & FOO_DAR
6) RATINGS AUTOPLAYLIST

It's now a non-formatted .txt file so relevant formulas can be pasted directly into AutoPlaylist, Default UI and/or Columns UI. You can download it from Post #2 or the link above. 

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

foo_DAR: auto rating

Reply #54
Why it's offline?

The requested URL /stuff/foo_DAR/foo_DAR_full_setup_info.zip was not found on this server.


foo_DAR: auto rating

Reply #56
Hello Carpman,

great work. Now it works as you descriped here. The fields DAR and DARSET are updated automatically.
I don't know what was wrong. All you described in your new foo_DAR_full_v3_setup_info.txt i have done before too.

It is right, your code is taking effect by skipped titles. I have done a experiment with Auto-Rating on my own in my first foobar (0.9.4.4). My formula looked like this: %playcount% / (%cwb_systemdatetime% - %firstplayed%). After trying it for a few weeks, i promised, that this was not a good way to rate songs. So i test your code.


Thanks a lot

Northwall

foo_DAR: auto rating

Reply #57
Hi Northwall

Glad you got it working. I think the explanation in the new setup file is a little better (especially re. DUI). Hope so anyway.

Just out of interest what code do you have in your "DARSET" column?
[I just added that as an optional benchmarking extra, courtesy of foo_custom_info really. I was using it initially in testing to measure the rate of ratings decay, and thought it might be nice for others if they were interested.]

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

foo_DAR: auto rating

Reply #58
Hello Carpman,

in my DARSET-column i have the following code: %darset%

if you meant the DARSET in the Custom-Info Plugin:
$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),-----)


Greetings

northwall

foo_DAR: auto rating

Reply #59
Yeah that's cool.
So the custom info "snap-shot" code that you provided gives a static outcome as outputted by %darset%, whereas the DAR column is always giving "live" results, which are ranked, if used in conjunction with an autoplaylist, highest to lowest.

Excellent.
Thanks Northwall for the info. Glad you got it all working fine  .

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

foo_DAR: auto rating

Reply #60
Playback Statistics 2.1.3 (foo_playcount) has been updated and now imports the %added% tag (and %rating%) from files. It does not seem to have any adverse effects on foo_DAR that I can see.



foo_DAR: auto rating

Reply #62
Ah, you're right in the post. I only looked at my "top rated tracks" autoplaylist which contain tracks that already had a play count. Tracks that had no play count didn't get their %added% tag imported. Good find.

foo_DAR: auto rating

Reply #63
metal_termite & Bollerkopp

Thanks for the info re. Playback Statistics.

Yes, I tested Playback Statistics 2.1.3 and had the same results as you. It didn't import %added% from tags to db. However, this is not really a foo_DAR matter; it's a GIGO (garbage in [leads to] garbage out) matter and in general, as far as the foo_DAR formula is concerned:

Garbage In: (e.g. where %added% is later than %first_played%) is a matter for the developers of the stats/playcount plugins.
Garbage Out: (where there is no garbage in) is a matter for me as it suggests the foo_DAR formula is not working as well as it might with valid data.

That said, thanks for keeping me informed, appreciate it. 

Personally I won't be switching to Playback Statistics until:

1) they sort this %added% issue out
2) they include a skip count (so that at any time someone hits "next" a %skip% is registered).
3) it allows the user to set the % a track is played before it's counted as played (an added bonus would be to have this option for a %skip% count too, as a user could say if the track is skipped after 90% played don't count it as skipped).

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

foo_DAR: auto rating

Reply #64
First thank you for this auto rating script. It works quite good for me. I modified it a little to suit my need.

Here's a version of foo_DAR_noskip v.3 that doesn't need foo_cwb_hooks for Columns UI. You need to enable "Make date info available" in Columns UI Preferences, Global tab. This does not work with DUI. The result is a little different than the original version due to me rounding off the date and Columns UI does not provide system minute and second.
Code: [Select]
$puts(a_fp_d,
$div(
$sub(
$add(
$mul($substr(%first_played%,1,4),8760),
$mul($substr(%first_played%,6,7),720),
$mul($substr(%first_played%,9,10),24),
$substr(%first_played%,12,13)
),
$add(
$mul($substr(%added%,1,4),8760),
$mul($substr(%added%,6,7),720),
$mul($substr(%added%,9,10),24),
$substr(%added%,12,13)
)
),
24
)
)

$puts(a_lp_d,
$div(
$sub(
$add(
$mul($substr(%last_played%,1,4),8760),
$mul($substr(%last_played%,6,7),720),
$mul($substr(%last_played%,9,10),24),
$substr(%last_played%,12,13)
),
$add(
$mul($substr(%added%,1,4),8760),
$mul($substr(%added%,6,7),720),
$mul($substr(%added%,9,10),24),
$substr(%added%,12,13)
)
),
24
)
)

$puts(a_curr_d,
$div(
$sub(
$add(
$mul(%_system_year%,8760),
$mul(%_system_month%,720),
$mul(%_system_day%,24),
%_system_hour%
),
$add(
$mul($substr(%added%,1,4),8760),
$mul($substr(%added%,6,7),720),
$mul($substr(%added%,9,10),24),
$substr(%added%,12,13)
)
),
24
)
)

$puts(dur,$div($add(%length_seconds%,180),2))
$puts(ra,$mul($add(1000,$div($mul($get(dur),$sub(%play_count%,$div(%skip%,2))),100)),10))
$puts(dd,$div($add($get(a_lp_d),50),10))
$puts(pp,$div($mul(%play_count%,10000),$get(a_curr_d)))
$puts(pd,$mul($get(dd),$get(pp)))
$puts(pd2,$div($get(pd),100))
$puts(pd3,$div($mul($get(a_curr_d),125),100))
$puts(pd4,$div($get(pp),40))
$puts(r1,$add($get(pd2),$get(ra)))
$puts(pd5,$div($mul($get(a_fp_d),5),%play_count%))
$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($get(a_curr_d),7,$get(r3),10000))
$ifgreater(%play_count%,0,$num($get(r4),5),-----)

foo_DAR: auto rating

Reply #65
Hi thuan

Looks interesting.

<edit>
Your code also seems to work with autoplaylist (I'm always surprised just how much code can be stuffed into that box). But as you said not with DUI (even if it did work I couldn't fit all that code into the custom column pattern box). [10/05/08: Doesn't work with Autoplaylist or DUI (as thuan stated below)]
</edit>

The result is a little different than the original version due to me rounding off the date and Columns UI does not provide system minute and second.
Well system minute and second is no big deal - there's a lot of rounding go on in the formula anyway - that's partly the reason for using such large numbers (a kind of replacement for decimal points).

My understanding, and I may well be wrong, is that with the new Playback Statistics users shouldn't need cwb_hooks. [Wrong]

Unfortunately there seem to be issues with exisiting %added% data not being imported into the Playback Statistics db.

It seems to me that Playback Statistics 2+ users need to check their date data is making sense (if foo_DAR is giving strange results this is the first place to look at present).
Ironically, this is where cwb_hooks is useful. e.g. I've been using:
$cwb_datediff(%added%,%first_played%)
to check the integrity of date data, while testing foo_DAR.

I had initially thought that one needed cwb_hooks to date stamp files, but am I right in understanding this is not the case?

Cheers,

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

foo_DAR: auto rating

Reply #66
Erh I have used official playcount for a really long time, so I don't have such added tag until version 2.1 and the new one will sync added tag to first played as a patched work.

Newly added songs after upgrading to newest version work fine for me.

foo_DAR: auto rating

Reply #67
Thanks thuan

That's useful to know. So as far as Playback Statistics users go:
a) No problem if you're a new user starting from scratch
b) No problem if you're an existing user with no previous added data (as you said, it now creates %added% from %first_played%)

So the only problem is, if you have existing %added% data (whether in custom info db or in tags) and you want Playback Statistics to import that.

Thanks for clearing that up for me. 

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

foo_DAR: auto rating

Reply #68
thuan,
Your code seems to work with autoplaylist (see post below your code post).
Cheers,
C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

foo_DAR: auto rating

Reply #69
Are you sure? AFAIK those system time fields of Columns UI only work in its playlist views. So if it works in any other places really surprise me. And my setup doesn't have the old autoplaylist component currently. So could you double check it to be sure?

foo_DAR: auto rating

Reply #70
Sure, I'm just checking for myself too. I have to wait for play count test data to be > 1 day old.
C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

foo_DAR: auto rating

Reply #71
thuan

You're right and I was premature & wrong.
Your version does give an output in Autoplaylist, somehow (presumably it just omits all date related calculations), but not one that makes sense.

Simply put, your formula won't work, just as you predicted, in Autoplaylist.

I've edited the post above to avoid confusion.

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

 

foo_DAR: auto rating

Reply #72
I updated my mod version of foo_DAR_noskip to use new functions in foobar 0.9.5.3 and optimized the code a little, it should be a little faster for ppl with less powerful systems or already complicated Columns UI scripts.
Code: [Select]
$puts(a_hour,
$add(
$mul($year(%added%),8760),
$mul($month(%added%),720),
$mul($day_of_month(%added%),24),
$substr(%added%,12,13)
)
)

$puts(a_fp_d,
$div(
$sub(
$add(
$mul($year(%first_played%),8760),
$mul($month(%first_played%),720),
$mul($day_of_month(%first_played%),24),
$substr(%first_played%,12,13)
),
$get(a_hour)
),
24
)
)

$puts(a_lp_d,
$div(
$sub(
$add(
$mul($year(%last_played%),8760),
$mul($month(%last_played%),720),
$mul($day_of_month(%last_played%),24),
$substr(%last_played%,12,13)
),
$get(a_hour)
),
24
)
)

$puts(a_curr_d,
$div(
$sub(
$add(
$mul(%_system_year%,8760),
$mul(%_system_month%,720),
$mul(%_system_day%,24),
%_system_hour%
),
$get(a_hour)
),
24
)
)

$puts(dur,$div($add(%length_seconds%,180),2))
$puts(ra,$mul($add(1000,$div($mul($get(dur),$sub(%play_count%,$div(%skip%,2))),100)),10))
$puts(dd,$div($add($get(a_lp_d),50),10))
$puts(pp,$div($mul(%play_count%,10000),$get(a_curr_d)))
$puts(pd,$mul($get(dd),$get(pp)))
$puts(pd2,$div($get(pd),100))
$puts(pd3,$div($mul($get(a_curr_d),125),100))
$puts(pd4,$div($get(pp),40))
$puts(r1,$add($get(pd2),$get(ra)))
$puts(pd5,$div($mul($get(a_fp_d),5),%play_count%))
$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($get(a_curr_d),7,$get(r3),10000))
$ifgreater(%play_count%,0,$num($get(r4),5),-----)

foo_DAR: auto rating

Reply #73
So does 0.9.5.3 also add %_system_year% etc? I was under the impression that it wouldn't.

foo_DAR: auto rating

Reply #74
As Peter said somewhere, no (it has been repetitively quoted) . But I use Columns UI so no problem for me.