Scheduling

mAirListDB includes a scheduler (the Mini Scheduler) that generates the hourly playlists automatically from templates. The generated playlists are stored in the database, where they can be reviewed and edited on the Playlist tab, and are then loaded into the playout, e.g. by an event.

Concepts

The scheduler uses three kinds of templates, each describing a different aspect of the playlist:

  • Hour templates describe the structure of an hour (also known as a clock): which elements are played in which order. For example: the station ID at the top of the hour, then the news, then a music block, an advertising break, another music block, and so on.
  • Music templates describe which music is played. Within the hour template, the music is only referenced by block numbers (Music block 1, Music block 2 etc.). The music template defines, for each block number, the folders or items the songs are picked from.
  • Transition templates describe which transition elements (e.g. jingles or sweepers) are inserted between the items of the generated playlist, based on rules such as “insert a slow-to-fast jingle when a slow song is followed by a fast one”.

Each hour of the week is assigned one template of each kind. Because the three kinds are defined separately, they can be combined freely. For example, you can use the same hour template (structure) all day long, but assign a “morning” music template in the morning and an “evening” music template in the evening. Or you can use the same music template throughout the week, but switch to a different hour template on weekends, when there is no news. This keeps the number of templates small, and a change to one aspect (e.g. the music rotation) only has to be made in one place.

Managing Templates

Templates are managed in the Manage Templates dialog, which you open through Administration → Manage Templates… in the menu of the database app. The dialog refers to the station that is currently selected in the database app.

Select the template kind (Hour, Music or Transitions) from the tabs at the top of the dialog.

Available Templates

The list on the left hand side contains the available templates of the selected kind. Use the toolbar to:

  • New: Create a new, empty template.
  • Copy: Create a copy of the selected template, e.g. as a starting point for a variation.
  • Delete: Delete the selected template. Any assignments of this template are removed as well. This cannot be undone.
  • Edit: Open the template editor (see below). You can also double-click a template.

Assignment

The grid on the right hand side shows the assignment of templates to the hours of the week, with one column per weekday and one row per hour. Each template is displayed in its own color.

To change the assignment, select one or more cells in the grid with the mouse, right-click the selection, and choose a template from the menu, or Select Template… to pick one from a list. Clear removes the assignment from the selected cells. Hours without an hour template are skipped by the scheduler.

If more than one sub-playlist is set up, there is a separate assignment for each sub-playlist; select it from the tabs above the grid.

The assignment can be saved to a file and loaded again through Export to file… and Import from file… in the context menu.

Conditional Assignments

In addition to the default assignment, you can define assignments that only apply under certain conditions, e.g. during the summer or in every other week. Click Conditions… to show the list of conditions, and select a condition to view and edit its assignment. An hour that is left empty in a conditional assignment falls back to the next applicable assignment.

The following conditions are available:

  • Seasons (Season 1 to Season 8): A season is a set of date periods, e.g. “Christmas” from December 1 to December 26. Select a season and click Edit Season… to give it a name and define its periods. For each period, enter the first and last day, and specify whether it repeats every year.
  • Calendar Weeks: Even week and Odd week, according to the ISO week number.
  • Weekday in Month: 1st in month to 5th in month, e.g. to schedule a different show on the first Sunday of each month.
  • 2-Week Cycle to 6-Week Cycle: Week 1 of 2, Week 2 of 2, and so on, to rotate between several assignments in a fixed cycle. The cycles are counted from the reference date set in the scheduler settings.
  • Special: An assignment that is only used when explicitly requested in the scheduler (see Generating Playlists), e.g. for a holiday programme.

If more than one condition applies to an hour, the most specific one is used, in the following order of precedence: Special, then the week cycles (6-week cycle first), then Weekday in Month, Calendar Weeks, the seasons (Season 8 first), and finally the default assignment.

Hour Templates

The hour template editor has two tabs.

On the General tab, you can enter the Name and Description of the template, and set the following options:

  • Perform auto float after scheduling: After the playlist has been generated, floating items are moved to fill underruns and resolve overflows in front of fixed-time items.
  • Perform Auto Mix after scheduling: Run Auto Mix on the generated playlist.
  • Postprocessing Script: An optional script that is run on the generated playlist, e.g. to make modifications that cannot be expressed through the template.

