Auto DJ - RadioFreeMonkey

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 DJ - RadioFreeMonkey

Re: Auto DJ - RadioFreeMonkey

by dragulaas » Mon Oct 26, 2009 6:16 am

ahhh forget it....hve got the first script working....thx for ur help man.

nyways have autorateaccurate installed which takes care of the ratings n keeps them uptodate based on the playcount n lots of other parameters. So i think it shouldnt be much of a problem if i use the 1st script. :wink:

Re: Auto DJ - RadioFreeMonkey

by rovingcowboy » Sat Oct 24, 2009 8:34 am

vbs is a tricky pile of monkey stuff.

but check the left side of the lines in the ini file that you added,
check the left side and the top line in the script you saved from the others.

make sure there is no space between the left side of the notepad in both.
and in the one you saved make sure there is no blank line at the top.

just put the curser to the left of each line and hit the backspace once or the delete button
make sure not to erase any of the line of code or move the line up once. just put the first
letter on the left.

now on the top of the vbs you saved make sure you back space that top line of code up to the top and
over to the left.

that might be the trouble i've had that happen a lot when i was putting the scripts in like this.
8)

Re: Auto DJ - RadioFreeMonkey

by dragulaas » Fri Oct 23, 2009 11:08 pm

thx for that. will try it out

Sorry but its still not working. I saved the script as autoDJ-PlayCount.vbs in Scripts/Auto. I also copy pasted the code given by u in the Scripts.ini. When i run mediamonkey i get the following error.

Image

m i still goin wrong somewhere or der is a problem in the code. I use MM3.

Re: Auto DJ - RadioFreeMonkey

by rovingcowboy » Fri Oct 23, 2009 10:01 am

go to the post of the second script
click on the select all to get all the script.

copy it and past it in to a notepad file save the notepad as a .vbs file
put that file in to the script folder for monkey , its in his program files folder.

i think you might need to put it in the auto folder in that scripts folder it seems
to be one that runs by its self.

then go to the scripts folder and find the scripts ini file open it with note pad
and paste this in there

Code: Select all

[AutoDJPlayCount]
FileName=autoDJ-PlayCount.vbs
DisplayName=Higher Play Counts are Played More Often
Language=VBScript
ScriptType=4
that is how you install scripts found in the forum posts with out any mmip file for them.

Re: Auto DJ - RadioFreeMonkey

by dragulaas » Fri Oct 23, 2009 9:38 am

The script seems to be quiet interesting. Can u pls provide instructions as to how to install dis script.

Re: Auto DJ - RadioFreeMonkey

by jomtones » Fri Aug 07, 2009 3:29 am

Forgive me but how do I install this? I tried saving the code as AutoDJRadioFreeMonkey.vbs in the C:\Program Files\MediaMonkey\Scripts\Auto folder but can't see it after a reboot...

Re: Auto DJ - RadioFreeMonkey

by Risser » Mon May 11, 2009 11:29 am

Guest wrote:Am I right to conclude that this is differnt than the old RADIOFREEMONKEY script?
Yeah, sorta. It uses the same rating algorithm to determine which songs should be more likely to be heard, based on rating & time since last played. But it pulls the actual songs using a different (easier/less accurate) algorithm. Also, it's an autoDJ script, rather than a script that pulls up 20 random songs into a window.

So, yeah.

I've updated the RFM script for MM3 if y'all want that too.
Peter

Re: Auto DJ - RadioFreeMonkey

by kazadharri » Sun May 10, 2009 12:04 pm

My bad forgot to log in.

Re: Auto DJ - RadioFreeMonkey

by Guest » Sat May 09, 2009 2:23 pm

Am I right to conclude that this is differnt than the old RADIOFREEMONKEY script?

/Jeff

Re: Auto DJ - RadioFreeMonkey

by rovingcowboy » Fri May 08, 2009 3:52 pm

trixmoto wrote:That was an "OnPlay" script, Teknojnky is correct that the "AutoDJ" scripts are new to MM3 and allow you to create a new source for MM's auto DJ rather than adding tracks manually to Now Playing as we had to before.
i wasn't saying he was wrong there, i just said there was a script i thought that was like the autodj scripts.
but thanks for the confirm.. 8)

Re: Auto DJ - RadioFreeMonkey

by nynaevelan » Fri May 08, 2009 12:59 pm

Thanks, I'll give it a whirl this weekend.

Nyn

Re: Auto DJ - RadioFreeMonkey

by Risser » Fri May 08, 2009 12:55 pm

nynaevelan wrote: I'm confused as to your post. I am not looking for a script to set ratings nor a script to create playlists. I want an autodj script that would make it's selections based on the playcounts instead of ratings but to exclude certain genre's, such as holiday. Or if not exclude the particular genre's, then to select the tracks from a certain filter. How is this different?? My ratings system is based on playcounts so I want the script to select songs which I like, ie I've played them over a certain amount of times. I already have playlists created for when I want to listen to those least played tracks. Every now and again I would like to have someone else pick the tracks I listen to but none of the autodj scripts meet my needs except there was an external one but I don't know sql and I prefer internal scripts so that one was not usable for me. Should I open a request for such a script??
So, something that weights based on playcount? If I'm reading correctly, you'd like things that have a higher playcount to be played more often?

