Randomise Playlist 1.3 - Updated 20/10/2010

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

Moderators: Peke, Gurus

Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky »

Well, playlists can be manipulated (ie shuffled via script).

Regular track lists (ie artist/album/genre/etc) can not (to my knowledge). Regular tracklists are sorted by whatever columns choose to sort by (hold control to sort by multiple columns).

If you want a semi-random track list, the best thing I found is to sort by track volume level and/or track size or length. Of course neither would be very random when repeated.

But anyway, I don't think there is a solution to your desire to randomize normal nodes tracklist.

You might however be able to create a suitable magic nodes, though I don't have any idea what it would be.
The Crow
Posts: 44
Joined: Wed Nov 28, 2007 4:05 pm

Post by The Crow »

Bex wrote: In MM3 you can achieve that since autoplaylist can "link" from other playlists. e.g. A static playlist to which you can add tracks which then ends up in your autoplaylist.
Teknojnky wrote:If you want a semi-random track list, the best thing I found is to sort by track volume level and/or track size or length. Of course neither would be very random when repeated.
Thanks so far, I now sort them by time last played, this has the advantage that the order nearly gets changed dynamically little by little. And as it will soon be able to randomise clicked playlists (that will be played more often than genre lists) automatically by script a good random mix is created.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

New version (1.1) is now available to download from my website.

I have added the option to automatically randomise playlists when selecting them from the tree. This can be found as a variable at the top of the script file.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
The Crow
Posts: 44
Joined: Wed Nov 28, 2007 4:05 pm

Post by The Crow »

This is great! Thank you very much!
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

One issue that you might find is that if you add a new playlist, this won't randomise until you restart MM as this is when the events are added. I've not found a way to add the events when a new playlist is added yet.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Guest

Post by Guest »

Thanks for the script, works great!
onenonymous
Posts: 374
Joined: Sat Feb 02, 2008 1:09 pm
Location: Texas

typo?

Post by onenonymous »

Trix - I'm a relatively new MM user and really appreciate all your scripts (not to mention those of all the other Monkey-wizards out there! :-)) I think there's a typo in your RandomisePlaylist script (for MM3), in line 143:
inif.StringValue("RandomisePlaylist","Filename") = "RandomisePlaylist.vbs"

shouldn't it be:
inif.StringValue("RandomisePlaylist","Filename") = "Auto\RandomisePlaylist.vbs"

it seems to work as is, so not sure though... ?

thanks
Peter
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Yeah, you're right! It will only affect the menu item, everything else should work fine.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky »

This script tends to freeze up MM when using it with larger playlists, so I made the following modification awhile back to smooth it out and show progress.

It does have a wierd flashing of the playlist, I haven't really investigated why or how to fix it.

Anyway here it is.

Code: Select all

Sub DoRandomise(p)
  Dim t : Set t = p.Tracks
  Dim Progress : Set Progress = SDB.Progress
  Progress.MaxValue = t.Count
  Progress.Text = "Randomizing Playlist..."
  p.Clear
  While t.Count > 0
    Dim n : n = Int(t.Count*Rnd)
    Call p.AddTrack(t.Item(n))
    Call t.Delete(n)
    Progress.Increase
    SDB.ProcessMessages
  WEnd
End Sub
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I should imagine it is flashing because you keep updating the screen whilst it's shuffling so you'll see the playlist in several states of shuffle-ness! :)
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I've fixed the installer for this but I can't find a way to stop the flashing so I'm going to leave the script as it is for now.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
sommo

Re: Randomise Playlist 1.1 [MM2+3]

Post by sommo »

I would just like to say a thank you trixmoto, for this addon!
This is one of the reason why I use MediaMonkey!
It is really helpful and I do use it :)
Keep up the good work & Happy coding!
rseery
Posts: 8
Joined: Tue Feb 17, 2009 12:29 pm

Re: Randomise Playlist 1.1 [MM2+3]

Post by rseery »

Grrr. I know it's something I did.... I can't get the 'Randomise Playlist' script to show up in the context menu when I rightclick a playlist. I have it working on one machine but not another. I can't figure out what I did... I think I installed something on that other machine that made all scripts show up on all context menus, but I can't remember. Cant just invoke 'randomise playlist' from tools menu cause it says I need to have a playlist selscted. Can anyone help?

Bob
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Randomise Playlist 1.1 [MM2+3]

Post by nynaevelan »

Have you tried reinstalling the script? Are you sure the info is in the scripts.ini file?
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
rseery
Posts: 8
Joined: Tue Feb 17, 2009 12:29 pm

Re: Randomise Playlist 1.1 [MM2+3]

Post by rseery »

Thanks for the reply. Scripts.ini is the first thing I checked. The script is in there with valid values... I remembered and installed onenonemous's 'Right Click for Scripts' and got the scripts context menu on playlists. But the Randomise Playlist script was still not showing up for playlists. So I reinstalled the Randomise Playlist script using the installer from Trixmoto's awesome site. I restarted MM and now if I rightclick a playlist, I get the Randomise Playlist script, but if I click it, I get an error box: "Error happened during script execution: Unknown Name". So now I'm really stumped!

Bob
Post Reply