|
Introduction and Background
Designed to show current time and status information from your playout
software - works directly with mAirList. Shows "now playing" from a
text file created by your playout software - OnAir/OffAir, Traffic Flag
and End of Song alerts controlled via mAirList scripts.
27th November Update, v1.3
Added RS232 support to control the indicators - When the CT, CTS and
DSR pins are high (+5v) they will illuminate the OnAir, Traffic, and EOM
LEDs respectively.
For more functionality, please see
StudioScreen.
MiniClock In Use -
click here to see a larger version

MiniClock - Main Screen showing
mAirList status, current song and analogue clock

Limitations
My studio (and test machine) uses 1280x1024 resolution and I have not
yet coded in any object re-sizing - so you MUST run your monitor at that
resolution otherwise it'll look quite messy!
Using MiniClock
MiniClock supports multiple montors, allowing you to show it on a
2nd screen. At present, MiniClock reacts to TXT files that
mAirList creates via a script - a future version will incorporate "Window
Messages". You will need to tell MiniClock where the STATUS files are located
- I have defaulted them to C:\mAirList as this seems a likely
location! There are (at present) 4 files to create/manipulate: currentsong.txt , EOMSTATUS.TXT
, ONAIRSTATUS.txt and TRAFFICFLAG.txt You can
change the locations of these files by editing the MiniClock.ini file
via any text editor...
These files are written to by
mAirList when using the MLS scripts show below...
Scripts
You will need to add the following to a Notification script:
var sl: TStringList;
procedure OnOnAir;
begin
sl := TStringList.Create;
sl.Add('[OnAir]');
sl.Add('Status=1');
sl.SaveToFile('S:\ONAIRSTATUS.txt');
sl.Free;
end;
procedure OnOffAir;
begin
sl := TStringList.Create;
sl.Add('[OnAir]');
sl.Add('Status=0');
sl.SaveToFile('S:\ONAIRSTATUS.txt');
sl.Free;
end;
procedure OnCartPlayerStop(PlayerControl: IPlayerControl; Item:
IPlaylistItem; Duration: int64);
begin
sl := TStringList.Create;
sl.Add('[EOM]');
sl.Add('Status=0');
sl.SaveToFile('C:\mAirList\EOMSTATUS.txt');
sl.Free;
end;
procedure OnCartPlayerEOFWarning(PlayerControl: IPlayerControl; Item:
IPlaylistItem);
begin
sl := TStringList.Create;
sl.Add('[EOM]');
sl.Add('Status=1');
sl.SaveToFile('C:\mAirList\EOMSTATUS.txt');
sl.Free;
end;
procedure OnPlayerStop(PlayerControl: IPlayerControl; Item: IPlaylistItem;
Duration: int64);
begin
sl := TStringList.Create;
sl.Add('[EOM]');
sl.Add('Status=0');
sl.SaveToFile('C:\mAirList\EOMSTATUS.txt');
sl.Free;
end;
procedure OnPlayerEOFWarning(PlayerControl: IPlayerControl; Item:
IPlaylistItem);
begin
sl := TStringList.Create;
sl.Add('[EOM]');
sl.Add('Status=1');
sl.SaveToFile('C:\mAirList\EOMSTATUS.txt');
sl.Free;
end;
sl := TStringList.Create;
sl.Add(Item.GetArtist + ' - ' + Item.GetTitle);
sl.SaveToFile('C:\mAirList\currentsong.txt');
sl.Free;
For the Traffic Flag, I use the serial port's
DTR pin and this in turn drives an opto-coupler which switches the TA
switch on an RDS unit. The Travel In jingle will need this script
under "Action on Start" in it's file properties:
// Set DTR pin on Serial Port HIGH
// used to signal external RDS unit to enable TRAFFIC FLAG
var sl: TStringList;
begin
if Engine.GetOnAir = False then begin
SystemLog('mAirList is in production mode, so no action taken...');
end
else
if Engine.GetOnAir = True then begin
ComPort(1).SetParameters(9600, 8, 'N', 1);
ComPort(1).Open;
IOPort($3FC).WriteOR(1);
sl := TStringList.Create;
sl.Add('[TRAFFIC]');
sl.Add('Status=1');
sl.SaveToFile('C:\mAirList\TRAFFICFLAG.txt');
sl.Free;
SystemLog('Traffic Flag ACTIVE ...');
end;
end.
So, when the Travel Intro is played (either in a
Player or via the Cartwall) - the script is also run and creates the
TRAFFICFLAG.txt file with a [TRAFFIC] INI key of Status=1 ...
MiniClock looks for the number 1 and changes the indicator colour to
"on". The Travel Outro will need this script as an "Action on Stop"
in it's file properties:
// Set DTR pin on Serial Port LOW
// used to signal external RDS unit to disable TRAFFIC FLAG
var sl: TStringList;
begin
if Engine.GetOnAir = False then begin
SystemLog('mAirList is in production mode, so no action taken...');
end
else
begin
IOPort($3FC).WriteAnd(254);
sl := TStringList.Create;
sl.Add('[TRAFFIC]');
sl.Add('Status=0');
sl.SaveToFile('C:\mAirList\TRAFFICFLAG.txt');
sl.Free;
SystemLog('Traffic Flag DISABLED ...');
end;
end.
Hopefully this is self-explanatory - the value
now reverts to 0 which MiniClock reads and reverts the indicator
status back to the "off" colour.
These are the parts that create the files needed
for MiniClock to display the information - if you do not know how to
use scripts within mAirList, I suggest you
visit the support forum!
|