Auto Rate by Playcount and Days in Library

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Auto Rate by Playcount and Days in Library

by Sgrom » Wed Sep 20, 2006 1:41 pm

Sweet, thats awesome of you. Keep up the good work, im looking forward to it! Your script is first time ive started using favorites, and the only way I would bother using them :D

by Big_Berny » Wed Sep 20, 2006 1:38 pm

I'll create a "compatibility mode" maybe... Although it's a bug of monkeyrok and mediamonkey. The devs should precisely define the rating values. I'll send a message to jiri or rusty.

Big_Berny

PS: I'll simply my scirpt anyway. And believe me: I'll do it so simple that also you can modify the formula! :)

by Sgrom » Wed Sep 20, 2006 1:24 pm

Lucky bastard! Enjoy Amsterdam.

Yeah, but wouldnt the problem be sorted by setting a cap of 100, and I mentioned dividing the playcount by a variable depending on the highest playcount in your library to ensure you dont get ratings above 100.

No need to make it easier to edit as I doubt I would know what to do anyway, im studying finance so can only make really simple changes!

I really like your autorateacc script, the way it ranks the songs is very accurate and exactly what I want, however the fact that it doesnt enter the values in multiples of 10 causes it to have some problems. For example ratings arent displayed correctly under the ratings node. And monkeyrok doesnt show the right amount of stars for all 5 star songs.

The problem is fixed if I write the rating to the song tag, but I prefer to just have the ratings in the library, I dont use the synchronize tags feature of MM at all :/

by Big_Berny » Wed Sep 20, 2006 1:10 pm

Hi Sgrom,
well, AutoRateAccurate uses a very similar formula like yours!

But your way has two problem:
1. You can get ratings over 100 and MediaMonkey doesn't show anything if this happens.
2. The ratings are not stable. After someyears the playcounter will be much higher than at the beginning, so you have to modify the formula after a while.

This is why my script has a auto-calibrate-function. It looks that that the number of songs (in %) which get a specific rating (for example 5*) stays constant. The advantage is that you don't have to modify the formula and that you can easioly change it. The script will always look that for example 5% with the best point-value (calculatoed by the formula). So the range of points ca be from 0 to 100 or from 0 to 1000000 - you always get a good rating-spread (which you can define in the optiuonsheet btw).

If you want you can use your formula with my script, you just have to modify the formula lines. If you want I'll create a new version in which it will be even easier to change the formula. But you have to wait two weeks because I to Amsterdam tomorrow for 6 days! :)

Big_Berny

by Sgrom » Wed Sep 20, 2006 4:13 am

Hey hey

Nice idea. Thanks for all the work you already done on creating this script steegy :)

I know this topic has been inactive for a while but I had an idea on a similar way to rate songs. What about using a formula similar to this:

Playcount * (Library Age^(1/2)/Dateinlibrary^(1/2)) * (1+(0.5-0.days since last play).

Im not sure if this is possible, or what type of results it would produce, but my thinking is that it doesnt use existing ratings so this script could be used to write directly to the rating. Also I think any rating should take into account age in library, as you have already explained because songs with high play counts that are "newer" should clearly have a higher rating than a song with the same count that you have had for 5 times as long! The last part of the formula is just a multiplier to increase the rating if the song has been played recently, it will increase the rating by a maximum of 1.5 if it has been played in the last 50 days.

The actual numbers above could be tweaked, but here is an example of the results it would generate.

Eg 1:
Play count: 41
Days in library: 72 days
Library age: 180 days
Last played: 15 days ago

Rating = 41 * (180^(1/2)/72^(1/2)) * (1.+(0.5-0.15))
= 87.5

Eg 2:
Play count: 10
Days in library: 231
Library age: 320 days
Last played: 62 days ago

Rating = 10 * (320^(1/2)/231^(1/2) * (1.0+(0.5-0.5))
= 11.7

From these two examples it seems to produce pretty good results for how I would like my songs rated? The ageoflibrary/daysinlibrary are both square rooted to keep the number a lot smaller and still keep the ordering the same, if that makes sense.

Would it be possible to make a script like this? It would also be good if the resulting ratings could be rounded to the closest multiple of 10 with an upper cap of 100, as according to lowlander the MM database stores ratings in multiples of 10.

I think this might be a cool way to rate songs, the only problem I could see with the current formula is that people with really old databases might get some huge ratings, so one more component might need to be added to the formula to weight for the age of your database. For example if somebody has a 1500 day old database and has just added a song to the library so its days in library are 1, his age multiplier will already be 38 and if he plays the song 3 times its rating will be 171. Similarly if you have a five year old database there may be songs you have played over 100 times which will obtain a 5 star rating no matter what.

Im sure this could be sorted out though. My solution would be to divide the playcount by a multiple depending on the highest played song in the library. Such as, if highest playcount is above 100, divide by 2, above 200, divide by 4, above 300, divide by 6 and so on.

Let me know what you guys think, sorry this post was so and complicated but hopefully it might be a good idea!

by Big_Berny » Sat Jun 24, 2006 5:11 am

Hi CriticalTodd,
you could also try my Script AutorateAccurate which works very similar but has much more features: http://www.mediamonkey.com/forum/viewtopic.php?t=10198

Big_Berny

by CriticalTodd » Fri Jun 23, 2006 3:52 pm

Thanks!

That's exactly what I needed.

by Steegy » Fri Jun 23, 2006 3:37 pm

Sure, this is a modification of the normal iRate script, so it rates a song when it starts playing.

You only need one file (CalculateRatingMod.vbs), in MediaMonkey's Scripts\Auto folder.

CalculateRatingMod.vbs (Autoscript for the Scripts\Auto folder)

Code: Select all

Option Explicit


Sub OnStartup

    Script.RegisterEvent SDB, "OnPlay", "CalculateRating"

End Sub


Sub CalculateRating

    Dim Song : Set Song = SDB.Player.CurrentSong
    
    If Song.Rating = -1 Then 
        Song.Comment = (Song.PlayCounter / DateDiff("d", Song.DateAdded, Now)) * (1.5) * 1000 
    Else 
        Song.Comment = (Song.PlayCounter / DateDiff("d", Song.DateAdded, Now)) * (1 + (Song.Rating / 100)) * 1000 
    End If

    Dim SongList : Set SongList = SDB.NewSongList
    Call SongList.Add(Song)
    Call SongList.UpdateAll 

End Sub
The

Code: Select all

    If Song.Rating = -1 Then 
        Song.Comment = (Song.PlayCounter / DateDiff("d", Song.DateAdded, Now)) * (1.5) * 1000 
    Else 
        Song.Comment = (Song.PlayCounter / DateDiff("d", Song.DateAdded, Now)) * (1 + (Song.Rating / 100)) * 1000 
    End If
part is where the rating value gets added to the song comment, so that's the place for you to change stuff.

FAQ "How do I install scripts?": http://www.mediamonkey.com/faq/index.ph ... artlang=en

Cheers
Steegy

by CriticalTodd » Fri Jun 23, 2006 12:51 pm

Hey Steegy,

I'm a complete noob. Could you enlighten me on how to make that change to the script?

Thanks.

by Steegy » Fri Jun 23, 2006 12:46 pm

This script is a manual script. It adds an "Calculate Rating" entry to the menu Tools > Scripts submenu, that starts te script.
When the script runs, it will rate all the selected songs using the rating formula. The result will be stored in the song's comment field.

If you want, it can very easily be changed to start when a song starts to play.

Nice Script

by CriticalTodd » Fri Jun 23, 2006 11:27 am

Cool script.

Does this script autorun at MM start, trigger during playback, or do I have to manually fire it each time to update ratings?

by rovingcowboy » Tue May 02, 2006 9:52 am

i seen what agentsmart saw.?

but i am not sure how to do a top of the charts list on the ipod?

how ever you did not understand the list on monkey if you read it.

the top of the charts on monkey does not mess with the ratings.

the playcount it resets does not mess with the ratings the ratings
script from diddeleedoo goes by it or by the history count. you make
it keep track of songs for a longer time then one day. it then uses
the history playcount. so that is why the ratings are not changed.

but still i am not sure if that is what you really need on the ipod.
your system seems to be more complicated then media monkeys.

still thanks to agentsmart for suggesting it as an idea?.

by Amerie » Mon May 01, 2006 5:07 pm

Not sure that I want a Top of the Charts playlist.

I have ~5000 songs. Of these 3500+ are rated 4 stars. I am looking for a way to not have to mess with that rating.... because logically that's what they should be (and I would go mad if I had to constantly update ratings for the purpose of variety), but to have some granularity inside that, based on playcount over time.

e.g. I might have two 4 star tracks that I have listened to 50 times. But one of them has been in my library for 6 months, whereas the other has been there for 1 month. I'm looking for a way to differentiate the two and use that in my autoplaylists... for many reasons, such as so that the first track ends up in my playlists more often and so that the second track takes it place in my popular playlists.

I think this script will work for that.

by DiddeLeeDoo » Mon May 01, 2006 3:47 am

It's all an interesting puzzle, and I'm sure between us we'll find solutions that makes MM the one to beat! I just had an ahhhhh! moment with Option Sheets, so I'll sit with that puzzle for a bit. :)

by agentsmart » Mon May 01, 2006 3:37 am

sounds like she wants an autoplaylist for top of the charts that works on the ipod?
like cowboy wanted for media monkey. 8)

Top