How to configure Scheduling & Logging

In this topic we will walk through the process of configuring Scheduling to produce a basic schedule that will: begin playing an hourly segment at 9am in the morning, and continue to top up the playlist with hourly segments until 6pm at night, when it will disable the Auto DJ tool and switch off OtsAV.

Note: It is not necessary to disable the scheduling tool, this type of schedule can run 24/7 if desired. Demonstrating this functionality simply highlights the Scheduling capabilities.

The example below will provide you with a basic working example of Scheduling. You will need to advance this example to meet your individual scheduling needs.    

Before you can see this schedule in operation you will need to do a little preparation work. You will need to: prepare the categories that the Playlist Template will use, build a Playlist Template file that will create the hourly playlist segment, and build the Event Table that will load the hourly playlist when required.

Components of Scheduling that you will be working with include: Advanced Playlist templates and the Scheduling Event table.

Hot Tip: Before we go any further it is highly recommended that you immerse yourself in the Scheduling & Logging reference documentation, click here for details, and also become familiar with the Ots Playlist Template format, click here for details.

 

Preparing the Categories  

First you will need to make sure that the categories we will be using, in the Playlist Template, are present in the Media Library, and that the categories are populated.

The categories we will be working with are: Rock, Pop, Dance, 1980s, Favorites, and Spots, (these categories are the original categories in OtsAV). Check that these categories exist in the Media Library, if not you will need to create them. For instructions on creating new categories click here, or follow the "How to create the Spots category" example below.

Note: You are not restricted to the categories outlined above. You are able to advance the playlist template and use any manner of categories you wish.

A Spot is another name for a Radio Jingle. The OtsAV Demo installs the Ots-FM - Spots.ots Ots Album file on your system at installation time. This file contains four Ots FM spots that we will need to use in this example.

Due to the fact the Spots category is not present in the Media Library by default you will need to create it.

How to create the Spots category

 Go to Edit -> Manage Categories... This will open the Manage Categories dialog box.

 

Now that you have prepared the categories, you will need to populate them with items, so that OtsAV will have a reasonable selection of songs to select from when generating a playlist. For instructions on populating your Rock, Pop, Dance, 1980s, and Favorites categories click here.

You will also need to import and add the Ots-FM spots album file to the Spots category.

 

How to import the Ots-FM Spots album file.

 

How to add the Ots-FM Spots album file to the Spots category

 

Building a Playlist Template file

As a general rule of thumb when building an hourly playlist segment, you will need 12 compulsory item queries and 6 optional item queries. This will provide the Playlist Generator enough scope so it can easily select items that will make up an exact hour. The Playlist Template example below has 12 compulsory and 6 optional item queries.

We have color coded the Playlist Template components to help with identifying the global options and item query components, see template below.

Fuchsia highlights the global options.

Teal highlights the Directive item queries.

Red highlights the Spots item queries.

Green highlights the compulsory item queries.

Blue highlights the optional item queries.

Black highlights the comments within the template. Comments are preceded by the # symbol, which causes OtsAV to ignore the entire comment line.

 

Closer look at an Item Query

Before we go any further we will take a closer look at the components of one of the template's item queries.

#~iq=2 tells OtsAV to select two Rock songs.

~iq=2 avail & Rock & rating > 0 & itemsep artist > 20 & itemsep title > 20 & lastplay > 12 hours

 

#~iq=2 tells OtsAV...: This is a comment line, which will be ignored by OtsAV.

 

~iq=2: Tells OtsAV to select two items/songs from the category specified.

 

avail: Tells OtsAV to only select items that are available, items which are unavailable will be ignored.

 

Rock: Tells OtsAV the category that the items are to be selected from.

 

rating > 0: Tells OtsAV to select items with a rating greater than zero. Items with a rating of zero are ignored. Items with a rating of zero can be items you never want included in a playlist.

itemsep artist > 20: Tells OtsAV to place at least 20 items of spacing between the same artists.

itemsep title > 20: Tells OtsAV to place at least 20 items of spacing between the same titles.

lastplay > 12 hours: Tells OtsAV to ignore items that have been played in the last 12 hours.

For more details on the components of a Playlist Template click here.

 

You will now need to Copy and Paste the below example template into the Playlist Generation Template area and test it.

 

#START

# Global options:

# Generate a playlist segment of exactly 1 hour

~length iterations=1, target=60

 

# Clean up any drift

@TimeSync=*:00:00

 

#Loads the "All new Ots FM" spot. This iteration shows

# that you can reference a item directly.

C:\OtsLabs\OtsFiles\Demo\Ots-FM - Spots.ots|1

 

#~iq=2 tells OtsAV to select two Rock songs.

~iq=2 avail & Rock & rating > 0 & itemsep artist > 20 & itemsep title > 20 & lastplay > 12 hours

 

#Tells OtsAV to select a Rock song if there is room.

~optional group=1

~iq avail & Rock & rating > 0 & itemsep artist > 20 & itemsep title > 20 & lastplay > 12 hours

 

#Loads the "Ots FM, Your local station" spot

C:\OtsLabs\OtsFiles\Demo\Ots-FM - Spots.ots|2

 

