Man0r Posted August 30, 2011 Share Posted August 30, 2011 ok. Now i have pal script that every 4 songs - Play (1) Jingle from the folder "Sweepers_day". I want to do a PAL script that will make the same thing, but in the night it will take from folder name "Sweepers_night" and not from the normal folder ("Sweepers_day"). It is possible? (sorry for my bad english. ) Link to comment Share on other sites More sharing options...
EricVdM Posted August 30, 2011 Share Posted August 30, 2011 Can you provide us with your current script so we can see how you build it, so we can give you an proper answer. You also can search for an proper answer in the topic of GKIye http://forums.broadcastingworld.net/showthread.php?6750-SAM-Broadcaster-Setup-amp-PAL-scripts-library-Read-Me Link to comment Share on other sites More sharing options...
SmoothJazz Posted August 30, 2011 Share Posted August 30, 2011 Please post your current Jingle PAL http://5280jazz.com/nowplaying_image/5280jazz.png Rob Oyler 5280 Jazz Link to comment Share on other sites More sharing options...
Man0r Posted August 31, 2011 Author Share Posted August 31, 2011 hi, this is the PAL code: PAL.Loop := True; PAL.WaitForPlayCount(28); CAT['sweepers_day'].QueueTop(smLemmingLogic, NoRules); basically the code play every 28 songs - 1 file from the folder "sweepers_day". But I want that at night (Midnight - 10:00[in the morning]) the PAL script will take from the folder "sweepers_night". I didnt write the PAL SCRIPT, I dont understand programming. thanks Link to comment Share on other sites More sharing options...
SmoothJazz Posted August 31, 2011 Share Posted August 31, 2011 Since it might take 2 hours to play 28 tracks are you sure you want to wait that long between sweepers? ...anyway give this a try. This PAL compiles but not tested live. PAL.Loop := True; PAL.WaitForPlayCount(28); var Present: DateTime; var Year, Month, Day, Hour, Min, Sec, MSec: Integer; Present:= Now; DecodeTime(Present, Hour, Min, Sec, MSec); if (Hour begin CAT['sweepers_night'].QueueTop(smLemmingLogic, NoRules); end else begin CAT['sweepers_day'].QueueTop(smLemmingLogic, NoRules); end; http://5280jazz.com/nowplaying_image/5280jazz.png Rob Oyler 5280 Jazz Link to comment Share on other sites More sharing options...
Man0r Posted August 31, 2011 Author Share Posted August 31, 2011 ok I try it now. Thanks! Link to comment Share on other sites More sharing options...
EricVdM Posted August 31, 2011 Share Posted August 31, 2011 or try this one, I think it also would work Pal.Loop:=True; Pal.LockExecution; //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ var Begintijd : string = '00:00:01'; // Starting time var Eindtijd : string = '09:59:59'; // End time //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ while ((Now >= T[begintijd]) and (Now Begin PAL.WaitForPlayCount(28); CAT['sweepers_night'].QueueTop(smLemmingLogic, NoRules); end else Begin CAT['sweepers_day'].QueueTop(smLemmingLogic, NoRules); end; ActivePlayer.FadeTonext; PAL.WaitForTime(T[Eindtijd]); ActivePlayer.FadeTonext; end; // Keep this line always at the end. Pal.UnLockExecution; Link to comment Share on other sites More sharing options...
countrywesterndj Posted August 31, 2011 Share Posted August 31, 2011 or try this one, I think it also would work Pal.Loop:=True; Pal.LockExecution; //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ var Begintijd : string = '00:00:01'; // Starting time var Eindtijd : string = '09:59:59'; // End time //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ while ((Now >= T[begintijd]) and (Now Begin PAL.WaitForPlayCount(28); CAT['sweepers_night'].QueueTop(smLemmingLogic, NoRules); end else Begin CAT['sweepers_day'].QueueTop(smLemmingLogic, NoRules); end; ActivePlayer.FadeTonext; PAL.WaitForTime(T[Eindtijd]); ActivePlayer.FadeTonext; end; // Keep this line always at the end. Pal.UnLockExecution; No, that isn't a good solution. 1- The way you have it set it, it will run through once, and then wait for 09:59:59 ... which means it wait for hours and hours .. 2- You have UNLOCKED the PAL script after the WAIT, which means that you have it locked for up to 10 hours. It should be unlocked immediately after the processing. Spacial SVS Support Team http://support.spacialaudio.com/forums/ Get help with PAL Scripts at http://www.palscripts.com Link to comment Share on other sites More sharing options...
EricVdM Posted September 1, 2011 Share Posted September 1, 2011 No, that isn't a good solution. 1- The way you have it set it, it will run through once, and then wait for 09:59:59 ... which means it wait for hours and hours .. 2- You have UNLOCKED the PAL script after the WAIT, which means that you have it locked for up to 10 hours. It should be unlocked immediately after the processing. It's possible but it works on my server, the only difference is that I use an subdir command in stead of CAT. Link to comment Share on other sites More sharing options...
countrywesterndj Posted September 1, 2011 Share Posted September 1, 2011 It's possible but it works on my server, the only difference is that I use an subdir command in stead of CAT. It is never good to keep a PAL script LOCKED for 8 hours. It can lock SAM and take you off the air. Spacial SVS Support Team http://support.spacialaudio.com/forums/ Get help with PAL Scripts at http://www.palscripts.com Link to comment Share on other sites More sharing options...
EricVdM Posted September 1, 2011 Share Posted September 1, 2011 Before I started this script I asked for advice on several SAM forums and they all told me that it couldn't cause any problems. Till now I didn't had any problems but how would you change it than? Link to comment Share on other sites More sharing options...
SmoothJazz Posted September 1, 2011 Share Posted September 1, 2011 Quite frankly guys, what this PAL does not need to be locked in the first place it adds absolutely nothing since it doesn't have to be executed quickly. http://5280jazz.com/nowplaying_image/5280jazz.png Rob Oyler 5280 Jazz Link to comment Share on other sites More sharing options...
EricVdM Posted September 1, 2011 Share Posted September 1, 2011 Quite frankly guys, what this PAL does not need to be locked in the first place it adds absolutely nothing since it doesn't have to be executed quickly. Thnx Rob Link to comment Share on other sites More sharing options...
shoutcaststreaming Posted September 2, 2011 Share Posted September 2, 2011 To lock / unlock, you do it so SAM is locked for the shortest amount of time, like this: PAL.Loop := true; // // If between Midnight and 10 AM then pick from Sweepers Night // If between 10 AM and Midnight pick from Sweepers Day // // // Lock the execution to make script run faster // PAL.LockExecution; // Check the time if (Now > T['00:00:00'] ) and (Now begin CAT['sweepers_night'].QueueTop(smLemmingLogic, NoRules); end else begin CAT['sweepers_day'].QueueTop(smLemmingLogic, NoRules); end; // Immediately Unlock the execution PAL.UnLockExecution; // Play songs and wait for next Liner PAL.WaitForPlayCount(28); SCS - Dedicated Bandwidth Servers Shoutcast / Icecast / Windows Media Transcoding - Auto DJ - Mobile Radio - FLASH Players - Auto DJ Broadcasting World's Stream Host of the Month Link to comment Share on other sites More sharing options...
EricVdM Posted September 2, 2011 Share Posted September 2, 2011 To lock / unlock, you do it so SAM is locked for the shortest amount of time, like this: thnx for your help Link to comment Share on other sites More sharing options...
Man0r Posted September 3, 2011 Author Share Posted September 3, 2011 Use this PAL script or the first one (that SmoothJazz gave me)? because it works fine. What's the difference? There is an option to do the same PAL script but by a day? all week - "sweepers" folder. Friday - "sweepers_friday" folder. thanks Link to comment Share on other sites More sharing options...
SmoothJazz Posted September 3, 2011 Share Posted September 3, 2011 Here ya go: PAL.Loop := True; PAL.WaitForPlayCount(28); var Present: DateTime; var Year, Month, Day, Hour, Min, Sec, MSec: Integer; Present:= Now; DecodeTime(Present, Hour, Min, Sec, MSec); if (Hour begin CAT['sweepers_night'].QueueTop(smLemmingLogic, NoRules); end else begin if DayOfWeek(Now) = Friday then begin CAT['sweepers_friday'].QueueTop(smLemmingLogic, NoRules); end else CAT['sweepers_day'].QueueTop(smLemmingLogic, NoRules); end; http://5280jazz.com/nowplaying_image/5280jazz.png Rob Oyler 5280 Jazz Link to comment Share on other sites More sharing options...
countryjock Posted November 16, 2011 Share Posted November 16, 2011 I found that using the event schedular is sometimes easier...making a new clockwheel and scheduling music and jingles. Mark Evans (AKA CountryJock) A1-Country Radio If You Like The Work That Has Been Done For You, Please Consider A Donation Here: If I Did Work That Required A Donation, It Can Be Sent Here Too: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BGBXWH46MGXJN If you like Country Music...Feel Free To Visit My Station: www.wix.com/a1country/homepage Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.