On the Items tab, you define the elements of the hour. Click Add… to add an item, select the item type from the menu, and configure it. Drag the items to change their order. Use Import and Export to transfer the items to another template or database.

How the Scheduler Processes an Hour Template

The scheduler processes the template in several passes:

  1. All items are processed in order, and the corresponding playlist items are selected.
  2. Items with the Infinite/fill setting (e.g. Fill with music) are processed. Each of them is filled with as many items as needed to reach the next fixed-time item, or the end of the hour.
  3. Items in replacement mode (see below) replace the dummy items with the same title.
  4. The transitions of the transition template are inserted, and Auto Mix and auto float are performed if enabled.

Common Settings of Template Items

Each template item has the following settings, in addition to its type-specific settings.

General tab:

  • Duration: The Estimated duration of the item, used to calculate the timing of the hour while scheduling, e.g. for items whose actual duration is not known yet. Overflow by allows a fill item to exceed the end of the time to fill by the specified duration. Check Infinite/fill to fill the remaining time up to the next fixed-time item or the end of the hour (only available for item types that support filling).
  • Timing: The timing type of the generated item, e.g. Hard Fixed Time for the news at the top of the hour, and the Fixed time within the hour. Check before top of the hour to count the fixed time backwards from the end of the hour, e.g. 2:00 before the top of the hour. The Time frame specifies a window (in seconds) for the fixed time.
  • Opener and Closer: Items that are inserted before and after the generated item(s), e.g. an intro and outro jingle for the news.
  • Options:
    • Create a container if more than one item: If the template item generates several playlist items, they are combined into a container.
    • Always create a container: Always put the generated items into a container.
    • Prevent auto float around this item: Auto float does not move items across this item.
    • Reset timing to Normal after scheduling: The timing is only used while scheduling, and reset to Normal in the generated playlist.
    • Ignore errors (do not generate error dummy item): By default, if an item cannot be generated (e.g. an empty folder), a dummy item describing the error is inserted into the playlist. Check this option to omit it.
    • Expand variables in URL/filename: Replace logging variables in the URL or filename of the generated item.
  • Set/Replace Region Container Filler Items: For region containers, set the filler to a Specific item, or to a Random item from a folder.

Restrictions tab:

  • Hour Restrictions: Only use this template item on the selected days and hours. This way, a single template can be used for several hours with small variations, e.g. a station ID that is only played in the morning hours.

Replacement tab:

  • Replacement mode: Instead of adding its content at its own position, the item looks for a dummy item with the specified Title that was generated by other parts of the template (e.g. by an included template, or imported from an external scheduler), and replaces it with its content.

Music Items

These items insert music from the music template assigned to the hour. Each refers to a Block number (1–16) of the music template.

  • Music (one song): Inserts the next song from the block. If all entries of the block have been used, the block starts over.
  • Music block: Inserts one song for each remaining entry of the block, in the order of the list. Transitions defined in the music template are inserted between the songs. This item cannot be used with blocks in the Randomly pick mode.
  • Fill with music: Fills the remaining time (up to the next fixed-time item or the end of the hour) with songs from the block, or a specified duration if Infinite/fill is not checked. Transitions defined in the music template are inserted between the songs.

Library Items

  • Specific item: Inserts a particular item from the library, e.g. the station ID.
  • Random item from folder: Picks one item from a library folder, using the selection strategy of the folder. Check Include subfolders to also consider the items in subfolders. On the Filters tab, you can restrict the selection to an item type, or to items with particular attribute values.
  • Fill with random items: Same as Random item from folder, but fills the remaining time with as many items as needed.
  • Most recently added item: Inserts the item that was added to the folder most recently, e.g. the latest news bulletin or weather report.

Sub-Playlist Items

These items insert content from another sub-playlist of the same hour, e.g. a sub-playlist that contains the ads or the news, scheduled separately. Common settings:

  • Station (empty=current): Take the content from a different station.
  • Sub-Playlist: The sub-playlist to take the content from.
  • Hour offset: Take the content from an earlier or later hour.
  • Region mapping: For regionalized content, maps the sub-playlist to regions.
  • Restart from beginning of sub-playlist: Start from the first item of the sub-playlist again, instead of continuing where the previous item of this kind left off.

