Jump to content

SAM PAL not fast enough!


busby

Recommended Posts

I'm hoping someone may be able to offer some suggestions about a way around a problem I have with SAM broadcaster..

 

The problem is that sometimes scheduled shows don't play as expected, and the reason is that other shows 'jump the queue'.

 

At a time determined by the event scheduler, the PAL starts;

  1. It looks at the artists folder and does a 'rescan'
  2. Waits 20 seconds
  3. Clears the queue
  4. loads a jingle to the top of the queue
  5. loads the scheduled show file to the bottom of the queue
  6. Fades to next - i.e. plays [4]
  7. Writes the Show title

The problem is that if the preceding show finishes at that precise time it loads into the first available player between [3] and [6] and the scheduled show stays in the queue.

 

The solution really is some extra lines in the script to check that the file in the player, is the file in the folder - but that's not as easy as it might sound because the file is constantly changing..

 

If anyone can help me with this I would be eternally grateful!

 

Now the PAL..

 

var Song : TSongInfo;
var Present : DateTime = now;
var Year, Month, Day : Integer;
var D : string;
var Artist : string;
var Show : string;

// Settings, Artist has to be EXACTLY like the folder-name.
Artist := 'DJ Name';
Show := ' Show Name on 1Mix Radio';

SubDir['C:\Radio\' + Artist].Rescan;

PAL.WaitForTime('XX:00:20');
Queue.Clear;
// LOCKING HERE
PAL.LockExecution;
// Comment away the parts you don't need
Dir['C:\Radio\Jingles&Wipes'].QueueTop(smRandom, NoRules);
Queue.Addfile ('C:\Radio\'+Artist+'\id\id1.mp3',ipBottom);
Dir['C:\Radio\'+Artist+'\part 01'].QueueBottom(smLRP, NoRules);
Dir['C:\Radio\Jingles&Wipes'].QueueBottom(smLRP, EnforceRules);
//Queue.Addfile ('C:\Radio\'+Artist+'\id\id2.mp3',ipBottom);
Dir['C:\Radio\'+Artist+'\part 02'].QueueBottom(smLRP, NoRules);
//Dir['C:\Radio\Jingles&Wipes'].QueueBottom(smLRP, EnforceRules);
//Dir['C:\Radio\'+Artist+'\part 03'].QueueBottom(smLRP, NoRules);
//Dir['C:\Radio\Jingles&Wipes'].QueueBottom(smLRP, EnforceRules);
//Dir['C:\Radio\'+Artist+'\part 04'].QueueBottom(smLRP, NoRules);
ActivePlayer.FadeToNext;
// UNLOCKING HERE
PAL.UnlockExecution;
PAL.WaitForTime(T['+00:00:30']);

// Inserting title and date
Song := TSongInfo.Create;
DecodeDate(Present, Year, Month, Day);
D := (IntToStr(Day)) + '.' + (IntToStr(Month)) + '.' + (IntToStr(Year));
Song['artist'] := Artist;
Song['title'] := Show + ' (' + D + ') Check the Forum for Tracklisting..';
Encoders.SongChange(Song);
Song.Free;

Link to comment
Share on other sites

I think the issue isn't SAM is to slow ... but SAM receives to much commands to work in a normal way ...

 

My proposal is maybe a little work to manage ... but once done you gonna achieve the right result ...

by making each command as a seperated "event" ... for that you can use the Event Sheduler with or without support of a PAL script

 

Please take a look at my sticky topics about SAM and PAL scripts ...

I'm sure you gonna find all needed scripts at this link :

http://forums.broadcastingworld.net/showthread.php?t=7199

Link to comment
Share on other sites

Did you ever tryed to excecute your current script by using it as clockwheel ?

config > playlist rotation > change clockwheel (set and save as)

 

I do believe you about the use of 200+ PAL scripts ...

for that reason I quoted that SAM receives to much commands

I guess its better to manage all commands part to the event sheduler, part to the PALs, part to the clockwheel

too much is never good

 

I hope someone else can help you with your issue

Link to comment
Share on other sites

Hmm - I don't understand what you are saying about putting it in a clockwheel - I have over 200 scripts, how can I put them in a clockwheel?

 

I already run a clockwheel any way, to take care of those times when there is a gap in the schedule..

 

Thanks for your replys..

Link to comment
Share on other sites

  • 3 weeks later...

Not sure if you ever got this to work as you wanted ... looking at the script I have to suggestions ...

 

1. Clear the Queue AFTER you lock execution (this should prevent anything from sneaking in the queue while the script is working)

 

2. The 1st "QueueTop" command can be a queuebottom. since you just cleared the queue. (this one is just more of a personal preference :D )

SpazzRadio.com

Home of Absolute Rockz, Absolute Spazz, Always HOT Country, and Absolute Hitz

Link to comment
Share on other sites

  • 1 month later...
Not sure if you ever got this to work as you wanted ... looking at the script I have to suggestions ...

 

1. Clear the Queue AFTER you lock execution (this should prevent anything from sneaking in the queue while the script is working)

 

2. The 1st "QueueTop" command can be a queuebottom. since you just cleared the queue. (this one is just more of a personal preference :D )

 

Thanks for the answers..

 

I'm still having issues, yes I'm afraid..

 

1. Done - that's logical I suppose

 

2. OK, can do but not sure if it will make a difference

 

I am looking at making some changes to the script in any case, so maybe someone can help me. This is want I want to do:

 

1. Have some kind of error checking to see if the track that's playing is the track that's in the relevent folder, if it isn't run part of the script again.

 

2. Write a new title to the player at the start of the script which writes 'Up next - #artisttwittertag' so that I get a Twitter post at the beginning of the show, before the script re-writes the title later.

 

Any suggestions please :)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...