Playlists - what can you do with them ?

Hi

Can anyone point me to a definitive list of commands that can be included in or actioned from a mAirList playlist?

I currently have the following entries …

#mAirList DUMMY 0 START OF HOUR 00:00:00 #mAirList COMMAND RUNSCRIPT Unmute.mls D:\News Silence.mp3 #mAirList COMMAND RUNSCRIPT Mute.mls D:\newaudio\Links\Friday Promo.mp3 D:\newaudio\Now\Shania Twain - Man I Feel Like A Woman.mp3 D:\newaudio\Now\Phil Collins – You’ll Be In My Heart.mp3 etc…
Specific questions at the moment are:

  1. Is there a better way of pausing for the news other than playing a 3 minute audio file containing silence?

  2. Currently an audio track is only referenced by its filename so the whole track is played (between the appropriate tags). Is it possible to cut the audio short i.e. if the normal play time is 300 seconds can anything be added to the playlog file to get mAirList to move on to the next event after 280 seconds? Alternatively, if the hour timing is calculated by the scheduling program so that the playlist includes the time when the event/audio should happen can mAirList work with this? e.g.

xx:00:00 #mAirList DUMMY 0 START OF HOUR 00:00:00 xx:00:00 #mAirList COMMAND RUNSCRIPT Unmute.mls xx:00:00 D:\News Silence.mp3 xx:03:00 #mAirList COMMAND RUNSCRIPT Mute.mls xx:03:00 D:\newaudio\Links\Friday Promo.mp3 xx:03:50 D:\newaudio\Now\Shania Twain - Man I Feel Like A Woman.mp3 xx:07:24 D:\newaudio\Now\Phil Collins – You’ll Be In My Heart.mp3 etc…
and finally (slightly off playlists but in the same area)

  1. Can you autoload .mle event files (which I use at xx:59:50 to play the news intro and load the next hour)

Thanks in advance

Ron.

definitive list of commands that can be included in or actioned from a mAirList playlist?
To see 99% of the valid Commands/Actions, start Configuration, then expand Remote Control, click Hotkeys, and drop down the Action list. There are one or two others like [b]CARTWALL LOAD SET [i]filename[/i][/b] which for obvious (?) reasons are not in the Actions list.
pausing for the news other than playing a 3 minute audio file containing silence?
Yes, [b]if[/b] you know precisely [i]when[/i] you come back from the news or other break. Use the method in my message here: [url]http://forum.mairlist.de/viewtopic.php?t=659&highlight=timed+break[/url]. In your case, amend your UnMute Script to [i]add[/i] the 'start automation' command. :)
can anything be added to the playlog file to get mAirList to move on to the next event after 280 seconds
Yes. 1. Open the Playlist file in mAirList. 2. PFL the item in question. 3. Set a FADE OUT point at (e.g.) 280 seconds = 0:04:40.000. 4. Save to Local (which saves the cue point in the Playlist). 5. RE-SAVE the Playlist as a Playlist file. Hopefully though, the previous answer means you won't need to use this technique?
Can you autoload .mle event files (which I use at xx:59:50 to play the news intro and load the next hour)
First, I would do your auto-load no later than xx:59:00 to be on the safe side. Though it sounds like what you need is not MLE loading [i]per se[/i], but something like the Script in the Wiki (Things You Can Do with Scripts page) which loads the 'next hour' file, suitably amended, then scheduled in your MLE to run at every xx:59:00.

If any of that was confusing, please ask again!

BFN
CAD

CAD

Thanks for the reply. I will look at the config app tonight (it is knowing where to look for all these things! - Wiki is becoming very useful BTW)

Just to expand on question 2 which I did not explain very well… I was looking for a way to do this automatically and the 280 was a variable time (might be longer or shorter)

To add some background to this … my fear with just using playlists as sequential events is that if you are adding the news event at the top of the hour then there is a chance that it will happen just after a song has started which does not sound great.

One way around that is to fade some tracks (with a fading ending) early by an appropriate amount so that the hour is exactly that – an hour. i.e. if the hour is 60s too long and 10 tracks have a fading ending then fade them all 6s early.
For this to happen the automatically generated playlist needs to ether know how long to play a track for or know what time to start the next event.

This also feeds into my third question as auto-loading the next hour seems to dump the remaining current hour so if this is done at 59:00 and the current track is just ending then is it not possible to have dead air? How does everyone else handle the news/hour transition?