The item types are:

  • Next from sub-playlist: Inserts the next item from the sub-playlist. Use several of these items to distribute the content of the sub-playlist across the hour.
  • All from sub-playlist: Inserts all items of the sub-playlist.
  • Sub-playlist as container: Inserts all items of the sub-playlist, combined into a container. Enter the Title, Artist and Type of the container.
  • Region Container: Creates a region container, with the content for each region taken from a separate sub-playlist. Set the container properties, the Auto fill method and the Filler item used to compensate for different durations.

Structure and Other Items

  • Include hour template: Inserts the items of another hour template at this position. Use this to share common parts (e.g. the top of the hour) between several templates.
  • Advertising: Inserts the specified advertising Block of the hour, as scheduled in the advertising scheduling.
  • Dummy: Inserts a dummy item with the specified Title, Artist, Type and Color, e.g. as a placeholder for a live segment, or as a target for replacement mode.
  • Start of hour marker and End of hour marker: Insert dummy items that mark the beginning and end of the hour in the playlist.
  • External items: Inserts a fixed list of items, e.g. a stream or a command item, that are not part of the library.

Music Templates

The music template editor has three tabs.

On the General tab, enter the Name and Description of the template.

On the Block Definition tab, you define the content of the music blocks. Select the block (Block 1 to Block 16) from the tabs. For each block, set:

  • Source:
    • Internal scheduler (use Folder Selection): The songs are picked from the library by the scheduler, using the folder list below.
    • External scheduler (import from file or external source): The songs are imported from the playlist of an external music scheduler. Click Configure… to set up the import.
    • Hybrid (try import first, fallback to internal scheduler): Try to import the songs, and use the internal scheduler if that fails.
  • Mode: How the entries of the folder list are used. Each entry is used once, until all entries of the block are used up:
    • Randomly pick from the list of folders/items: Each song comes from a randomly chosen entry of the list, and the list starts over when it is used up. Not compatible with the Music block template item; use Fill with music instead.
    • Use exact order: Use the entries in the order of the list. When the list is used up, no further songs are scheduled from the block.
    • Use exact order, repeat if necessary: Same, but start again from the top of the list when it is used up (for Fill with music and Music (one song)).
    • Maintain order, allow random selection: With Fill with music, the entries are picked in random order, but the resulting songs are arranged in the order of the list. With the other template items, this works like Use exact order.
    • Maintain order, allow random selection, repeat if necessary: Same, but start again when the list is used up.
  • Folder list: The entries the songs are picked from. Double-click a folder in the Available Folders list to add it, or use the toolbar. Each entry can be configured:
    • Source: A random item from the following folder (optionally including subfolders), or a Specific item.
    • Opener and Closer: Items inserted before and after the song.
    • Prevent overrun: Only pick a song that fits into the remaining time to fill.
    • Filters: Restrict the selection by item type (Type Filter) or attribute values (Attribute Filters). Soft Attribute Filters do not exclude non-matching songs, but add a penalty to them, so that matching songs are preferred.

A typical music block alternates between categories, e.g. “Current hits”, “Recurrent”, “Current hits”, “Gold”, using Use exact order, repeat if necessary.

On the Transitions tab, you can define transition rules that apply within the music blocks, i.e. between the songs that are added by Music block or Fill with music. The rules work the same way as in transition templates (see below).

Transition Templates

A transition template contains a list of transition rules. After the playlist has been generated, the scheduler walks through the playlist and checks, for each pair of consecutive music items, whether a rule matches. The first matching rule determines the transition item, which is inserted between the two songs.

On the General tab of the editor, enter the Name and Description of the template. On the Transitions tab, add, configure, remove and reorder the rules. Each rule has the following settings:

  • Number of music items: The rule is applied after the specified number of songs were scheduled in a row. Use this e.g. to insert a jingle after every third song.
  • Minimum number of subsequent music items: The rule is only applied if at least this number of songs follow the transition, e.g. to avoid a jingle right before the news.
  • Item 1 Condition: An attribute and value that the song before the transition must have. Leave the attribute empty to disable the condition, or the value empty to match any value.
  • Item 2 Condition: The same, for the song after the transition.
  • Folder: The folder the transition item is picked from (optionally including subfolders).
  • Artist of transition item and item 2 must match: Only use a transition item with the same artist as the following song, e.g. for artist-specific liners.

