Automatically Repeating Hours From Your Log (Myriad 5 / Myriad 6 / Myriad Cloud)

Modified on Tue, 24 Sep at 12:49 PM

You can do all sorts of Log copy trickery using Commands!

command_window.png

Sometimes you want to repeat complete Log hours in your schedule. Under normal circumstances, Myriad Schedule (or AutoTrack) will generate a new Log Hour for every hour of the week.

But once you have edited and Voice Tracked an hour, it is sometimes good to be able to re-use that Log Hour elsewhere in your schedule or maybe even on another Station (if you are running more than one.
This can be done using the Log.CopyHour Command.
The Basic Idea
We can create a Command Media Item that will perform the following tasks:
  1. Delete any existing Log from the target hour that you want to copy into.
  2. Copy a previous Log Hour to the gap you created in step 1.

You can expand this to have a single Command that could copy multiple Log Hours, to multiple destinations, but for now we will simply create a Command Media Item that will copy the content of the previous Log Hour paste it into the Log tomorrow evening.

The Process

The first step is to create a new Command Media Item to perform the task.

  • Find an suitable and empty Media ID.
  • Click on the Edit button on the Media Wall ribbon.
  • Give it a suitable Title.
  • Click on the Command option on the Editor tab.

command_button.png

  • Expand the Command Examples tree node and select Log > Copy the previous hour to tomorrow option (or copy the code from the code block below).
  • This example includes the code needed to copy the previous Log Hour into the Log tomorrow, later in the day.

 log_command.png

Let's take a closer look at that code:

REM First delete the destination hour to make sure it's empty

REM The first parameter being set to -1 means 'in the current open station'

Log.DeleteHour(-1,NowDay+1TNowHour+7)




REM Now copy from the previous hour (NowDayTNowHour-1) to tomorrow, 7 hours forward (NowDay+1TNowHour+7)

REM The first and third parameters being set to -1 means 'FROM the current open station, TO the current open station'

Log.CopyHour(-1,NowDayTNowHour-1,-1,NowDay+1TNowHour+7,true)

Any lines that start with REM are only there as documentation so the only active code in this Command are the two lines that start with Log.DeleteHour & Log.CopyHour.

First lets look at Log.DeleteHour. As you would expect, this Command is used to delete an hour from the Log

command_delete_explain__no_only_.png

  1. This is the Station Database ID. -1 Means the Station that is open when the Command runs!
  2. NowDay allows a relative date to the current day when the Command runs. In this case NowDay+1 means tomorrow.
  3. After the 'T' is the section where you set the time. In this example it is NowHour (when Command is run) + 7 so if the Command runs at 1pm, this time would be 8pm! You can also specify an exact time like 20:00:00.

The Log.CopyHour Command is very similar.

command_copy_explain__no_only_.png

  1. Database ID for hour to copy from. Again, -1 means current open Station DB.
  2. Set the Log Hour you want to copy. In this case the NowDayTNowHour-1 means the previous Log hour to the time/date when the Command is run.
  3. The next setting is for the Station Database ID you want to copy to. In this example, -1 means the current open Station.
  4. Set the target date / time to copy the hour to. In this example we are using NowDay+1 (tomorrow)TNowHour+7 (whatever the current hour plus seven). So if we ran this today at 1pm it would copy the Log Hour to 8pm tomorrow. As before, a specific date and time can be used.
  5. ResetAdvert Breaks - True / False. If set to True then advert breaks will be removed as part of copy.

 

As you can see, you can create Commands to copy hours relative to when the Commands are run or with very specific dates and times built into the Commands.

Remember that you can also have multiple 'lines' in Commands that will be executed in sequence so you could create a single Command Media Item that you run once a day that copies all the desired Log Hours into your future schedule.

 You can learn more about Commands and what the attributes mean by clicking on the Display Available Commands button at the bottom of the Commands window.

 help_with_commands.png

Caution - Triggering Commands

Now that you have a Command that copies the previous hour in the Log to tomorrow (7 hours ahead) you can simply schedule it to to be included in the Log hour after the one you want to copy.

Caution - Why not put in the end of the Log Hour being copied? Well if think about it, the complete Log Hour would be copied to tomorrow including the Command to copy the Hour so you would end up with a cycle of the same hour being copied across your schedule. By running the Command in the following Hour you can avoid this.

Other Options - This works ok as long as you don't need to copy any of the Hours that include this Command. In practice you may be better creating a Media Command (or several) that do all the copying you need, that can be ran once a day in an hour that is not being copied. Commands also act like any other Media Item which means you can trigger them by double clicking them on the MediaWall, add them to Favourites or even drag them into the Log.

Commands are a very powerful tool that can be used for a wide range of applications. It is well worth taking the time to explore the Command documentation to see what is possible.

 

Using This Technique In Myriad Cloud

Myriad Cloud users can use a similar process to repeat hours from the Log but the way the copy process is triggered needs to be a little different to Myriad 5/6 desktop applications.

The Command Media Item to copy the Log hour is exactly the same as above.


 

The issue is that commands are executed by a back end process in Myriad Cloud making them a little less instant than in Myriad Playout. So if you just placed this item in the Log then there would be a short pause in playback while the Command is completed before the next Log item starts.

 

The work around is to use a second Command Media Item that simply 'plays' the copy Log Command item. This means that instead of running the complete Command, the Log will only 'play' the very simple Command before moving onto the next Log Item, this is virtually instantaneous. The copy hour Command is then executed by the system independently from the Log.

To use this method, create a second Command Media Item, give it a suitable Title and paste in the code below.

 

Players.PlayItem(-1,,7000)

 

Players.PlayItem(stationId,playerIndex,mediaId)

 

In this example, the StationId is set to -1 which indicates the current Station.

The PlayerIndex allows you to set the Media Player to use, we will leave it blank in this example so any Player can be used.

The MediaId is the Media ID of copy hour Command Media Item. In this example it is Media Id 7000

 

 

Whenever this Media Item (7001) is 'played' the only thing it will do is trigger Media Item 7000 in any free Media Player.

 

You can now manually add this to the Log or your Clocks.


 

In the example above the, steps will be:

  1. The Avicii song will finish.
  2. Myriad Cloud will trigger Media Item 7001 which will be virtually instantaneous. This will play Media ID 7000 in a free Media Player.
  3. As Media Item 7001 has finished, the Log will move on to the next item which is the Broadcast Radio jingle.
  4. In the meantime, Media ID 7000 has been triggered and will copy the hour to the new position in the Log as per it's script.

In a future update, Myriad Cloud may gain the ability to attached Media Items to time events at which point you can dispense with need for the second 'trigger' Media Item.

 

 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article