Skip to Content
It is currently April 2nd, 2020, 5:17 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Auto start the players
PostPosted: November 8th, 2008, 1:36 pm 
Offline
New User
New User

Joined: October 30th, 2008, 2:40 pm
Posts: 18
Hi guys,

I have trundled through the posts and dont seem to have an aswer to my question.

I have just worked out how PAL scripts work but am still relativly new to writing them. I am looking for a script that will start the players from an idal position automatically. For example, i am going out tonight and need a recorded show to go out at 8pm, i know how to start the encoder at 8pm using the schedular but obviously the player will not start as i have no script in place to do this. Also, if i am not back in time i need the other idle player to take over and play what is also in the queue after it.
Any help would be gratefully received.


Top
 Profile  
Reply with quote  
PostPosted: November 8th, 2008, 2:08 pm 
Offline
Alumni
Alumni

Joined: October 14th, 2006, 9:38 am
Posts: 5986
Location: Deep in the heart of the PRNJ
Assumptions:
SAM is already running. You're adding an encoder to what already is up and running.

I'm guessing your ES event already has a start encoder line. Add a Load File to place the show at the top of the queue (change ipBottom to ipTop.) Manually add
Code:
ActivePlayer.FadeToNext;
to kick whatever is playing or simply wait for a regular song change. Voila! Instant script.

Whatever is next in the queue after the recorded show will run automatically.

_________________
- Stan Olochwoszcz
A proud licensed SAM user since 2002

Raritan Bay Radio


Top
 Profile  
Reply with quote  
PostPosted: November 8th, 2008, 2:48 pm 
Offline
New User
New User

Joined: October 30th, 2008, 2:40 pm
Posts: 18
Firstly i dony quite understand when you say Add a Load File to place the show at the top of the queue (change ipBottom to ipTop.) Also i did mention the player will be idle soi need the player to start on its own at 8pm


Top
 Profile  
Reply with quote  
PostPosted: November 8th, 2008, 3:27 pm 
Offline
Alumni
Alumni

Joined: October 14th, 2006, 9:38 am
Posts: 5986
Location: Deep in the heart of the PRNJ
The Event Scheduler is in effect a little mini-script writer. You can use the controls
as well as manually add many of the same PAL commands used to write scripts.

Erroneous solution deleted. Keep reading...

_________________
- Stan Olochwoszcz
A proud licensed SAM user since 2002

Raritan Bay Radio


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

Joined: October 30th, 2008, 2:40 pm
Posts: 18
Ok, SAM will doing nothing prior to theshow being played.

I know how to use the schedular to get the encoder to work, so at 8pm Encoder comes on.

