Jump to content

SAM again


airfm

Recommended Posts

There is more to this script than copy and pasting to make it work and there are notes to go along with it here: http://spacialaudio.com/knowledge/attachment.php?attId=62

}

 

 

 

 

PAL.Loop := True;

var D: Integer; // return from SQL calls

var F : Boolean; // switch to controll additional activities in events.

var E : DateTime = Queue.ETA; // Return the length of the queues

 

// Create as many of these as you have categories you are going to use.

var CatA : string;

var CatB : string;

var CatC : string;

var CatD : string;

 

// I know it could be simplified, but I'm making a point.

 

CatA := 'World';

CatB := 'Country';

CatC := 'Electronic';

CatD := 'Christian';

 

F := false;

 

// Event One

// Is it 8am, monday, tuesday, wednesday thursday or friday?

if (now >= T['07:58:00']) and (now

((DayOfWeek(Now) = Monday) or

(DayOfWeek(Now) = Tuesday) or

(DayOfWeek(Now) = Wednesday) or

(DayOfWeek(Now) = Thursday) or

(DayOfWeek(Now) = Friday)) then

begin

Queue.Clear;

repeat

cat[CatA].QueueTop(smLemmingLogic,EnforceRules);

until (Queue.Duration >= 3360000);

// 56 minutes of world music

F := true;

end;

if (F) then // If F is true. set in queue load above.

begin

WriteLn('Wait for 1 track');

PAL.WaitForPlayCount(1);

// wait for one track to play

end;

if (F) then

begin

D:=ExecSQL('UPDATE showstatus SET event = "World Music Hour" WHERE ID = 1',[]);

WriteLn('World Music Hour'); // this displays in the pal window.

end;

if (F) then

begin

E := Queue.ETA;

WriteLn('Time to wait');

WriteLn(E);

PAL.WaitForTime(E);

// ok, hang about for the length of the queue.

end;

if (F) then

begin

D:=ExecSQL('UPDATE showstatus SET event = "The Quantum Daily Mix" WHERE ID = 1',[]);

WriteLn('Quantum Daily Mix');

F := false;

// It's now after 9am, so back to the normal daily Mix.

// This is every day except Sat, and Sun

end;

// End of Event One

 

// Event Two. F now False again

// Is it 11am monday, wedneday or thursday?

if (now >= T['10:58:00']) and (now

((DayOfWeek(Now) = Monday) or

(DayOfWeek(Now) = Wednesday) or

(DayOfWeek(Now) = Thursday)) then

begin

Queue.Clear;

repeat

cat[CatC].QueueTop(smLemmingLogic,EnforceRules);

until (Queue.Duration >= 3360000);

// Stuff 56 minutes worth of Electronica into the queue.

F := true;

end;

if (F) then

begin

WriteLn('Wait for 1 track');

PAL.WaitForPlayCount(1);

// wait to play one track

end;

if (F) then

begin

WriteLn('Updating the show');

D:=ExecSQL('UPDATE showstatus SET event = "Electronic Madness" WHERE ID = 1',[]);

end;

if (F) then

begin

E := Queue.ETA;

WriteLn('Time to wait');

WriteLn(E);

PAL.WaitForTime(E);

end;

if (F) then

begin

D:=ExecSQL('UPDATE showstatus SET event = "The Quantum Daily Mix" WHERE ID = 1',[]);

WriteLn('Quantum Daily Mix');

F := false;

// The hour of Electronic is over, back to the daily mix.

// Remember, this is Mon, Wed and Thu only.

end;

 

 

// Event Three

// Is it 12 Midday, Monday, Wednesday, Thursday or Friday?

if (now >= T['11:58:00']) and (now

((DayOfWeek(Now) = Monday) or

(DayOfWeek(Now) = Wednesday) or

(DayOfWeek(Now) = Thursday) or

(DayOfWeek(Now) = Friday)) then

begin

Queue.Clear;

Queue.AddFile('E:\StationMusic\WaveTest.mp3',ipBottom);

// Get the listeners attention. This is a klaxon...

repeat

cat[CatA].QueueBottom(smRandom,EnforceRules);

cat[CatA].QueueBottom(smRandom,EnforceRules);

cat[CatA].QueueBottom(smLRP,EnforceRules);

cat[CatA].QueueBottom(smLRP,EnforceRules);

until (Queue.Duration >= 1680000);

// Load 28 minutes of music ( about half an hour !!! )

Queue.AddFile('E:\StationMusic\WaveTest.mp3',ipBottom);

// Get the listeners attention. This is a klaxon... 5 seconds

F := true;

end;

if (F) then

begin

WriteLn('Waiting for one song to play...');

PAL.WaitForPlayCount(1);

// play one track then continue

end;

if (F) then

begin

D:=ExecSQL('UPDATE showstatus SET event = "The Weekly Edge Sampler" WHERE ID = 1',[]);

WriteLn('The Weekly Edge Sampler');

end;

if (F) then

begin

WriteLn('Wait for 10 Minutes');

PAL.WaitForTime(T['+00:10:00']);

end;

if (F) then

begin

Queue.AddFile('E:\StationMusic\WaveTest.mp3',ipTop);

// Blow them away with the dive dive dive klaxton...

end;

if (F) then

begin

E := Queue.ETA;

WriteLn('Time to wait');

WriteLn(E);

PAL.WaitForTime(E);

// Wait for the que to end.

end;

if (F) then

begin

D:=ExecSQL('UPDATE showstatus SET event = "The Quantum Daily Mix" WHERE ID = 1',[]);

WriteLn('Quantum Daily Mix');

F := false;

// ok, back to the normal scheduling.

end;

 

// Event Four.

// Is it 4pm, on Monday or Wednseday?

if (now >= T['15:58:00']) and (now

((DayOfWeek(Now) = Monday) or

(DayOfWeek(Now) = Wednesday)) then

begin

Queue.Clear;

repeat

// Load an hour of Country

cat[CatB].QueueTop(smLemmingLogic,EnforceRules);

until (Queue.Duration >= 3360000);

F := true;

end;

if (F) then

begin

WriteLn('Wait for 1 track');

PAL.WaitForPlayCount(1);

end;

if (F) then

begin

WriteLn('Updating the show');

D:=ExecSQL('UPDATE showstatus SET event = "The Best of Country" WHERE ID = 1',[]);

end;

if (F) then

begin

E := Queue.ETA;

WriteLn('Time to wait');

WriteLn(E);

PAL.WaitForTime(E);

// Play the queue

end;

if (F) then

begin

D:=ExecSQL('UPDATE showstatus SET event = "The Quantum Daily Mix" WHERE ID = 1',[]);

WriteLn('Quantum Daily Mix');

F := false;

// ok, back to the normal scheduling

end;

 

// Event Five.

// Is it 8pm, Monday, Tuesday or Wednesday?

if (now >= T['19:58:00']) and (now

(DayOfWeek(Now) = Tuesday) or

(DayOfWeek(Now) = Wednesday)) then

begin

Queue.Clear;

repeat

// Load an hour of Christian music

cat[CatD].QueueTop(smLemmingLogic,EnforceRules);

until (Queue.Duration >= 3360000);

F := true;

end;

if (F) then

begin

WriteLn('Wait for 1 track');

PAL.WaitForPlayCount(1);

end;

if (F) then

begin

 

D:=ExecSQL('UPDATE showstatus SET event = "The Sabbath Hour" WHERE ID = 1',[]);

WriteLn('The Sabbath Hour');

end;

if (F) then

begin

E := Queue.ETA;

WriteLn('Time to wait');

WriteLn(E);

PAL.WaitForTime(E);

end;

if (F) then

begin

D:=ExecSQL('UPDATE showstatus SET event = "The Quantum Daily Mix" WHERE ID = 1',[]);

WriteLn('Quantum Daily Mix');

F := false;

end;

// end of event

Link to comment
Share on other sites

You can make easily into SAM at "Content" > "Playlists" new directories

- Open each directory and load your tracks (genre)

- Save that playlist (.m3u file) to your pc

- Same for any other directory

....

- open Event Sheduler

- choose right date(s) and hour(s)

- Open "add playlist" and choose the needed saved .m3u file

- click ok

- Same to your other playlists

 

If you don't like this solution .. you can make a clockwheel into your ES who's connected to the directory of your choice - and you adjust weighted, random etc where needed

 

Hope this was usefull

You can also choose the PAL made by O-Rage if that looks the best solution to you

Visit and listen @ BW !

http://i.imgur.com/Ggmw4ub.gif

 

Link to comment
Share on other sites

  • 1 year later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...