Until the 2012 National Student Radio Conference in Bradford

Southampton Solent University
Radio Sonar is the Student Radio Station for Southampton Solent University. We broadcast live 24 hours a day, 7 days a week online at www.radiosonar.co.uk.

The results of this system have dramatically improved our web presence, and have had very positive feedback, from inside and outside our society. Before I became Head Engineer and wrote this system, the website would only ever show our current song during automation, which meant no currently playing information during the day. As a whole new playout system was not a viable option at the time, plus I wanted more control over what the system did, I had to improvise and create this system. I’ve also had other Student Radio Association stations comment and ask me on some of the things the system does, and have asked me for advice on doing similar things, which I have always gladly given.
It’s a constantly looping PHP script running server side, which uses some logic to work out what is currently being broadcasted and by whom, this then updates a few outputs, including our website, our web player, our beta windows desktop player, our Facebook application (which due to problems outside our control is currently out of order at the time of writing), last.fm integration, which is a online music service which profiles what it’s users are listening to, twitter integration, and updates partner websites such as sutube.co.uk, the university TV station. It also shows data from the Student Radio Chart, as if the song playing is in the Chart, it will display it’s ranking. We can do this because I built a script which parses the data from the SRA website, and stores the chart data in a database which is queried on every song change. It also shows which playlist the song is from via the same method.
The script has to determine which of our two playout systems are currently in use (we use one for live-assist and one for automation), and based on many factors, including when the last time the ZaraRadio currentsong.txt file changed, and if mAirList has sent any data to the script itself, it decides what it thinks logically is currently broadcasting, usually working it out within a maximum of 5 minutes of a change of playout systems. Once it has decided what mode we’re in, live or automated mode, it works out what song is currently playing and works out if the song information has changed since the last loop. It works out what’s going out on air via a series of conditions, the options are: Live Show Link, Live Show Song, Pre-recorded Show, Automation, Jingle or News, this choice is important as it can alter significant website functionality. It also works out what show is on-air, via my custom built Schedule Manager system, it queries Last.FM for song information, and grabs album or artist art to display on our website, it also submits now playing and scrobble information to last.fm, which can be seen at www.last.fm/user/xtremeradio1431. Scrobbling is basically telling last.fm what we’ve just played, so they can show it on our profile.
It also logs the song in our database, along with data about what time it was played, what playlist the song was in at the time of playing (so our Heads of Music can monitor if presenters are abiding by our playlist rules) and updates the “Recently Played” information on the website, which displays the last few tracks we played, and it sends the data to Facebook too, which then displays what we’re playing on the profile of every person who have added our application.
Every fifteen minutes it also updates Twitter with what show we’re currently broadcasting. It also provides information for Internet Explorer 8 web clips, if the user has added our web clip to their browser. It also updates ice cast, our streaming server, with what we’re playing so users using desktop media applications that are not our own, such as Windows Media Player and iTunes, can also get access to our metadata. The system also via the use of Ajax without needing a refresh, disables and enables our web-player studio contacting system, so that people don’t email in during pre-recorded shows or automation. Our currently playing information on the website is also powered by Ajax. Our Listen Again feature also makes use of data stored by this system, as when it is playing it queries what song we were playing at the time it was originally broadcast so that it can display to the user the current song information to them, even though the show is not live.
The system is also linked to a Visual Basic 2008 application, which I wrote, running on the Studio 1 PC, which updates the Windows Live Messenger “Now Playing” feature with what we’re currently playing.
I am also currently working on a “What Song Played at What Time” feature, which will allow the user to find out what song was playing at a particular time in the past without having to go to last.fm. Because the on-air loop system stores all this information in a MySQL database, adding a feature like this is simply a matter of querying the database.
It also provides information to our currently still unreleased, at the time of writing, desktop application written in Visual Basic 2008, which scrobbles what we’re playing to the user’s last.fm profile if they wish, as well as updating their Windows Live Messenger currently playing status with what we’re playing.
The PHP loop is running via a SSH Screen session, inside a never terminating while loop, and a 5 second sleep so that the right data is always shown on our website, and has been running for months without any terminations caused by the program itself. It also has code to prevent the script from being run twice at the same time, as that would cause duplication and could potentially break other things.
Technologies used:PHP, MySQL, HTML, CSS, JavaScript, Ajax, Facebook API, Last.FM API, Twitter API, Visual Basic 2008
