Time Announce at.. the right Time

You have a question or need an advice about how to do something? Ask it here!
User avatar
sun7radio
Posts: 79
Joined: 06 Mar 2014 10:14
Time Announce at.. the right Time

Post by sun7radio »

Hello,

I'm trying to trigger time announcement at the right time.

For this I have a bunch of ogg files named timehhmm.ogg with 'hh' for the hours and 'mm' for the minutes.

Thinking I was clever I tried to use this script line:
LoadTrack : O:\time-announces\Sun7\time${HH}${mm}.ogg

It works except that the chosen time is the time at which the script is executed, not the time at which the announcement is broadcasted.

Is there a way to get the correct time, that is the exact time at which the time is announced ?

Cheers,
Guy.
User avatar
sun7radio
Posts: 79
Joined: 06 Mar 2014 10:14
Re: Time Announce at.. the right Time

Post by sun7radio »

Ok,
I've tried with this script, but nothing happened at the time of the program start (only the song was triggered, not the fixed time element):

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<script version="1">
    <title>test</title>
    <creator>ProppFrexx ONAIR</creator>
    <date>2014-03-08T13:08:40+01:00</date>
    <settings>
        <mode>Sequential</mode>
        <loopScriptLine>0</loopScriptLine>
        <reloadMediaLibrary />
        <asyncReloading>true</asyncReloading>
        <initialTrack />
        <archiveFilename />
        <additionalSongHistoryFilename />
        <maxHistory>0</maxHistory>
        <clearHistoryAtReload>true</clearHistoryAtReload>
        <jingleMediaLibrary />
        <jingleFrequencyFrom>0</jingleFrequencyFrom>
        <jingleFrequencyTo>0</jingleFrequencyTo>
        <jingleMode>Random</jingleMode>
        <jingleCount>1</jingleCount>
        <advertMediaLibrary />
        <advertFrequencyFrom>0</advertFrequencyFrom>
        <advertFrequencyTo>0</advertFrequencyTo>
        <advertMode>Sequential</advertMode>
        <advertCount>1</advertCount>
    </settings>
    <scriptLines>
        <line>
            <mode>Random</mode>
            <entry>CATEGORY:mixes</entry>
            <count>1</count>
            <options>0</options>
        </line>
    </scriptLines>
    <fixTimeElements>
        <element>
            <recurrenceMinute>0</recurrenceMinute>
            <recurrenceSecond>0</recurrenceSecond>
            <recurrence>true</recurrence>
            <skipInitial>false</skipInitial>
            <startType>Fixed</startType>
            <approxDuration>0</approxDuration>
            <asTimeUpdateSync>false</asTimeUpdateSync>
            <maxDelay>60</maxDelay>
            <maxRemain>0</maxRemain>
            <asOverlay>false</asOverlay>
            <attenuation>-20</attenuation>
            <mode>LoadTrack</mode>
            <entry>\time-announces\Sun7\time${fix_HH}${fix_mm}.ogg</entry>
            <count>1</count>
            <options>3</options>
        </element>
    </fixTimeElements>
    <scriptRules />
</script>
The entry is filled with "\time-announces\Sun7\time${fix_HH}${fix_mm}.ogg" but in the script editor it is "O:\time-announces\Sun7\time${fix_HH}${fix_mm}.ogg"

Any idea why my fixed time element is not triggered ?

Cheers,
Guy.
User avatar
hdradio
Posts: 625
Joined: 10 Apr 2012 17:36
Location: Crete, Hellas
Re: Time Announce at.. the right Time

Post by hdradio »

What if I want to time announce not at fixed times, but for example when a song finishes ?
Is there a way to resolve and load the correct file at the time the time announce is about to play ?
I have two files. One has the hours and the other the minutes.
So is there a way to play a script having a Hour file and Minute file at anytime ?
For example : Time is 13 past 10.
User avatar
sun7radio
Posts: 79
Joined: 06 Mar 2014 10:14
Re: Time Announce at.. the right Time

Post by sun7radio »

I've just retested it by creating a program with the same script, starting at 15:30.

The program started correctly, at the right time, instantly, but my time file did not play.
The program was set with the "Reload Script before Start" option, just to be sure.

Also, to be sure, I've removed the macros and chosen an arbitrary time file.

Are there some configuration settings I might have changed having impact on fixed time events that could possibly prevent them to play ?

Cheers,
Guy.
User avatar
sun7radio
Posts: 79
Joined: 06 Mar 2014 10:14
Re: Time Announce at.. the right Time

Post by sun7radio »

erm.. a line just appeared in the playlist, a line in red with my time file, but scheduled for 16:00 !?

In the script I have 00:00 and according to the doc it is the offset relative to the program start time (so in my case it should have played at 15:30 then 16:30 etc..).

I don't understand what is happening.

Cheers,
Guy.
User avatar
sun7radio
Posts: 79
Joined: 06 Mar 2014 10:14
Re: Time Announce at.. the right Time

Post by sun7radio »

I'm letting the program run up to 21:00.

So far only one occurrence of the fixed timed event, but at the wrong time (16:00 instead of 15:30).

And there is no repeat at 17:00 in the playlist despite the repeat option activated.

Not sure what to do to make it work properly.

Cheers,
Guy.
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Time Announce at.. the right Time

Post by radio42 »

Looking at the script you provided above you have set it to Minute = :00 - which means the full hour and not :30
So you better recheck your FTE settings ;-)
User avatar
sun7radio
Posts: 79
Joined: 06 Mar 2014 10:14
Re: Time Announce at.. the right Time

Post by sun7radio »

Ok, now that I know the time value is not an offset to the program start hour but to an absolute hour, things are a bit clearer, so I did some more tests.

The problem I have seems to be related to the macros and not to the fixed time events.

Whenever I execute the script with an explicit time file as such:
time1900.ogg
it works, the file is triggered correctly and at the right time and it appear in the playlist.

However, when I use the two macros: ${fix_HH} and ${fix_mm} as such:
time${fix_HH}${fix_mm}.ogg
then nothing happen, no time file is triggered nor appear in the playlist.

According to the doc, those two macros should be the right one to use:
${fix_HH} : the elements start hour 2-digits (00-23)
${fix_mm} : the elements start minute 2-digits (00-59)

I've checked the different log files but I did not detected any suspicious messages or error.

Could there be an issue with those macros inside a Loadtrack filename of a Fixed Time Event ?

Cheers,
Guy.
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Time Announce at.. the right Time

Post by radio42 »

The right way to do that is to use so called Fix Time Elements (FTE).
See the related button at the bottom of the script edit dialog.

Instead of using the time macros ${HH} and ${mm} you would then use the ${fix_HH} and ${fix_mm} or the ${start_HH} and ${start_mm} macros.
These macros then resolve to the effective fix time element start time as specified with the FTE.

A FixTime Element is a special script element which is scheduled at an exact given time, e.g. at every :30 minute of an hour.
If a FixTime Element is due to be scheduled for its given time it will be used in addition to the regular script lines.

Please also click on the '?' icon at the top right of the Fix Time Element dialog to understand the different optional values.
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Time Announce at.. the right Time

Post by radio42 »

@hdradio: no, that is currently not supported.
I.e. the tracks are loaded in advance to the DJ Players...however, at that time, the effective time is not known (e.g. when there are 3 players the tracks are loaded 2 players in advance).
As such the effective time might be totally different when the real player is about to play...


@sun7radio:
How are you testing things?
Here it is working just fine.
Note, that you must have patience and test things in real-time (do not simply advance the computer time - as things are calculated in advance)!
(anyhow, track locations inside the script are saved relative to the location of the script file - so that looks normal)

Post Reply