Skip to Content
It is currently December 10th, 2018, 11:27 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: November 18th, 2008, 4:49 pm 
Offline
New User
New User

Joined: October 7th, 2004, 6:50 pm
Posts: 19
Location: Maryland - USA
Hi all... I have a problem. One of the stations I manage uses a lot of different pal scripts to load station ID's ads, jingles etc. Most of the time this is not a problem. It is a problem however when they run long pre-recorded shows. At that time, station ID's, jingles etc all back up and run back to back upon completion of the long show mp3. While I know I can set a queue clear command to run after it plays, that will fix the initial set of things. However, these live shows do not always run their full length so I cannot set a wait for time + 2 hours before queue clearing.

Is there a way to do a wait for time if the form of waitfortime(long show length)-30 seconds and then have it do a queue clear command then? Thiz way it won't matter how long it is.

Se2cond script...... In case of trhe long show being aired on other stations. I want a PAL that can load a stream URL but as the serving host sometimes has buffer problems, I'd like a way for it to delay switching back to the playlist because usually its a second or two buffer not 3 minutes worth. Ideas?

Thanks

_________________
"Daddy, what does Format C: mean???"


Top
 Profile  
Reply with quote  
PostPosted: November 19th, 2008, 12:06 pm 
Offline
SVS Member
SVS Member

Joined: October 15th, 2003, 11:59 pm
Posts: 4708
Location: Los Angeles - A Little West Of Nashville
On your 1st PAL, I check a data base which contains what show is playing. If it is my "regular programming", I insert a liner. If a special show is showing, I skip the liner.

You will have to add a data set called 'CurrentShow' and mine contains 2 lines of text, Text1 and Text2.

Code:
var
  D, CurrentShow : TDataSet;

var
  text1, text2 : string;

PAL.loop := true;

D := Query ('SELECT text1 from CurrentShow', [], true);

// Make sure no show is running

if D['text1'] = 'Now playing: Regular schedule' then
 CAT['stinger_old'].QueueBottom(smRandom,NoRules);

PAL.WaitForPlayCount(7);


You have to modify this logic to your own PAL.

_________________
- DJ Dee
- Spacial Volunteer Support (SVS)
- Custom PAL services: www.palscripts.com
- http://www.AlternativeHD.com
- http://www.lahotcountry.com


Top
 Profile  
Reply with quote  
PostPosted: November 19th, 2008, 3:02 pm 
Offline
Alumni
Alumni

Joined: March 11th, 2003, 1:34 pm
Posts: 9959
Location: Maui, HI
FYI my newer PALs keep a running list of shows and use a toggle to represent which show is currently active rather than keeping only one record in the table.

Table statement:
Code:
CREATE TABLE IF NOT EXISTS fhr_show_info (
  id INTEGER UNSIGNED NOT NULL,
  title TEXT NOT NULL,
  description TEXT NOT NULL,
  forum_id INTEGER UNSIGNED NOT NULL default 0,
  active INTEGER UNSIGNED NOT NULL default 0,
  PRIMARY KEY ( id ) )
ENGINE = MyISAM;


Then I use a view on the table to return the current show:
Code:
CREATE OR REPLACE VIEW fhr_current_show_view AS
  SELECT f.title AS title,
         f.description AS description,
         f.id AS show_id
  FROM fhr_show_info f
  WHERE f.active = '1';


Exmaple records:
Code:
0, 'Regular Rotation', 'FesterBot selections and listener requests', 2, 1
1, 'Artist Hour', 'An hour of songs by a FesterBot selected artist', 25, 0
5, 'Guitar Mania', 'Get out the air guitar and wail away with these masters of devices with wires that vibrate', 27, 0
9, 'Surf Rock', 'Whoa! Gnarly dude! Surf's up and hang ten in the tube! Don't soon forget about the sea...', 33, 0
3, 'Classical Classics', 'Classic rock played classically.  Now that's class!', 24, 0
6, 'Hawaiian Style', 'Traditional and Contemporary Hawaiian music to sooth your soul. Wish you were here.', 28, 0
7, 'Instrumental Show', 'Give the singer a tambourine cuz we don't need no stinkin' words! ', 29, 0