Ron.

A possible solution would be:

  • At :59:00, append the next playlist.
  • At :59:50, run a script which identifies the news jingle (by comparing the title) and uses AutomationJump to skip the remainder of the old playlist.

I think Charlie has done something like this, he might assist you.

Torben

Torben - That would cure the sequence problem but would not solve the issue that a track may start playing at 59:30 only to be faded out 10 seconds later for the news!

Charlie - code to do this would be useful if you have it (and another example for the Wiki?)

Ron.

Torben - That would cure the sequence problem but would not solve the issue that a track may start playing at 59:30 only to be faded out 10 seconds later for the news!

That’s a general problem, but I could think of a (scripting) solution. Actually, two possible solutions come into mind.

  1. Use of special, instrumental backtiming songs. Say, your news opener starts at 59:50, and you don’t want any song to be played shorter than one minute. Create an event, running at 58:50, that clears the remaining playlist (except for the currently running item, of course) and inserts such an instrumental track, and also appends the playlist for the next hour. If the current song is finished before :59:50, the instrumental track will be played and fill the remaining seconds before the news opener. Otherwise, the AutomationJump command will skip the instrumental track.

  2. More sophisticated: Write a script that, at the start of each hour, examines the playlist, calculates the duration the final song will be played before the news jingle, and - if it’s less than one minute - adjusts the fade-out markers of the preceeding songs such that they will be played a little shorter, allowing the final song to be played longer. As an enhancement, you could add even more time to the other songs, such that the last one will end exactly at :59:50. I always love it when presenters manage to backtime the final song this way :wink:

Torben

Ron - Here’s my old script, but it’s not exactly what you’re after - and I have a feeling a couple of the parameters may have changed as I do not use this script at present:

[code]var i: integer;

begin
for i := CurrentPlaylist.GetHistoryCount to CurrentPlaylist.GetCount - 1 do
if copy(CurrentPlaylist.GetItem(i).GetTitle, 1, 13) = ‘START OF HOUR’ then begin
CurrentPlaylist.AutomationJump(CurrentPlaylist.GetItem(i));
break;
end;
end.[/code]
This was used with a 24hr playlist, to jump down to the next START OF HOUR xx:xx:xx marker at :58 mins past. The number 13 is relevant as it’s the number characters/spaces enclosed within the inverted commas. You can still use this on an hourly playlist - Just change amend the character number and text titles to match your playlists.

Torben/Ron - As far as fading songs “to hour” goes, the usual way it’s done is that the automation system will shave off bits of songs here and there - Providing the songs end with a fade. Songs can also be dropped providing they do not have a voicetrack either before or after. Using that principle, mAirList could then ensure that the News Intro (for example) always had a scheduled start time of xx:59:45 or whatever it would need to be.

Here’s Charlie’s script, using the new CurrentPlaybackControl syntax (untested):

[code]var i: integer;

begin
for i := 0 to CurrentPlaylist.GetCount - 1 do
if copy(CurrentPlaylist.GetItem(i).GetTitle, 1, 13) = ‘START OF HOUR’ then begin
CurrentPlaybackControl.AutomationJump(CurrentPlaylist.GetItem(i));
break;
end;
end.[/code]

By the way,

3) Can you autoload .mle event files (which I use at xx:59:50 to play the news intro and load the next hour)

Yes. Just save it as standard0.mle (for the first playlist) inside your mAirList program folder.

Torben

Torben - Thanks, I guessed that some of it had changed…

Ron,
If you change

13) = 'START OF HOUR'

to…

10) = 'NEWS INTRO'

That will allow to you use the following before your News In Jingle:

#mAirList DUMMY 0 NEWS INTRO

Cheers guys - lots of good stuff in there which will probably keep me busy most of this evening - my wife thanks you in advance :slight_smile:

Torben - thanks for the standard0.mle tip! Another one for the Wiki (assuming that it is not documented somewhere and I have missed it which more likely!)

Forgot to mention - another benefit of having timing marks was to cover the case where the playlist is started part way through the hour (after say a power failure) when you would want it to start at the approriate point and not at the start (especially if there is a 3 min news event).

Enough ramblings - will digest the points raised this evening - thanks again.

You can resume a playlist using a Notification Script - At a very basic level, you can have it jump to a “quarter hour segment” via Dummy/Notes in your playlist…

