Shuffle & Other Script Ideas

To run along side the awesome script for random selection, im now wondering if we can get some sort of script that shuffles up the music in the playlist. the reason is that i am setting a series of scripts to run at startup so it picks 5x 60’s, 10x 70’s etc. then what i want mairlist to do is shuffle them up so that on automated playback i get a random selection rather than a sequence of just one decade.

I hope that makes sense and i hope somebody here has the brains to be able to create such a script… I do admire your knowledge :slight_smile:

Also, is there a way of getting a script that follows a rule such as 2x tracks then a sweeper/jingle?

Another thought is to get a script that analyses a playlists and adds songs accordingly - My thinking is that you could create a generic hour template with “EMPTY MUSIC” files in it. When a script discovers “EMPTY MUSIC” it simply adds in a track from a default directory.

Therefore, you could create a playlist:

HOUR OPENER
EMPTY MUSIC
EMPTY MUSIC
#SWEEPER SCRIPT#
EMPTY MUSIC
EMPTY MUSIC
#SWEEPER SCRIPT#
EMPTY MUSIC
TRAVEL BED
TRAVEL OUTRO
STATION IMAGING

etc etc etc…

As you know, i dont have any scripting knowledge so have no idea as to whether this is something scripting would be able to do.

Thoughts and suggestions???..

Best Wishes

Lackster

Lackster, far easier and more suitable solution is a scheduler.

A free one here:

http://www.bleucanard.f2s.com/

Yep Lackster.

Scripting this kind of software is quite hard… Not too complex, but other free program can help you, like the one Tony mentioned.

Super, i thought scheduling software would be the answer.

However, what about some sort of song shuffler within the playlist?

Lackster, just remembered this is in the scripts already but cannot find it.

Instead here is the code I use (taken from these threads somewhere)

Save the code as randomise_playlist.mls

[code]// Playlist Randomizer

var i : Integer;
ziel: Integer;

begin
CurrentPlaylist.BeginUpdate;
try
for i:=0 to CurrentPlaylist.GetCount-1 do begin
if CurrentPlaybackControl.GetPlayerOfItem(CurrentPlaylist.GetItem(i)) = -1 then begin
ziel := random(CurrentPlaylist.GetCount-1);
if CurrentPlaybackControl.GetPlayerOfItem(CurrentPlaylist.GetItem(ziel)) = -1 then
CurrentPlaylist.Move(i,ziel);
end;
end;
finally
CurrentPlaylist.EndUpdate;
end;
end.[/code]

Build a playlist and then run the script in the event scheduler. We used this overnight during an RSL - the same 7 hour playlist loaded at midnight and then was randomised by running this script - hey it beat manually building the overnight shows.

Kind Regards tony