End of Sequence warning?

Does anyone know if it possible to get a player to flash to show End of Sequence (ie near end of last file in a playlist), instead of end of file?

Reason - I have had feedback from our presenters that if it is running in Auto, they don’t care if a file is near the end if another file is following which will be played automatically. The only time they care is when the last file is playing where a flash would tell them they need to get ready to do something.

The only way I can think of to do this right now would be to write a Notification Script, probably for OnPlayerLoad, which would do something like the pseudocode below.

if in auto mode then
  obtain playlist count
  if count is < 1 then
    display a message or warning somehow
  end if
end if

The only problem is that you can’t display a message box or similar from mAirList scripting yet (hint to Torben ;)).


I’m no coder, but I guess it needs another line and variable input such as

…andIF remaining playing time< X seconds …otherwise it might flash during the entire last file which might annoy presenters!

So what’s the verdict - is this a theoretical possibility some time in the future, or a real possibility now…?

Cheers, Glyn

Until mAirList can include a message box, the script from Cad is perhaps the most suitable option. It would need to cause the player to flash constantly during the last file, just in case the presenter missed any warning that may have occured say during the first X seconds.

Cad or Torben, would it be possible to cause the mode to display Assist in place of Auto and this flash as a warning rather than the player in use.


Alternately in the player window introduce an optional counter that shows the number of items still in the playlist, which I think is available in the event window, which we do not have visible.


There are always the time display functions, tucked away inside the config tool. Here you can set players to show ramp, elapsed, remaining time or all together. A presenter should visually see there is no more audio to load and also see the countdown. If the audio is inside a container it will still show remaining time.

Kind Regards Tony