Or even, and this’ll require Torben’s scripting expertise - Once a playlist is loaded - the Scheduled Times can be calculated, therefore - You should be able to write a script that jumps to the nearest minute ?!

Hi, I am trying the scripts explained in the wiki to load either the current or next hour.

My playlists are dated as 2007-01-02-18 etc but refuse to load when using the scripts described at the wiki and adapted so:

CurrentPlaylist.LoadFromFile(‘C:\mAirList\playlists’ + FormatDateTime(‘yyyy-mm-dd-hh’, now) + ‘.mlp’);


CurrentPlaylist.LoadFromFile(‘C:\mAirList-2.02\playlists’ + FormatDateTime(‘yyyy-mm-dd-hh’, now + 0.04166) + ‘.mlp’);

The scripts are saved as current_hour.mls/next_hour.mls and fired from the event scheduler.

The error message generated is

[Error] (1:1):‘Begin’ expected

This also occurs when using one of the provided scripts (PlaylistEmpty)

The errors are:

[Error] (12:8): Unknown type ‘INotification’
Any pointers into my errors would be appreciated.

Kind regards Tony

btw;using version 2.02

Wrap your code into “begin” and “end.”:

begin (the above quoted line of code) end.

Every proper Pascal program needs to start with “begin” and end with “end.”, plus optional declarations before the “begin”.

In the Wiki, when a single line of code is quoted, it’s just meant to be a line of code, not a self-contained script :wink:

Torben

Thanks Torben, told you I was not a programmer;

Here is the modified code:

begin
CurrentPlaylist.LoadFromFile(‘C:\mAirList-2.02\playlists’ +
FormatDateTime(‘ddd-hh-dd-mm’, now) + ‘.mlp’);
end.

This time the errors are:

[Error] (1.114): Invalid number of parameters

For non-programmers like myself perhaps working scripts could be included with the download zip.

Kind Regards tony

  CurrentPlaylist.LoadFromFile('C:\mAirList-2.02\playlists\' + FormatDateTime('ddd-hh-dd-mm', now) + '.mlp', false); 

You have forget the parameter false :slight_smile:

LoadFromFile needs a second parameter, “iAppend”. Try it this way:

begin CurrentPlaylist.LoadFromFile('C:\mAirList-2.02\playlists\' + FormatDateTime('ddd-hh-dd-mm', now) + '.mlp', false); end.

iAppend=false means that the current playlist should be replaced rather than appending the file to the current playlist.

I would propose to establish a script collection in the Wiki.

Torben

Many thanks, here is the final working script:

begin
CurrentPlaylist.LoadFromFile(‘C:\mAirList-2.0.2\playlists’ + FormatDateTime(‘yyyy-mm-dd-hh’, now) + ‘.mlp’, false);
end.

Opting to use the above rather than:

begin
CurrentPlaylist.LoadFromFile(‘C:\mAirList-2.0.2\playlists’ + FormatDateTime(‘ddd-hh-dd-mm’, now) + ‘.mlp’, false);
end.

Which also works.

Many thanks again

Kind regards Tony

One way around that is to fade some tracks (with a fading ending) early by an appropriate amount so that the hour is exactly that – an hour. i.e. if the hour is 60s too long and 10 tracks have a fading ending then fade them all 6s early. For this to happen the automatically generated playlist needs to ether know how long to play a track for or know what time to start the next event.
To answer my own question ... If the playlist is saved as a .mlp file (instead of a .m3u) then the actual duration of the audio can be determined in advance by the scheduler by modifying a few parameters as shown in the extract below where the first version of the track is only 38s long [code] Dan Hill Sometimes When We Touch Comment here 2000000000 <<<< MODIFIED 2690476 125515646 380000000 <<<< MODIFIED 390000000 <<<< MODIFIED 400000000 <<<< MODIFIED Ending details #80FFFF User name User value D:\Dan Hill - Sometimes When We Touch.mp3 Dan Hill Sometimes When We Touch Comment here 2453942857 2690476 125515646 2311779138 2390940589 2423936734 Ending details #80FFFF User name User value D:\Dan Hill - Sometimes When We Touch.mp3 [/code]

The down side of course is that the scheduler needs to be more advanced but at least it is another way to achieve the same end result.

Thanks for all the suggestions - hopefully it will help someone else in the future.

p.s. I have added the ‘autoload of .mle files’ info to the Wiki in the file types section. Please feel free to move it if somewhere else is more appropriate.