Page 2 of 6
Posted: Fri Nov 30, 2007 11:05 am
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.
Posted: Sat Dec 01, 2007 6:52 am
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.
Posted: Wed Dec 05, 2007 10:04 am
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.
Posted: Wed Dec 05, 2007 4:59 pm
by The Crow
This is great! Thank you very much!
Posted: Thu Dec 06, 2007 5:35 am
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.
Posted: Sun Feb 03, 2008 3:53 am
by Guest
Thanks for the script, works great!
typo?
Posted: Sun Feb 17, 2008 8:04 pm
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
Posted: Mon Feb 18, 2008 5:09 am
by trixmoto
Yeah, you're right! It will only affect the menu item, everything else should work fine.
Posted: Fri Mar 07, 2008 6:00 pm
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
Posted: Sun Mar 09, 2008 5:27 am
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!

Posted: Sat Apr 19, 2008 4:17 am
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.
Re: Randomise Playlist 1.1 [MM2+3]
Posted: Sat Jun 28, 2008 12:28 pm
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!
Re: Randomise Playlist 1.1 [MM2+3]
Posted: Fri Dec 11, 2009 9:59 pm
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
Re: Randomise Playlist 1.1 [MM2+3]
Posted: Fri Dec 11, 2009 10:40 pm
by nynaevelan
Have you tried reinstalling the script? Are you sure the info is in the scripts.ini file?
Re: Randomise Playlist 1.1 [MM2+3]
Posted: Sat Dec 12, 2009 1:35 pm
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