#~iq tells OtsAV to select a single 1980s song.

~iq avail & 1980s & rating > 0 & itemsep artist > 40 & itemsep title > 20 & lastplay > 12 hours

 

#Selects an optional 1980s song

~optional group=1

~iq avail & 1980s & rating > 0 & itemsep artist > 20 & itemsep title > 20 & lastplay > 12 hours

 

#Selects a spot from the Spots category.

~iq avail & Spots & lastplay > 30 minutes

 

#Selects two general songs

~iq=2 avail & !Spots & rating > 0 & (Rock|Pop|Dance|1980s|Favorites) & itemsep artist > 20 & itemsep title > 20 & lastplay > 12 hours

 

#Selects an optional general song

~optional group=1

~iq avail & !Spots & rating > 0 & (Rock|Pop|Dance|1980s|Favorites) & itemsep artist > 20 & itemsep title > 20 & lastplay > 12 hours

 

 

#Loads the "Fresh and Funky" spot

C:\OtsLabs\OtsFiles\Demo\Ots-FM - Spots.ots|3

 

#Selects a Favorite song

~iq avail & Favorites & rating > 0 & itemsep artist > 20 & itemsep title > 20 & lastplay > 12 hours

 

#Selects an optional Favorite song

~optional group=1

~iq avail & Favorites & rating > 0 & itemsep artist > 20 & itemsep title > 20 & lastplay > 12 hours

 

#Selects three Pop songs

~iq=3 avail & Pop & rating > 0 & itemsep artist > 20 & itemsep title > 20 & lastplay > 12 hours

 

#Selects an optional Pop song

~optional group=1

~iq avail & Pop & rating > 0 & itemsep artist > 20 & itemsep title > 20 & lastplay > 12 hours

 

#Selects a spot from the Spots category.

~iq avail & Spots & lastplay > 30 minutes

 

#Selects three Dance songs

~iq=3 avail & Dance & rating > 0 & itemsep artist > 20 & itemsep title > 20 & lastplay > 12 hours

 

#Selects three optional Dance song

~optional group=1

~iq avail & Dance & rating > 0 & itemsep artist > 20 & itemsep title > 20 & lastplay > 12 hours

 

# END

 

If you receive a parsing error message it will most probably because the category names listed in the template do not match the listing in the Media Library. You will need to correct the category name in the Media Library.

If your playlist is showing Placeholders it is most probably because your categories do not contain enough items/songs for the rules that are set in the template. You may need to reduce the artist and title separation rules or reduce the lastplay time.

The playlist will be placed at the end of whatever is playing. If there is nothing in the playlist it will be waiting for the @TimeSync=*:00:00 to kick in. You may wish to manually load a simple playlist before Time Sync.

 

Building the Event Table

You will now need to build the Scheduling Event Table.

Note: The event table we are building below is very basic. You will obviously need to advance this example as your requirements increase. For details on the Event Table components please click here.

 

#START

#Generates the ots-fm playlist in advance

#so OtsAV can start at 9am.

8:59 template end 1 ots-fm.otm

 

#Adds an ots-fm playlist to the end of the existing playlist

#so that there are a reasonable amount of items for the specified

#separation rules.

9:05 template end 1 ots-fm.otm

 

# Causes OtsAV to save the Media Library every hour at one

#minute past the hour.

*:01 saveoml

 

#Generates the ots-fm playlist and adds it to the end of

#the existing playlist three minutes past the hour.

*:03 template end 1 ots-fm.otm

 

#Switches Auto DJ off at 6 pm.

18:00 autodj off

 

#Shuts OtsAV down at two minutes past 6pm.

18:02 exit

#END

 

Note: When the first event starts the resulting playlist will be placed at the end of whatever is playing. If there is nothing in the playlist it will be waiting for the @TimeSync=*:00:00 to kick in. You may wish to either manually load a simple playlist before the scheduling begins, or have Scheduling load a playlist before the first event.

 

How to get Scheduling working now

If you are wanting to see Scheduling in action now, you can alter the start time of this Schedule. Simply change the times that the template files are loaded. For example:

If it is 8:40pm at night for you now ,change the starting time to 8:59pm, which is 20:59 in 24 hour time (Scheduling time must be in 24 hour time).

#Change the time to begin the Schedule at 8:59pm.

20:59 template end 1 ots-fm.otm

 

 

 

How to make the above example work 24/7

 

The following event table is used for a very basic 24/7 set up whereby you simply want each hour of programming generated approximately two hours before it is due to go to air. At 3 minutes past the hour, another hour of programming is generated and appended to the end of the playlist. Once running, this setup will run forever without getting out of sync. When you first start it however, you will have to generate the first two hours of programming manually, if you really do want to maintain two hours of programming in the playlist at all times.

 

 

#START

 

# Causes OtsAV to save the Media Library every hour at one

#minute past the hour.

*:01 saveoml

 

#Generates the ots-fm playlist and adds it to the end of

#the existing playlist three minutes past the hour.

*:03 template end 1 ots-fm.otm

 

#END

 

Related Topics:

Scheduling & Logging reference

Priority Weightings explained

How to launch your station from an icon