I should perhaps add that I don’t think it’s possible to ‘flash’ the Player background colour either. :-[

Though I do like the idea of a ‘live’ item count in the Playlist Toolbar; which would of course require Yet Another New Config checkbox (ShowPlaylistItemCount or similar in the [Playlist] section of skini.ini; labelled Show Playlist Item count in Toolbar or similar in Config and in each Playlist’s GUI Options context menu). Default would be ‘on’ IMHO (discuss!).

Tony: have you added the Item Count Display as a Feature Request? I think it’s a good one, and I’ll add it to the bugtracker if you initiate it with a post in Feature Requests.


For my application I’d be looking for a big flashing light (or player!) indicating the end of sequence. For us, an indication of number of remaining tracks would not really help. We’ve got fairly inexperienced presenters sat in a studio with all manner of unfamiliar equipment and indicators around them. Thus we need a big obvious indicator whch does not require any interpretation when the end of sequence is coming up. A counter is all well and good, but really it does not grab the attention and demand action as much as a bright red flashing player, and virtually duplicates the indication already there (ie: visually an empty playlist and a countdown timer expiring).

That’s not to detract from your requirements though. It’s just I think we are using the same app for very different situations!

Maybe I need to put a feature request for End of sequence flash on player (or playlist)…

Cheers, Glyn

Hi Glynn, same at any radio station (irrespective of its type, I have or do work in most of the formats and levels) with inexperienced and even experienced presenters its a matter of training, discipline and logic.

To help though, there are other visual indicators that can be used in a playlist.

Insert a dummy command at the end of a playlist, open this with a right click and type a statement/instruction. Simply type

END OF PLAYLIST - do so and so

Save the playlist

We also need to consider when the audio playing is actually part of a sequence (linked items in the playlist or a container).

Here we need a item counter in a player (or its own window) with also a timer both reading and counting the sequence to zero.

End Edit

Having said that, the option to flash the playlist would certainly be eye catching - provided as with any feature everyone knew what it meant, which brings us back to training…

Kind Regards Tony

Could other screen objects help.

Cad/Torben, if we specified a screen object as END OF SEQUENCE which would in use remain blank until such a time that the playlist or a container/sequence was playing the last item.

At such an occurence we ask a script or internal function to cause this screen object to flash with a user defined message.

Kind regards Tony

Cad, there is an option in skin.ini to cause the player background to flash. We use this by changing from one color to another. Its in some of the ini files posted here by both Charlie and myself.

From mAirList 3.0, the text of any screen object can be modified during runtime by a remote command. So you’d just create a new “static text” object, set up its remote functionality, and set the text from a script as required.

Hmm … interesting …

I presume that if text etc. can be dynamically changed by a running script, one likely use would be to display some kind of countdown.

Therefore, will there be any equivalent to a VB OnTimer event handler, so that a script could update something (for example) once every second, rather than running in a tight processor-hungry loop to do the same updating?


Notification scripts have an OnTimer procedure already, just in case you didn’t notice :wink: You can even adjust the interval.

For changing the text, you have to assign a name to the screen object, e.g. “COUNTDOWN”. You can then send fader start commands like “COUNTDOWN TEXT blablah” in order to change the text.

I will also introduce the ability to adjust the appearance (color etc.) of the screen object in the same way.

[FX: Bangs head on desk. Repeatedly.]

D’OH! :-[

Sorry chaps: it’s been a VERY busy week (that’s my excuse, and I’m sticking to it. Er … anyone got any super glue remover? ;D)


OK, so that in theory makes it scriptable, unless you’re referring to EOFColor? AFAICS, that would mean changing the EOF ‘warning time,’ wouldn’t it, Torben? Or what other technique do you reckon?

The next questions to Glyn are:

  1. Which colour(s) do you want for the ‘flash?’ (best to state ‘flash’ colour AND ‘other’ colour, please)
  2. When do you STOP ‘flashing’ the Player? At EOF? Unload? When another Player starts? (suggestions welcome!) When the Playlist contains at least one Item again?


Ah! I just re-read this thread and I think I have a (fairly) simple answer.

Let’s consider these facts (“just the facts, ma’am …” ;)):

[ul][li]Glyn does not want a flashing EOF warning in ‘normal’ use.[/li]
[li]Glyn does want a flashing warning near the end of the final playing Item in the Playlist, if it’s in AUTO mode.[/li][/ul]

So, the first thing Glyn needs to decide is the duration of the ‘Player flash’ to indicate what we’ll call the ‘end of Playlist’ warning; and in Config, Playlist n, Player n, General tab, change the EOF warning time to that number of seconds. This needs to be done for EVERY Player attached to his Playlist.

I will write a script shortly which will be a little OnPlayerStart number to ‘toggle’ the ‘Flash during EOF warning’ GUI Option for ALL Players (on = 1 Item in Playlist [the one that’s playing!] AND in AUTO mode; off = > 1 Item in Playlist OR in ASSIST mode).

I think that should satisfy all Glyn’s criteria? I’ll put the Notification Script into this post once I’ve written and tested it.


Plan B! Glyn: make the script below a Notification Script and set all Players to Flash at EOF (time irrelevant).

The script below will toggle the EOF warning time (changing the flash/don’t flash didn’t seem possible), so you need the ‘flash at EOF’ set on permanently.

// AutoLastItemFlash - a custom mAirList Notification Script for Thornbury FM

// written by Cad Delworth CEng MBCS CITP,
// Clearances Manager, Leith FM, Edinburgh, Scotland
// http://www.leithfm.co.uk

// Each time a Player starts, this script changes the 'flash on EOF warning' time
// of all Players in the current Playlist.
// The time is changed to 60 seconds if one Item or fewer* remains in the Playlist;
// otherwise the time is set to zero.

// *NOTE that this script will OCCASIONALLY 'flash' the Players when it should not.
// This is because the Playlist count at Player Start includes the PREVIOUS Item.

procedure OnPlayerStart(PlayerControl: IPlayerControl; Item: IPlaylistItem);
  bSetEofWarning: boolean;
  i, iMax: integer;
  i64FlashTime: int64;
  pbc: IPlaybackControl;
  plc: IPlayerControl;
// Change the default (60) in the line below to change the flash time
  i64FlashTime := 60 * 10000000;
  pbc := CurrentPlaybackControl;
  bSetEofWarning := pbc.GetAutomation;
  if CurrentPlaylist.GetCount > 2 then
    bSetEofWarning := false;
    iMax := pbc.GetPlayerCount - 1;
    for i := 0 to iMax do
      plc := pbc.GetPlayer(i);
      if bSetEofWarning = true then



Hi Cad, I think Glyn is refering to auto mode only.

If we agree using the script is ideal for running a stack/sequence/playlist in auto mode but once back in manual mode, what would now signal EOF to presenters?

Kind regards tony


btw:Looking at the example layout posted by Glyn, the Event windows are visible.


These do count down the number of items in a playlist and the total running time.

Perhaps Torben these windows can be extended to also count down items linked together or in a container.

Rather than add another edit, posting a new reply.

Looking again at the original post, I (edit not - we have) have mis-read Glyns needs.

Understanding his station is only using a single player, I now assume this situation.

As Glyn states the end of a playlist is easily visual, presenters are likely to be linking audio in a playlist. Either with the link option or as a container to build a sequence of audio from those that are present in a playlist, as we also do.

So we now need a warning about the end of this sequence?

If this is correct we need a script to count the number of items linked or in a container and then give a flashing alarm as a reminder to do something before playout stops.

Yes, it would be very welcome rather than just be warned that something is changing but don’t panic :o because I have another piece of audio to play.

Kind regards Tony


Sorry, but your last two postings in this thread have left me baffled!

I reckon the Notification Script I posted does what Glyn asked for (no doubt he can let me know for sure); or did you not catch that posting (back on page 1!)?


Hi Cad, in the first of the 2 postings I was asking what happens when we drop back into manual mode,as in the example posted by Glyn, is he asking for a warning that auto mode is due to end?

edit: If not then a script should load the next playlist and playout will continue.
end edit

If so, presenters may now be in manual mode and need to know/ be warned EOF on each item is coming.

My second post:

Consider we are playing a sequence of linked items (or container) from a playlist (but not necessary in the playlist order). i.e. we play items 2,3,7 of 15 items in the playlist and not the last item as you have written the script for.

How can we now alert presenters when a sequence is ending?

Hope this is clearer.

Kind regards Tony

My understanding is that Glyn wants his (single) Player to flash in an ‘EOF’-style warning way, but only when a) the Playlist is in AUTO, and b) the Playlist has no more items left. That’s what my Notification Script does.

