GUI/Layout Options

Hello again!

I’m pulling together a design for mAirList and have come across the following thoughts/stumbling blocks - things I think may be possible but I can’t find them!

1 - Can the Cartwall, playlist etc be loaded only from the database window of the browser? We don’t want presenters playing audio straight from harddrive as this is unapproved audio and the idea is they won’t know how to add to database!

2 - What does ‘LIVE’ do on the streaming encoder? I can see that audio stops when it is unclicked - does it just control whether or not audio is sent to the encoder? If so, can it be set up to automatically come on from launch?

3 - Can the automation status of a playlist be indicated elsewhere apart from at the bottom of the playlist? I have two separate buttons for ‘automation enable’ and ‘automation disable’ and it would be nice, for instance, for ‘automation enable’ to be bold or highlighted if this is the case?

4 - Similarly, is it possible for a button to change some sort of GUI object somewhere to indicate it’s been pressed? Automation break for instance. I want ‘something’ to happen when that is pressed (my own button for it) that will indicate the song will stop after it is played. Thinking aloud if you will, can a button be told to ‘insert automation break point in the playlist after the currently playing item’

5 - Can a button be configured to launch the ‘edit’ (properties) window of the currently selected item in the playlist?

6 - Can a button be configured to launch the ‘events’ window?

I appreciate there are a few questions here but any help would be gratefully received! I am setting up mAirList for the easiest possible use and these things will help me achieve this and get mAirList controlling yet another FM radio station…!

Many thanks

A

  1. There’s now way to technically prevent non-database files to be played or inserted into the playlist. I don’t think it’s a good idea anyway - just think of an emergency situation where the database is unavailable. If I was to enforce that kind of policy, I would just let mAirList write a log file with all file names and database IDs, and check that file regularly for any violations of the policy. If a presenter keeps playing unapproved files, just kick him out.

  2. The LIVE button toggles the recording from Line In (or whatever you set up as the recording soundcard in the encoder configuration). If you want the button to be pressed when mAirList is launched, go to the Actions configuration page, select “Actions after startup”, and add an “Encode -> Enabled live feed” action.

3 and 4: It’s possible to use the Static Text screen objects as some kind of button in conjunction with a notification script. Basically, you assign the screen object a command that is passed to the script (which in turn performs any action). Additionally, you specify a “remote ID” that can be used to modify the text and appearance (including font and colors) of the screen object. This method isn’t documented well. I can give you details later if you like.

5 and 6.: This isn’t possible at the moment, but I can add commands for that.

Hi Torben
Sorry for the late reply! Thanks for your responses.

3 & 4 - if you could provide details on how to do this, that would be great? And also 5 and 6 as well if you have time to implement those - we are getting very close to a system we can quite easily deploy with minimum staff training!

Ant

Ok, one thing at a time… I’m in a hurry, so here’s the solution for #3 first:

Essentially, what you need to do is:

  • Replace the two “Button” screen objects by two “Static Text” objects, one labeled “Automation Enable” and one “Automation Disable”.

  • On the Advanced tab, enter a Remote ID for either object, all caps and no spaces, e.g. AUTOMATIONENABLE for the first and AUTOMATIONDISABLE for the second object. These IDs will be used to send commands to the object for changing their appearance (see below).

  • Next, turn these static text objects into “buttons”, so the automation can be toggled when you click them. This is a hidden feature that involves editing the screenobjects.ini file (remember to close mAirListConfig before you do so). In that file, locate the ScreenObject_x sections of the static texts, and add a line saying “ClickCommand=AUTOMATION 1 ON” and “ClickCommand=AUTOMATION 1 OFF”, respectively. Here’s what the sections should look like in the end:

[ScreenObject3]
Type=StaticText
Align=Top
BorderWidth=0
BorderColor=#000000
RemoteID=AUTOMATIONENABLE
FontName=Arial
FontSize=16
FontStyle=0
FontColor=#000000
BackgroundColor=#F0F0F0
Alignment=Center
Text=Automation Enable
ClickCommand=AUTOMATION 1 ON

