Hi, one for the programmers and not those like me that pinch parts of others scripts.
Imagine we are using 2 schedulers one for music and 1 for ads (actually tooo hard, as someone is - hence the need). The software used is Natural Music and Natural Log. the playlists generated get merged as a single playlist in BCX.
They would like to switch to mAirList but how would we merge the 2 playlists. Its important scheduling is maintained through their software as
A:It offers very advanced functions
B:It was expensive!
So the challenge/request is for a script to merge the logs together inserting the ads at the relevant junctions.
I have no precise idea of what you’re looking for here, but I’m prepared to at least take a look at the requirement if I can.
Answering the following would be a good start!
Are these ‘logs’ some kind of text file, or if not, do you know the internal format of them?
Can you describe EXACTLY what you mean by ‘merge’ in this context? Any two files can be ‘merged,’ but I would need to know what you expect as the end result: is it ordered by time, or by something else? Is all the info needed to do that in the two files?
Assuming (?) that Natural Music and Natural Log are from the same supplier, is there no existing feature in those products which can merge the music and ads.? Or is the problem that it would cost substantial extra dosh for the Natural component/widget/add-in which would do that?
It just strikes me as odd that anyone who has the resources to afford Natural Music/Log can’t sort this out (or hire someone to do so) for themselves! ???
If the files aren’t enormous, then post them as ATTACHMENTS to a message and I can have a look at them. How would your chums feel about using a ‘merging’ program that runs in, say, MSOffice? That would be the easiest way for me to write it to begin with.
[quote=“Cad, post:2, topic:5052”]I have no precise idea of what you’re looking for here, but I’m prepared to at least take a look at the requirement if I can.
Answering the following would be a good start!
Are these ‘logs’ some kind of text file, or if not, do you know the internal format of them?
Can you describe EXACTLY what you mean by ‘merge’ in this context? Any two files can be ‘merged,’ but I would need to know what you expect as the end result: is it ordered by time, or by something else? Is all the info needed to do that in the two files?
Assuming (?) that Natural Music and Natural Log are from the same supplier, is there no existing feature in those products which can merge the music and ads.? Or is the problem that it would cost substantial extra dosh for the Natural component/widget/add-in which would do that?
It just strikes me as odd that anyone who has the resources to afford Natural Music/Log can’t sort this out (or hire someone to do so) for themselves! ???
If the files aren’t enormous, then post them as ATTACHMENTS to a message and I can have a look at them. How would your chums feel about using a ‘merging’ program that runs in, say, MSOffice? That would be the easiest way for me to write it to begin with.
BFN
CAD[/quote]
Hi Cad, I have a copy of the logs and an illustration of how BCX handles the merging of the 2 logs which occurs after the scheduling, this is quite easy. There is no function for this in mAirList which these guys (a community station) would like to try. I did suggest 2 seperate playlists but how would this be handled in automation.?
In this instance we have 2 seperate playlists (I will need to check but guess they are using. m3u), 1 music 1 ads with the play times of everything defined. the merge joins the 2 playlists together into a single file with the ad breaks in their respective places in this new list. i.e an ad break at 00:15 would appear at quarter past.
I am waiting for a reply from Natural Music and Natural Log to see if the 2 lists can be merged from within the software itself ready for export to mAirList. Yes its the same supplier.
Please try writing something using MSOffice, I will find the files and PM them to you.
If you load each playlist in it’s own Playlist (note: I use Playlist to mean and object and playlist to mean a file), then you’ll need some additional commands in both to handle the “ping pong aspect” of each Ad Break junction. Typically, this would be (at it’s simplest)
MUSIC PLAYLIST
SONG
JINGLE
AUTOMATION 2 NEXT
BREAK
JINGLE
SONG
ADVERT PLAYLIST
AD 1
AD 2
AD 3
AUTOMATION 1 NEXT
BREAK
AD 1
AD2
etc
However, I do not know if Natural Log can insert text commands into a playlist - Natural Music certainly can: &#mAirList xxx any basic text output (or explicit file) can be specified that way: &C:\Temp\Promo Tuesday.mp3 for example.
Logic dictates that if the gentleman wishes to merge the two M3Us, the gentleman will wish the result to be played out using a single Playlist; or am I missing something?!!
Anyhoo, provided each file is M3U-like, and comprises one text line per entry (no multiple-line jobs), then it sounds like your basic simple two-file merge on an ascending ‘key’ field, in which case it could be written very easily in VBScript, hence I would indeed prototype it in VBA (aka ‘program it within an MSOffice app.’).
SO all I really need now is two example files so I can properly recce the enemy … ;D
You can certainly include M3U files, sure - but for the traffic log you’ve posted, could be an issue. Main reason is that is has no path/filename - this may be because Natural Log assumes that you’re using a playout app that only needs Artist/Title or a CutID (DPS Enco Myriad, for example) but for mAirList, we need to tell it where the audio lives. As SPL Creator has a Traffic Import feature where you can define the fields and their sizes, writing an import wizard shouldn’t be too hard - but can Natural Log output a different file format ? I’ve only used it once as a demo so can’t help too much without installing it here and having a go.
Also - are these the files that you wanted me to import into BCX for you ? As you know, BCX can interpret a CutID and place an extension after it to make the file “playable”, so using BCX3 should be a doddle.
Hi Charlie, I’m going to contact these guys again as there are lots of unknowns here.
Please do not go to the lengths of installing any demo versions of software just to find an answer to this. I’ve long given up going through things like this unless it was something we intended to buy.
Importing the 2 playlists into BCX is certainly easy from the screenshot they sent as there is a tool especially for this.
I presume the idea is to produce a single file in the same format at the music log, yes?
The ad. file is in a totally different format but could I think still be merged fairly easily IF I know where the audio files are, file extensions etc.
Basically we would need to discuss it a bit more, but it could almost certainly be done.
I have been informed the 2 logs should be capable of being merged from the export functions some-where in the software. Although the method has still to be tried.
Generally, a traffic log is merged with a music log by matching the break names (or times). So a Break Note is inserted in the Music Log at each point where an advert block is to be imported. Matching break names/times from the traffic log are then inserted at each point in the music log accordingly.
I’m assuming here that what Tony actually needs is a single M3U containing the merged output of his music and traffic: yes?
Changing the music log he sent (assuming that his TXT file IS in the format churned out by BCX?) to an M3U is easy, though I’d probably need reminding how to write a BREAK etc. into it ;). I just punt out the actual path/file names. A doddle.
His traffic log is another story; I don’t have any full paths nor files in there, but if there is an easy way to map one to the other, again it’s possible.
For example, say we found a line in the log like: +|17:03:00|FR0022|00:35|ADVERTS|Bobby Buns
If ads. are ALWAYS in (say) C:\ForBroadcast\Ads and are ALWAYS named in the form (using this example) Bobby Buns.mp3, or some equally well-defined variant, again it’s not difficult.
I rather suspect though that the MP3s for the ads. do not follow such a neat naming system, in which case I’m a bit stuffed without the ‘list’—presumably internal to BCX3?—that gives me the real file names of items referenced by ‘tag’ ID (FR0022 in our example).
If you merge a music+ad log in BCX and save it - it’ll be exported as BCX’s own playlist format which resembles an INI file format Tony’s log files are Natural Music (music) and Natural Log (adverts).
So, those really ARE ‘yer ackshual’ Natural Music logs?
OK then, do you know in which files/databases Natural Music stores those ad. file tags; and (the $64,000 question!) the real audio files paths and names?
Armed with that info, or maybe a text file report of those tags/filenames, it would be fairly easily do-able.
Cad and Charlie thanks for your time on this. Now able to give the station an answer to this. No need for any scripting other than standard playlist load.
Have to go to work so more later.
Thanks again.Tony (running late for work).
Edit
Right after 2 messages to the US supplier, for which the replies went missing, I contacted the UK resellers.
There is a tool built-in to handle all this. Firstly you save the 2 logs (Natural Music/Natural Log) to the same directory in the format required for automation. In our instance it will output to .m3u so nearly done.
All it needs is for the load playlist script of Charlie’s (or a deriative using currentplaylist) and we should have a solution.
I will have to wait until next week to see how the community station gets on. Should they have no luck then I will have to pop up and spend a day with them. The weekend will give me time to skim the manuals too.
So apologies to Cad and Charlie for taking up your time.