Toolbar and Clocks

Hi Torben, just something to consider for the future.

I’m running 2 seperate layouts, 1 for admin/production the second for “On Air”.

At the moment alongside the toolbar I have positioned an analog clock and the date in the “On Air” layout but removed the toolbar and config utility. Just wondered if an alternate toolbar could be created (from within the config utilty).

This alternate toolbar, for me only used “On Air”, would actually be an area for a series of clocks:

  1. Analog clock showing current time
  2. Current time in words
  3. Date
  4. Total Time of audio stacked in Players
  5. Time remaining in this hour i.e 2:46:00 would read as 00:14:00
  6. Total Time of items in Playlist

I’ve seen something similar in another piece of software (apart from the date) and thought how it useful it was.

It could even be included just under the existing toolbar before the players etc.

Kind regards Tony

Merry Christmas and a Happy New Year to all.

Interesting ideas, Tony.

By ‘current time in words,’ do you mean:

  • Twelve minutes past two/Fourteen minutes to three, or
  • Two twelve/Two forty-six, or
  • Two twelve PM/Fourteen minutes to three PM, or
  • something else?

I think that if a [VerbalClock] were to be implemented, a good way to do it would be to have a Configuration page with four format strings (stay with me on this!) similar to the log format strings. The four strings would be for use when the ‘current’ time is :00, :01–:29, :30, and :31–:59. The ‘current’ time would be the next minute if it is after hh:mm:30, if you see what I mean? Effectively, the clock would ‘tick’ at hh:mm:30 and not at hh:mm:00.

The strings would use the following suggested formatting variables:

%h for current hour in words (one through eleven, noon, or midnight)
%i for next hour in words (as for %h)
%a for AM/PM (NOTE: blank for noon or midnight)
%m for minutes after the current hour (one through fifty-nine)
%n for minutes before next hour (as for %m)

Hence you could construct quite subtle formats. :slight_smile: Using the above variables, the default values for the four strings might be:

%h o’clock for :00
%m past %h for :01–:29
Half-past %h for :30
%n to %i for :31–:59

But you could easily change these to (for example):

%h %a exactly for :00
%m minutes after %h for :01–:29
Thirty minutes after %h for :30
%n minutes before %i for :31–:59

Using these strings would simplify Torben’s job to writing a four-way CASE statement based on current time plus 00:00:30 (see above), then formatting now according to the selected string and writing the resulting string to the screen [VerbalClock] control. The control would need a section in position.ini and a checkbox (similar to [LEDClock]), unless it were a Custom Toolbar item as Tony suggested.

Does all that make sense? And what do you think, Tony and Torben?

BFN
CAD

Hi Cad, as soon as you mentioned strings I was lost (programming is not my thing).

By time in words your first example would be right, To read as we would say it in normal conversation.

  • Twelve minutes past two/Fourteen minutes to three

Kind Regards Tony

Tony, sorry if I confused you. I was trying to think everything through properly, partly for Torben’s benefit.

The ‘string’ thing is no more complicated than setting up log entries: in fact, it’s an almost identical process. The point is that I was trying to work out a way for everyone to have exactly the format they want, in keeping with the mAirList philosophy of flexibility and easy ways to set things up.

BFN
CAD

Cad no apologies needed, please continue to highlight from a programmers view how any of my suggestions could be made to work.

I’m back again to ask something else.

Kind regards tony