You can program it to “watch” a folder for file changes, then it FTPs the contects to your website.
Here’s a script that I run at the top of the playlist to create a “DJ” onair:
var sl: TStringList;
begin
sl := TStringList.Create;
sl.Add('<b>Charlie</b> is on-air and now playing:');
sl.SaveToFile('D:\nowplaying\onair.php');
sl.Free;
end.
…and here’s the song info:
procedure OnPlayerStart(PlayerControl: IPlayerControl; Item: IPlaylistItem);
var sl: TStringList;
begin
sl := TStringList.Create;
sl.Add(Item.GetArtist + ' - ' + Item.GetTitle);
sl.SaveToFile('D:\nowplaying\nowplaying.php');
sl.Free;
end;
begin
end.
Using PHPInclude, you can display both those PHP files wherever you need to. For example, if you have a common title/menu-bar on your website - simply add the PHPInclude code and show the current DJ/Song on every webpage.
Been tinkering again with my scripts… I now have the following script (or variations of) running at the top of a playlist (or Rotation, in StationPlaylist) - they are also available via the Actions button - or pulled from a “Playlist” view off the Browser.
On Air - Charlie.mls
[code]var sl: TStringList;
begin
sl := TStringList.Create;
sl.Add(’’);
sl.SaveToFile(‘D:\nowplaying\imagename.php’);
sl.Free;
sl := TStringList.Create;
sl.Add(‘mAirList with Charlie’);
sl.SaveToFile(‘D:\nowplaying\showname.php’);
sl.Free;
These would suit any station/user who has StationPlaylist or is able to schedule text break-notes (dummys) in-between audio items. The AutoFTP software is a really useful tool, and works well with this dynamic PHP files.
Here’s a look at my test page:
and by putting the showname PHPInclude in-between the ListenLive link, you can change that with each show/DJ
I’ve also wrote a really simple program that allows a DJ to enter their own text + image and create those 2 PHP files manually. This would work on ANY system - I’ll post a download to that once I’ve made it configurable, as it currently only works on my web-server ;(
This would be great. The reason I am not using the Intelligent script solely, is due to the fact we use Icecast servers and not ShoutCast…also, this one is a lot easier and practical for the way we will be doing things!
Ryan,
I’m not familiar with Icecast servers - presumably you can alter the “now playing” field via a URL string as per SHOUTcast ? The above example is a cut-out of the Intelligent Now Playing Script - you just alter the filename and format to suit what you want.
Ah right, i never realised ti was a cut-out of the larger script! I see now.
Not to worry!
I’ll use the Intelligent Script then. The only thing i need changing is the remval of teh HTTP syncing, as it’s not needed in the way we will be using it. All we need is to save the updated file, and then use this AutoFTP to upload it.
Cool - just put // before any lines you want to comment-out (you’ll see from my notes within the script how it’s done)…
Make sure you get the latest version as I’ve just re-posted the script to include a “Production Mode” setting - so in a multi-studio environment, if you’re playing music from the main Playlist/Players - the details are not sent to your website/stream
As the script only detects a change in state of a player before updating, it means that if we open the mics after a song, the status will be showing the song playing for that entire link while nothing plays in mAirList (or also if we are playing CDs). So the status will not update until something new is played, which would be after a link. Is it possible that when in On Air Mode to detect, for example, 30 seconds of silence and then update with whatever e.g. “more music soon”?
Charlie: Perhaps Ryan has not fully grasped that the finished script needs to be a Notification script with the relevant ‘bits’ in the OnPlayerStart (now playing) and OnPlayerStop (not playing) sections.
That is how it works, yes? I’ve only quickly skimmed through the scripts! ;D
My script responds to an OnPlayerStart event, so it’ll only change when a Player (not a Cartwall) is started. It’s up to you what you tell it to do within each of the 4 parameters: OnAirSwitch, No Logging, Advert, Song, Pre-rec. You could put an OnPlayerStop section in there but that’ll fire everytime a player finishes - I’m guessing that’ll be Global Fade Duration seconds AFTER the next song has started - less than ideal
I see wha you mean by the OnPlayerStop event, because even though an ident would play over the back end of a song, as soon as the songfinishes, the OnPlayerStop event would fire. Hmmm…
And also, we don’t want the cartwall being logged, so that’s fine!
What would the GlobalFadeDuration do…is there a way to detect silence on the players?
What I meant with the GlobalFadeDuration is that when a song finishes, the FadeOut marker will start the next item, that new item will be logged, but the outgoing song will “stop” after your GlobalFadeDuration (which is usually 2-3 secs)…
Here’s an example with some times to help illustrate my point:
@ 00:00, sends “Playing: Green Day - American Idiot”
@ 03:30, sends “Playing: Blur - Parklife”
@ 03:32, sends “More music soon…” edit: this is when Green Day’s player has stopped
In that example, we assume that American Idiot is 3:30 long and the GlobalFade is set to 2000(ms). When Blur starts, Green Day is still fading-out, and the Player is not “stopped” until the fade-out has been accomplished.
There is a timer function in the scripting interface, but I’ve never done anything with it.
I’ve never been too worried about leaving song details showing - I suppose it depends upon your format You could add an OnOnAirOff event so that if you do “switch off mAirList” it sends something to the server.
If you wanted to be really clever, you could wire your mixer’s “on air tally” to a joystick input and make it fire a script to say “More music soon” because the DJ is talking
You need to make this circuit in order for Windows to “see” a joystick. A USB-Game convertor should work if you do not have an old-fashioned 15-way joystick connector. Add a Joystick to Remote in mAirListConfig - and use RUNSCRIPT to make it fire the script.