Auto Rating of Songs & Radio Announcer v5.02 [Script]

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo »

If for nothing else, it would be fun... My database is only 5 weeks old.

Only those 'repeated plays' songs may get playcount upgrade by a script like this, so all the unplayed stuff will stay untouched.

Basically if you got a new album for 4 weeks ago, and played it a bit then, this script will catch things like this, and do a playcount rate consideration of it.

Thank you for informing about your experience with the tweaked version. I just went back and changed the info about this tweak a bit.
Image
MeMeMe
Posts: 272
Joined: Fri Dec 23, 2005 11:42 am
Location: In front of my computer

Post by MeMeMe »

One thing I considered asking about, and Keith the cowboy's usage also would benefit from this:

Have the ability to configure two simultaneous tracking periods, one short, and one long.
So, one person might have Players Per Day and Plays per 30 days as short and long, and another might have Plays per 7 days for short, and total history for long.
You'd need to be assign different Plays for each period for each star rating.

Also, in my tireless search for potential bugs I've discovered something else: if the Safe Zone (default 10 seconds) is longer than the song duration, that song will not get ranked - the script ignores it.
I disocovered this by changing skip zone to 20 seconds, and those 15 second tracks were ignored. Having some correction factor (like that percent one: If % > 95, set to 95) might be a good idea.
rovingcowboy
Posts: 14163
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy »

MeMeMe wrote:One thing I considered asking about, and Keith the cowboy's usage also would benefit from this:

Have the ability to configure two simultaneous tracking periods, one short, and one long.
So, one person might have Players Per Day and Plays per 30 days as short and long, and another might have Plays per 7 days for short, and total history for long.
You'd need to be assign different Plays for each period for each star rating.

Also, in my tireless search for potential bugs I've discovered something else: if the Safe Zone (default 10 seconds) is longer than the song duration, that song will not get ranked - the script ignores it.
I disocovered this by changing skip zone to 20 seconds, and those 15 second tracks were ignored. Having some correction factor (like that percent one: If % > 95, set to 95) might be a good idea.
that's not a bug.

it did just what you told it to? it followed your order and left 20 seconds be the set limit.

15 second file?

must be a strange song. if any but i don't think it would be considerd a song if that short, because a song has to be sung a diddy is just music when it is that short.

"this is the shortest song in the world."

that is the title and lyrics to the song by kenny price and it is only 16 seconds long and has musical back up.

i use it for a great fill song.

as well as the 3 second blank files i have.
( i set the options to never ignor songs )



now double tracking means double headache for the author. and double migrane for the testers.

as how would you ever know which code was not working when they would both fight with the rating you would never know what is the best one.

but this autorating script now and the new one in the works for history counts will be two codes but i think he is going to get rid of the current script when he makes the history one. it is best to keep the scripts straight that way.

8)
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
MeMeMe
Posts: 272
Joined: Fri Dec 23, 2005 11:42 am
Location: In front of my computer

Post by MeMeMe »

Yes, I was being a bit light-hearted when I said a potential bug.
I was raising the possibility that someone might set their safeskip period higher than the song duration - someone might concievably set the safeskip period to a minute or more, for example.
It's best when programming to account for all possible contingencies - you never know what damn fool things those users will get up to! :)

The potential for the two time tracking periods to interfere with each other can easily be eliminated in code. (Whether diddly wants to do it or not is another matter!)
You have one procedure that checks for one duration, sees if a change is needed, and doesn't make any changes at this point - it just recprds the new score in a variable.
Then the other procedure runs, and works out if a change is needed, and calculates it's new score.
Then you simply assign the highest score of the two.
DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo »

I guess you could be solved like:

If Skip Hot Zone <=0 do nothing, and let the user rate this song manaully.
Image
DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo »

Wonder if this could be a way to word that section of multi-plays.

Code: Select all