[quote=“tony wilding”]edit: If not then a script should load the next playlist and playout will continue.
end edit[/quote]
I would say that that depends entirely on how the station operates. There may not be a ‘next Playlist.’ For example, at Leith FM, there’s only one Big Playlist which plays overnight; during daytime (ASSIST) hours, music is played ‘on the hoof,’ and often direct from CDs as well as from the computer. We just don’t use Playlists in daytime. So with respect, it’s not our call to make. My view is that if Glyn had wanted a Playlist to auto-load in the ‘last item’ situation, he would have asked for that: no?

Glyn specifically said that he does NOT want any ‘flashing’ in ASSIST mode. Incidentally, you mentioned that a Playlist does not have a ‘remaining item counter;’ that’s not true, it’s the box between the Next Event Time box and the Remaining Playlist Duration box, on the Playlist control bar. :wink:

[quote=“tony wilding”]Consider we are playing a sequence of linked items (or container) from a playlist (but not necessary in the playlist order). i.e. we play items 2,3,7 of 15 items in the playlist and not the last item as you have written the script for.
How can we now alert presenters when a sequence is ending?[/quote]

  1. My script checks the NUMBER (count) of remaining Items. If there are none left, it switches on the EOF warning by changing the EOF warning time from zero to 60 seconds.
  2. The scenario you’re describing sounds like ASSIST mode; therefore Glyn does not want a warning in any circumstances.

Always remember that one of the joys of mAirList is that it can be used in literally dozens of different ways, so not everyone will be using it in a way you might expect, or the way you use mAirList yourself. I think I’ve correctly assessed what Glyn actually asked for, so hopefully he’ll be here soon to tell us which of us has the correct end of his stick, as it were. :slight_smile:

[‘Assume nothing; check everything.’ System Programmer’s Maxim ;D]