Example: With a “Tempo” attribute, a rule with Item 1 = Tempo “Slow” and Item 2 = Tempo “Fast” can insert a jingle from a “Ramp-up jingles” folder whenever a slow song is followed by a fast one. A last rule without conditions can serve as the default transition.

Generating Playlists

Manually

To run the scheduler manually, go to the Playlist tab and select Generate → Scheduler in the playlist toolbar. In the Mini Scheduler dialog, set:

  • Period: The first and last day to generate playlists for. The dropdown list offers presets such as Today, Tomorrow, One week, from today, One week, from tomorrow and Next week.
  • Hours: The hours to generate. By default, all hours (0–23) are generated; click Change… to select particular hours.
  • Stations: The stations to generate playlists for.
  • Options:
    • Preview playlists before saving: Show the generated playlists in a preview window, in which you can review them before saving them to the database.
    • Prompt before overwriting existing playlists: Ask before an existing playlist is replaced.
    • Use “Special” template assignment for all days: Use the Special assignment where defined.
    • Adjust template assignment before scheduling: Show the resulting template assignment for the selected period, and allow you to change it for this run only.
    • Jump to first scheduled hour when finished: Open the first generated playlist on the Playlist tab.
    • Generate debug log file and Open debug log file after scheduling: Write a detailed log of every decision of the scheduler, which helps to understand why a particular song was (or was not) picked.

To generate only the playlist that is currently open on the Playlist tab, select Generate → This Playlist…. You can then choose the hour, music and transition templates to use, overriding the assignment. The result is not saved until you click Save.

Automatically

To generate the playlists automatically, e.g. every night for the upcoming days, use the Generate playlists action, typically in an event of the playout. Its settings are the number of hours to generate in advance, whether to include the current hour, and whether existing playlists (or only those containing errors) should be overwritten.

Settings

The settings of the scheduler are found on the Scheduler tab of the administrative settings.

Selection Strategies

The selection strategy determines how the scheduler picks an item from a folder. It is set globally on the Settings sub-tab, and can be overridden for individual folders in the folder properties.

  • Smart: The default strategy. The scheduler prefers the items that have not been played for the longest time, and applies separation rules:

    • Track separation: The minimum number of hours before the same item is played again.
    • Artist separation: The minimum number of hours before an item by the same artist is played again.
    • Title separation: The minimum number of hours before an item with the same title (e.g. a different version of the same song) is played again.

    Separation rules are not strict. Instead, each violation adds a penalty that grows with the number of hours by which the separation is missed, multiplied by the penalty value of the rule. The scheduler then picks one of the items with the lowest overall penalty. Items whose penalty exceeds the Maximum overall penalty are never picked. The Rotation variance (0–99) controls how much randomness is added to the selection: with a low value, the item that was played least recently is almost always picked; with a higher value, the scheduler picks more randomly among the candidates.

  • Random: Picks a random item from the folder.

  • Rotation: Plays the items of the folder one after the other. The position of the rotation (Next index) is shown in the folder properties, where it can also be reset.

  • Advanced Rotation: Same as Rotation, but in a configurable Sort order (ID, External ID, Title, Filename, Filename without path, Last Use, or an Attribute).

Artist Groups

On the Artist Groups sub-tab, you can define groups of artists that are treated as the same artist for the artist separation, e.g. a band and its lead singer’s solo project. Click Separators… to define the strings that separate multiple artists in the artist field (e.g. “feat.” or “&”), so that each of the artists is considered for the separation.

Advanced

The Advanced sub-tab contains the following settings:

  • Reference date for week numbering: The start date for the week cycles.
  • Week starts on: The first day of the week.
  • Alternative artists attribute and Alternative titles attribute: Attributes that contain further artist names or titles of an item, which are considered for the separation rules as well.
  • Opener attribute and Closer attribute: Attributes that specify the opener and closer of an item. These can also be set per station.

On the Options sub-tab, you can enable Use opener and closer from subfolder when selecting recursively: when an item is picked from a subfolder, the opener and closer of that subfolder are used instead of those of the folder referenced in the template.