'PlaysRate_3_0_Stars is <= # plays, rating should be at least 3.0 stars
'PlaysRate_3_5_Stars is <= # plays, rating should be at least 3.5 stars
'PlaysRate_4_0_Stars is <= # plays, rating should be at least 4.0 stars
'PlaysRate_4_5_Stars is <= # plays, rating should be at least 4.5 stars
'Anything over get 5.0 Stars
Reason I want to improve that section, is simply that I consider skipping an option sheet. It is really a Set & Forget script.... and I do not see why the poor hardworking MediaMonkey should bother loading an Option sheet every time MM starts for a script like this.

That's my current feeling about it anyways..... while taking a break from all this.

Seeing it here, I think that should do the trick. it's advanced parameters anyways, so it's for advanced users, who wants to try their theories.
Image
rovingcowboy
Posts: 14163
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy »

you keep making ways for it to be easier for me to :roll: monkey :roll: with the code.

i promise to stop screwing up the codes i send you in pm's that i think work but really don't. :lol: i just keep trying to figure this coding stuff out. :(
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo »

I'm with you, I'm in the same boat..... lot to learn...
Image
DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo »

Early stage of a Catch-Up script, with Rating Calibrator.

If you wonder why it only goes from 3.0 - 5.0 Stars, it's because AutoRateSongs.vbs skips suppose to push ratings below this level. If a song is registrated as played, it could not be that bad. However, since MM register a song to be played like 30% into the song, there is room for going down to 2 Stars maybe.

This script do NOTHING but estimating the results at this stage

This script run in about 3 seconds on my machine, with a 5 weeks old database, and a total number of plays of around 5000. If you play a lot, and have had your database awhile, it may take a while to finish the estimate.

My results
Image

I have set the AutoDJ to play songs I haven't played before, so I get a lot of 3 Stars because of that... a more normal database could give more interesting results.

Results from a database with almost 25,000 plays over about 3 years!
Same calibration as in the script (took about 20 to 25 seconds to complete)
Image

For the scripts.ini file

Code: Select all

[AutoRateCalibrator]
FileName=AutoRateCalibrator.vbs
ProcName=AutoRateCalibrator
Order=60
DisplayName=Catch up with Ratings (Estimate)
Language=VBScript
ScriptType=0
And the Script AutoRateCalibrator.vbs

Code: Select all

New Code coming soon
Last edited by DiddeLeeDoo on Fri Apr 28, 2006 1:02 am, edited 6 times in total.
Image
MeMeMe
Posts: 272
Joined: Fri Dec 23, 2005 11:42 am
Location: In front of my computer

Post by MeMeMe »

Looking good. Is there a way to run the query on the full database history (so taking ALL plays into account), rather than using a set time window?

I'm not asking for just this script where it might not be all that practical - I may have a use of that in one of my own.
DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo »

This script go all the way back to day dot... when you got MM, and check for # of plays over one full day. So if you listened a lot to a song 1 year ago, that song will maybe get 5 Stars, even though you haven't played it for many months.

I may modfiy the wording of this.... from the day you left the MM database alone..... I've kept on deleting mine, which I now regret having done.. :(
Image
MeMeMe
Posts: 272
Joined: Fri Dec 23, 2005 11:42 am
Location: In front of my computer

Post by MeMeMe »

I know what you mean about regretting deleting the database, having done that once myself.
rovingcowboy
Posts: 14163
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy »

the following changes are what i have made in the auto ratings script.
in this winxp and they work. as shown.

i use this over a 1825 day period thats 5 years. and most of my songs are in the 2.5 stars to 5 stars range

now i know others don't use the complete star rating system.
but this code is giving a fairly decent rating on this winXp which might not be played everday of the week.

i changed the skip or degrade song so it will now only add half a star if the song has never been played before.

the last code i added the stuff needed to keep the ratings below
the set playcounts to match the new numbers for the 2 stars and lower.
it was simple i just copied the codes and added them to match the numbers i wanted. so the only thing i really did was change the numbers


Code: Select all


'Advanced parameters 
'""""""""""""""""""""""""""""""""""""""""""" 
' 
' When reached X plays in period set, upgrade.
PlaysRate_0_5_Stars = 2 'default = 0 over 1 day 
PlaysRate_1_0_Stars = 5 'default = 1 over 2 day 
PlaysRate_1_5_Stars = 8 'default = 2 over 3 day 
PlaysRate_2_0_Stars = 11 'default = 3 over 4 day 
PlaysRate_2_5_Stars = 17 'default = 4 over 1 day 
PlaysRate_3_0_Stars = 20 'default = 5 over 2 day 
PlaysRate_3_5_Stars = 22 'default = 6 over 3 day 
PlaysRate_4_0_Stars = 24 'default = 7 over 4 day 
PlaysRate_4_5_Stars = 28 'default = 7 over 5 day 
PlaysRate_5_0_Stars = 30 'default = 7 over 5 day  

Code: Select all


'--------------------------------------------------- 
'  SONG SKIPPED, DEGRADE OR NOT? 
'--------------------------------------------------- 

   If Int(arSongRating) < 0 Then 
'     Skipped and unrated = 0.5 Star 
      If Not dbTable.EOF Then 
        dbSong.Rating = 10 
        dbSong.UpdateDB 
      End If 

   ElseIf Int(arSongRating) >= 10 Then 
'     Previously rated, reduce 0.5 Star 
      If Not dbTable.EOF Then 
        dbSong.Rating = Int(arSongRating)-10 
        dbSong.UpdateDB 
      End If 
   End If 

Code: Select all



'       PlayCountRating based on # of plays 
   If dbPlayCount <=PlaysRate_0_5_Stars Then 
      PlayCountRating = 0 
   ElseIf dbPlayCount <= PlaysRate_1_0_Stars Then  
      PlayCountRating = 10
   ElseIf dbPlayCount <= PlaysRate_1_5_Stars Then  
      PlayCountRating = 20 
   ElseIf dbPlayCount <= PlaysRate_2_0_Stars Then 
      PlayCountRating = 30 
   ElseIf dbPlayCount <= PlaysRate_2_5_Stars Then  
      PlayCountRating = 40 
   ElseIf dbPlayCount <= PlaysRate_3_0_Stars Then 
      PlayCountRating = 50 
   ElseIf dbPlayCount <= PlaysRate_3_5_Stars Then  
      PlayCountRating = 60 
   ElseIf dbPlayCount <= PlaysRate_4_0_Stars Then  
      PlayCountRating = 70 
   ElseIf dbPlayCount <= PlaysRate_4_5_Stars Then 
      PlayCountRating = 80 
   ElseIf dbPlayCount <= PlaysRate_5_0_Stars Then 
      PlayCountRating = 90 
   Else 
      PlayCountRating = 100 
   End If 
  


8) :P
Last edited by rovingcowboy on Sat Apr 29, 2006 9:57 am, edited 2 times in total.
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
rovingcowboy
Posts: 14163
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy »

DiddeLeeDoo wrote:This script go all the way back to day dot... when you got MM, and check for # of plays over one full day. So if you listened a lot to a song 1 year ago, that song will maybe get 5 Stars, even though you haven't played it for many months.

I may modfiy the wording of this.... from the day you left the MM database alone..... I've kept on deleting mine, which I now regret having done.. :(

i think a better line would be.

" From the Date of your Last Replacement of your database until the Present Date "

8)
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo »

Cool stuff!! You have to report how they work out in real-life!
And yes, you definition of the 'catch-up' script is better, thank you.

Actually, when I think about it, I mentioned in the script that a weekly option is on the To-Do list.. and those considerations should be in there.

Could turn out really cool... I'll test the weekly stuff with the data I have available,and put some priority on a weekly option!
Image
Post Reply