That should be easy.

Let me see...

(5 minutes later)

I don't know if this works, but it's close. I basically subbed playcount for the complicated rating calc. So things with higher playcounts have a greater chance of getting played.
It's got the same bias problems that the other one has, but it's quick.

Peter

Edit: I forgot to exclude genres. Again this is totally untested so it probably won't work straight out of the gate, but you should be able to tweak it to make it work.

Code: Select all

' An AutoDJ the plays items with a higher playcount more often and exclude some genres
' by Peter Risser
' v1.0
' 2009-05-08

Option Explicit
'
' [AutoDJPlayCount]
' FileName=autoDJ-PlayCount.vbs
' DisplayName=Higher Play Counts are Played More Often
' Language=VBScript
' ScriptType=4


' %%% The minimum number of days that must pass before a song is repeated.  Zero means, go ahead
'     and repeat it right away.
Const MinDaysRepeat = 4

' %%% A pipe delimited list of genres to ignore.
Const ignoreGenres = "Holiday|Polka|" & _
			"Bubblegum|Cheese"



Dim daysSincePlayed : daysSincePlayed = "round((julianday('now') - julianday('1899-12-30') - Songs.LastTimePlayed),0)"
Dim badGenreList : badGenreList = Split(ignoreGenres,"|")
Dim badGenreExclusionClause : badGenreExclusionClause = ""
For i = 0 to UBound(badGenreList)
	badGenreExclusionClause = badGenreExclusionClause & " AND Songs.Genre <> '"&badGenreList(i)&"'"
Next


Sub InitConfigSheet( Panel)
  ' TODO: Make the configurable items actual options in the dialog.
End Sub
 
 
' Panel = Panel where UI controls were previously placed by the script
' SaveConfig = Whether user pressed Ok and values in the dialog should be applied and saved (to registry, ini file, or so)
Sub CloseConfigSheet( Panel, SaveConfig)
  ' TODO: Save values to Registry, apply them to our internal variables.
End Sub
 
 
Function GenerateNewTrack
  Dim SQLStatement, TotalsSQLStatement
  Dim SELECT_Clause, SELECT_TOTALS_Clause, FROM_Clause, WHERE_Clause, ORDER_Clause
  Dim Iter, res, total, max, min, delta, cutoff, ID
  Randomize
  SELECT_Clause = " SELECT Songs.Id, "&weightedRatingFormula&" as rate "
  SELECT_TOTALS_Clause = " SELECT count(Songs.Id), max(Songs.PlayCounter), min(Songs.PlayCounter) "
  FROM_Clause = " FROM Songs "
  WHERE_Clause = " WHERE " &  daysSincePlayed & " > " & MinDaysRepeat & badGenreExclusionClause
  ORDER_Clause = " ORDER BY random(*)"
  TotalsSQLStatement = SELECT_TOTALS_Clause & FROM_Clause & WHERE_Clause
'res = SDB.MessageBox(SQLStatement, mtError, Array(mbOk))
  Set Iter = SDB.Database.OpenSQL(TotalsSQLStatement)
  total = Iter.ValueByIndex(0)
  max = Iter.ValueByIndex(1)
  min = Iter.ValueByIndex(2)
  delta = max - min
  cutoff = rnd() * delta + min

  SQLStatement = SELECT_Clause & FROM_Clause & WHERE_Clause & " and Songs.PlayCounter >= "&cutoff& ORDER_Clause

  Set Iter = SDB.Database.OpenSQL(SQLStatement)
  ID = Iter.ValueByIndex(0)
'res = SDB.MessageBox("max: "&max&"; cutoff:"&cutoff&"; result:"&Iter.ValueByIndex(1), mtError, Array(mbOk))
  Set Iter = SDB.Database.QuerySongs( "ID=" & ID)
  Set GenerateNewTrack = Iter.Item
End Function

Re: Auto DJ - RadioFreeMonkey

by Guest » Fri May 08, 2009 6:05 am

nynaevelan wrote:I'm confused as to your post. I am not looking for a script to set ratings nor a script to create playlists. I want an autodj script that would make it's selections based on the playcounts instead of ratings but to exclude certain genre's, such as holiday.
Maybe RadioDJ can help you there.
Set all the weightings for the ratings to the same value -- thus effectively disabling this feature.
RadioDJ uses playlists as input and it can boost entries that come before others.
So when you are able to create a playlist (or maybe auto playlist) that is sorted according your criteria, you have what you want.

Hope that helps.
CIAo, uwe..

Re: Auto DJ - RadioFreeMonkey

by trixmoto » Fri May 08, 2009 4:31 am

That was an "OnPlay" script, Teknojnky is correct that the "AutoDJ" scripts are new to MM3 and allow you to create a new source for MM's auto DJ rather than adding tracks manually to Now Playing as we had to before.

Re: Auto DJ - RadioFreeMonkey

by rovingcowboy » Fri May 08, 2009 1:03 am

hey Teknojnky there was a script in mm 2. that would automaticlly pick songs from a playlist and add to the now playing list when all the songs in that now playing list had been played.

it was called non stop music or something like that.



nynaevelan i had thought you were wanting a script that would pick songs from any place in the library and play them, but doing so according to playcount not ratings.

:-?

Top