[ScreenObject4]
Type=StaticText
Align=Top
BorderWidth=0
BorderColor=#000000
RemoteID=AUTOMATIONDISABLE
FontName=Arial
FontSize=16
FontStyle=0
FontColor=#000000
BackgroundColor=#F0F0F0
Alignment=Center
Text=Automation Disable
ClickCommand=AUTOMATION 1 OFF

At this point, you can run mAirList and check if it’s possible to enable or disable the automation by clicking the text objects.

If everything works fine, the final piece of the puzzle is a notification scripts that hooks into the automation toggle event and sends commands to the objects in order to change their appearance. For example, you can send “FONTSTYLE 1” to set the font to bold, and “FONTSTYLE 0” to set it back to normal. Or use “FONTCOLOR #ff0000” to make the text red, or “BACKGROUNDCOLOR #FF0000” to make the background red, etc. The commands must be prepended by the Remote ID of the object, e.g. “AUTOMATIONENABLE FONTSTYLE 1”.

Here’s a script that uses the FONTSTYLE commands to make the text of enable/disable “buttons” bold face:

procedure UpdateAutomationButtons;
begin
  if Playlist(0).GetAutomation then begin
    ExecuteCommand('AUTOMATIONENABLE FONTSTYLE 1');
    ExecuteCommand('AUTOMATIONDISABLE FONTSTYLE 0');
  end
  else begin
    ExecuteCommand('AUTOMATIONENABLE FONTSTYLE 0');
    ExecuteCommand('AUTOMATIONDISABLE FONTSTYLE 1');
  end;
end;

procedure OnLoad;
begin
  UpdateAutomationButtons;
end;

procedure OnAutomationOn(PlaylistIndex: integer);
begin
  UpdateAutomationButtons;
end;

procedure OnAutomationOff(PlaylistIndex: integer);
begin
  UpdateAutomationButtons;
end;

begin
end.

Save this script as AutomationButtons.mls, register it as a Notification Script, and you’re done.

I have just uploaded a new snapshot, Build 875, which should be helpful to you.

First of all, what I wrote above about sending remote commands to screen objects does now also work for the Button object. That means that you do not have to turn your buttons into Static Text objects anymore to make the above solution work. Just keep the button objects, and assign the Remote IDs (AUTOMATIONENABLE and AUTOMATIONDISABLE) to them, and use the notification script I posted.

Second, this builds adds two new commands:

PLAYLIST 1 EDIT - edits the item currently selected in the (first) playlist
PLAYLIST 1 EVENTS - brings up the Event Scheduler for the (first) playlist (there is a separate set of events for each playlist, in case you didn’t know)

To assign these commands to button screen objects, just add a “Execute command” action to the button, and select the command from the list.

Finally, here’s one of the famous one-liner scripts that inserts a BREAK item after the currently playing one:

begin
  CurrentPlaylist.Insert(CurrentPlaylist.GetNextIndex, Factory.CreateBreakPlaylistItem);
end

Save the code as InsertBreak.mls or similar, and assign it to a button using the Run Script action.

[quote=“Torben, post:5, topic:7110”]Second, this builds adds two new commands:
PLAYLIST 1 EDIT - edits the item currently selected in the (first) playlist
PLAYLIST 1 EVENTS - brings up the Event Scheduler for the (first) playlist (there is a separate set of events for each playlist, in case you didn’t know)[/quote]
New commands … oh good. :’(

OK, I’ll add those to the manual right now.

I assume that ‘edit’ means that the command opens the Properties dialog for the item: correct?

BFN
CAD

Exactly.

Hmm … those two new commands (EDIT and EVENTS) don’t appear in the command lists in the Remote Control, Configure dialog in Config in b875.

Is that intentional?

Also, I assume that the PLAYLIST n JUMP command replaces the PLAYLIST n SKIPTOHERE command: is that correct?

[EDIT: Actually it looks like the latest snapshot is still b874!]

BFN
CAD

Perhaps something went wrong with the upload. I will check tomorrow, and also answer your question.

I have re-uploaded the snapshot and confirmed that the commands do appear in the list. Everything looks fine now.

Regarding SKIPTOHERE vs. JUMP, I wasn’t aware of the JUMP command, and actually I cannot find it in the code anymore, although I do recall that there was a command with that name at some point. I don’t know when or why it was lost. I propose we keep SKIPTOHERE, because it’s the same text as in the context menu.