Basically all it does is create a node under your "Now Playing" node which duplicates tracks once per every half-star in the tracks rating. So if you play the songs from this node with shuffle turned on, Media Monkey will be more likely to pick the songs with a higher rating since they are duplicated more. For example a song with a 5 star rating is 10 times more likely to be played than one with a 1/2 star rating. 0 star songs (bomb rating) are dropped completely, and un-rated songs are weighted the same as 2.5 stars.
So to use this, just populate the "Now Playing" node with whatever you want to listen to, then start playing the "Weighted Shuffle" node (and make sure you have shuffle turned on).
Some of this script is based off the tutorial scripts and other scripts I found on the forums, but I don't remember which ones, so sorry if I ripped off any code snippets, etc, from anyone.
Here is the script:
- Code: Select all
Set Tree = SDB.MainTree
Set Node = Tree.CreateNode
Node.Caption = "Weighted Shuffle"
Node.IconIndex = 40
Node.UseScript = Script.ScriptPath
Node.OnFillTracksFunct = "FillNPTracks"
Tree.AddNode Tree.Node_NowPlaying, Node, 3 ' Add as the last child
Sub FillNPTracks( Node)
While min_rating<100 And Not Script.Terminate
Dim List, Trcks
Set List = SDB.Player.CurrentPlaylist
Set Trcks = SDB.MainTracksWindow
While i<List.Count And Not Script.Terminate
If (List.Item(i).Rating > min_rating) Then
Else If (min_rating <= 46 And List.Item(i).Rating = -1) Then 'include unknowns 5 times
Just put this script in a file named "weighted_shuffle.vbs" or something in your "Program Files\MediaMonkey\Scripts\Auto" folder and it will run to create the node every time you open Media Monkey.
Feel free to let me know if I did anything stupid or if you have any improvements or anything