If i do hat you say above and schedule that file to play at 8pm thats not going to physically make the player start is it? (maybe i'm wrong)


Top
 Profile  
Reply with quote  
PostPosted: November 8th, 2008, 10:36 pm 
Offline
Alumni
Alumni

Joined: October 14th, 2006, 9:38 am
Posts: 5986
Location: Deep in the heart of the PRNJ
SAM is running, auto-recovery off, queue mode. In other words it's just hanging out, waiting for these instructions.

Use Event Scheduler to do these things a few seconds apart to ensure they fire off in order:
    1. Schedule the encoder start
    2. AddFile to queue
    Attachment:
    Picture 2.png
    Picture 2.png [ 21.37 KiB | Viewed 3746 times ]

    3. Run this script...
    Code:
    IdlePlayer.QueueSong(Queue.NextInQueue);
    QueuedPlayer.Play;

This sequence of events will start the encoder, load the desired file at the top of the queue, and start the script which will load the file into the idle player and start the player. You could actually put the player commands into the event:
Attachment:
Picture 5.png
Picture 5.png [ 18.26 KiB | Viewed 3751 times ]

_________________
- Stan Olochwoszcz
A proud licensed SAM user since 2002

Raritan Bay Radio


Top
 Profile  
Reply with quote  
PostPosted: November 9th, 2008, 6:54 am 
Offline
New User
New User

Joined: October 30th, 2008, 2:40 pm
Posts: 18
Ok let me get this right, for this to work i need to do the following......

Schedule the encoder to start using the event schedular at 8pm
Schedule the file to drop into the top of the queue (use the 'add file to queue' option and change ipbotto to iptop)
finally, to get that file to then play run a pal script :
IdlePlayer.QueueSong(Queue.NextInQueue);
QueuedPlayer.Play;
to run at 8pm as well?

I have done the pal script and manually put the file in the top of the queue to see if the pal script will make it play, but nothing happens, i use the schedular and whenthe time comes it disapears out the schedular but the file does not go into the player


Top
 Profile  
Reply with quote  
PostPosted: November 9th, 2008, 8:05 am 
Offline
Alumni
Alumni

Joined: October 14th, 2006, 9:38 am
Posts: 5986
Location: Deep in the heart of the PRNJ
What version of SAM are you using? I tried it several times and it works.

You might want to schedule each item in such a way that you're sure each step is completed before the next one starts, like encoders 7:59:30, queue 7:59:45, play 8:00:00.

_________________
- Stan Olochwoszcz
A proud licensed SAM user since 2002

Raritan Bay Radio


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

Joined: October 30th, 2008, 2:40 pm
Posts: 18
Sam 4.3

Well at the moment i am just doing the script part and that does not work. The other bits work fine.


Top
 Profile  
Reply with quote  
PostPosted: November 10th, 2008, 9:30 pm 
Offline
Alumni
Alumni

Joined: October 14th, 2006, 9:38 am
Posts: 5986
Location: Deep in the heart of the PRNJ
Check for syntax errors and make sure the script compiles correctly. I just tried it and it works as advertised.

_________________
- Stan Olochwoszcz
A proud licensed SAM user since 2002

Raritan Bay Radio


Top
 Profile  
Reply with quote  
PostPosted: November 11th, 2008, 10:34 am 
Offline
New User
New User

Joined: October 30th, 2008, 2:40 pm
Posts: 18
Ok this is very strange,

I have gone back into the pal script and created a completely new one with:

IdlePlayer.QueueSong(Queue.NextInQueue);
QueuedPlayer.Play;

I click on Run and it highlights it blue with no errors, as soon as it does that the idle player takes the first song out the queue and plays it. (not sure why it does that before i schedule it but hey ho)

However, if i now go to event schedular and run the pal script at a certain time, the pal script dissapears from the event schedular at the correct time but the player does not start.


Top
 Profile  
Reply with quote  
PostPosted: November 11th, 2008, 12:44 pm 
Offline
Alumni
Alumni

Joined: October 14th, 2006, 9:38 am
Posts: 5986
Location: Deep in the heart of the PRNJ
The script is doing exactly what it is supposed to do, put the next item in the queue in the idle player and play it. If you run the script by itself and there is something in the queue, it will play that something.

In order for SAM to do what you've been asking you must run things in order:

Start the encoders first to make sure they are up and running.
Next, put the desired file at the top of the queue.
Finally, run the script to load the desired file into the idle player (the one with nothing in it) and play the file you loaded.

You could change IdlePlayer to a specific player if you prefer but you still have to make sure the desired file is at the top of the queue so the right thing gets in there. You could also put the AddFile command in the script but that means every time you wanted to do this you'd have to edit the script. This way, you schedule the changeable parts (the file selection) separately from the repeatable parts (the load/run player instructions.)

_________________
- Stan Olochwoszcz
A proud licensed SAM user since 2002

Raritan Bay Radio


Top
 Profile  
Reply with quote  
PostPosted: November 11th, 2008, 5:33 pm 
Offline
New User
New User

Joined: October 30th, 2008, 2:40 pm
Posts: 18
Elevatorboy wrote:
The script is doing exactly what it is supposed to do, put the next item in the queue in the idle player and play it. If you run the script by itself and there is something in the queue, it will play that something..)


Either i am not being specific enough or i mis-understand you. I did say that if i run the scrip on its own, it does not put the ''something'' rom the queue into the player to play. I said it worked when i wrote the script e.g put the song into the player before i evn scheduled it. But it wont work when scheduled.


Top
 Profile  
Reply with quote  
PostPosted: November 11th, 2008, 7:43 pm 
Offline
Alumni
Alumni

Joined: October 14th, 2006, 9:38 am
Posts: 5986
Location: Deep in the heart of the PRNJ
A few posts back, you wrote:
I click on Run and it highlights it blue with no errors, as soon as it does that the idle player takes the first song out the queue and plays it. (not sure why it does that before i schedule it but hey ho)

That's exactly what it's supposed to do. It shouldn't matter whether you run it manually or the ES fires it off.

I just tested it again. Both players empty, nothing playing, Queue mode, auto-recovery off.
Event Scheduler was set up to load the file at :26:00, run the script at :26:05.
At the appointed times, ES queued the file, the file loaded into the player and began playing.

At this point I don't know what to tell you. It works for me every time.

_________________
- Stan Olochwoszcz
A proud licensed SAM user since 2002

Raritan Bay Radio


Top
 Profile  
Reply with quote  
PostPosted: November 11th, 2008, 10:31 pm 
Offline
New User
New User

Joined: October 30th, 2008, 2:40 pm
Posts: 18
Thought i would try it again and its not working, player is idle, queue mode set, auto recovery off, the file is sitting in the queue, set it to work at 03:15:00, the time comes and it dissapears out es and nothing plays.

i appreciate the help you are giving me but i dunno what to say either really.


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

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 5 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