_________________
- Steve Kunitzer
- SVS (Spacial Volunteer Support) / Forum Administrator

Image
Image


Top
 Profile  
Reply with quote  
PostPosted: November 19th, 2008, 3:41 pm 
Offline
New User
New User

Joined: October 7th, 2004, 6:50 pm
Posts: 19
Location: Maryland - USA
Thanks guys.... now if I can become as proficient at being a rookie PAL script writer as you guys are pros at it, I MIGHT be able to decipher some of it LOL.

Seriously, I have learned a lot from looking at some of your scripts Steve. Thanks for making them available to the community. It's hard I guess running in the internet only radio world now after 20+ years in commercial radio and having to follow time clocks sometimes to the second. Now,if it is close to the mark that's good enough. While I know there are software packages like Powergold and Music 1 that can schedule music down to the minute if not closer, why use them if SAM can schedule it, right?

Also, the ability to STOP a PAL script would be nice as well. Oh well... sigh.

Thanks again for all your help to both you and DJ.

_________________
"Daddy, what does Format C: mean???"


Top
 Profile  
Reply with quote  
PostPosted: November 19th, 2008, 3:58 pm 
Offline
Alumni
Alumni

Joined: October 14th, 2006, 9:38 am
Posts: 5986
Location: Deep in the heart of the PRNJ
Reality1 wrote:
... the ability to STOP a PAL script would be nice...

PALs will stop themselves unless they are told to loop. If a task needs to be done occasionally, use the Event Scheduler to fire off short specialized scripts instead of Wait commands in a big long script.

If the script absolutely, positively must loop for a period of time, you can test some condition and set PAL.Loop to False when you're ready. The script will finish what it's doing then "not loop", i.e., stop.

Likewise - if by "stop" you mean "pause", you can use the various tests to cause the PAL to wait for a period of time or for a particular set of conditions before picking up where you left off. Case statements and procedures are particularly useful in these instances.

This site has helped me a bunch: http://www.delphibasics.co.uk/index.html
PAL doesn't utilize everything Delphi is capable of, but knowing how the commands work can give you some great ideas in addition to a better understanding of the scripts you see in the forums, etc.

fwiw

_________________
- Stan Olochwoszcz
A proud licensed SAM user since 2002

Raritan Bay Radio


Top
 Profile  
Reply with quote  
PostPosted: November 19th, 2008, 4:17 pm 
Offline
New User
New User

Joined: October 7th, 2004, 6:50 pm
Posts: 19
Location: Maryland - USA
Thanks......

One of my scripts inserts Station ID's at the top and bottom of each our and does a (Next30-XX:02:00) or something similar so it loads the station ID at 28 and 58 so it loads and plays after the song that plays at that time. The other scripts load the Radio Amber alert mp3 at XX:11 and a third one that does a jingle after each third or fourth song. This works well except when I have a pre-corded or live show that runs for a long time. Two of our shows run 2 hours or more and are pre-recorded down to the commercials and station ID's. Therefore by the time the show ends I have a bunch of stuff sitting at the top of the queue. Things like 3 station id's ads etc and all because I cant have PAL stop those scripts durin the show.

_________________
"Daddy, what does Format C: mean???"


Top
 Profile  
Reply with quote  
PostPosted: November 19th, 2008, 4:30 pm 
Offline
Alumni
Alumni

Joined: October 14th, 2006, 9:38 am
Posts: 5986
Location: Deep in the heart of the PRNJ
I just broke out all of my stop sets and now run them with ES instead of the big WaitForTime script I was using. Before this if I stopped the script or had to restart SAM for some reason I would not load stuff for a good portion of the hour. F'rinstance, if I had to restart SAM at :16 the rest of the hour was lost because the script started at the top of the hour and waited for each 15-minute event. With ES in charge, it doesn't matter.

That's what's so great about SAM; so many ways to approach a problem.

_________________
- Stan Olochwoszcz
A proud licensed SAM user since 2002

Raritan Bay Radio


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group