Logo

The useless memoranda of Arno Moonen

  • Archive
  • RSS
  • Got a question for me?

Scrobbling while listening to the radio?

As some of you might know I’ve developed a few applications in the past that used the Last.fm API, for example Last 3FM and Copy Paste Scrobble.

A few weeks back I started working on a new webservice, called Luister.us, that makes it possible to scrobble the music you hear while listening to the radio. You might think it’s similar to Last 3FM and you’re right, it is similar. Actually it’s exactly the same, but a big difference is the fact that this webservice will work for way more radio stations. Also the software behind it is way more advanced than the messy PHP code I used with Last 3FM, but I’ll talk about the later.

I’m currently testing the back end of the service, where all the magic happens basically, and it seems to work pretty well. The software is recognizing plays from the following stations (to name a few):

  • 3FM The Netherlands
  • 3FM Alternative The Netherlands
  • 3FM Live The Netherlands
  • 3FM Serious Talent The Netherlands
  • 3FM Xnoizz The Netherlands
  • Studio Brussel Belgium
  • MNM Belgium
  • MNM Hits Belgium
  • Radio 2 The Netherlands
  • Radio 2 Liedkunst.nl The Netherlands
  • Radio 2 Sterren.nl The Netherlands
  • Radio 4 The Netherlands
  • Radio 4 Eigentijdse Muziek The Netherlands
  • Radio 4 Jong Klassiek The Netherlands
  • Radio 5 The Netherlands
  • Radio 5 Nostalgia The Netherlands
  • Radio 6 The Netherlands
  • Radio 6 Blues The Netherlands
  • Radio 6 Grooves The Netherlands
  • Radio 6 Jazz The Netherlands
  • Radio 6 Jazz Jong The Netherlands
  • Radio 6 Outer Limits The Netherlands
  • Radio 6 World The Netherlands
  • Radio 1 Belgium
  • Radio 2 Belgium
  • Radio 538 The Netherlands
  • 538 Dance Department The Netherlands
  • 538 Hitzone The Netherlands
  • 538 Juize The Netherlands
  • 538 Non-Stop 40 The Netherlands
  • 538 Party Radio The Netherlands
  • 538 Zomer Radio The Netherlands
  • Arrow Caz! The Netherlands
  • Arrow Classic Rock The Netherlands
  • Arrow Jazz The Netherlands
  • Classic FM The Netherlands
  • Deep.FM The Netherlands
  • Klara Belgium
  • KX Classikx The Netherlands
  • KX Culture The Netherlands
  • KX Red Hot The Netherlands
  • KX World The Netherlands
  • Out Music The Netherlands
  • Q-Music Belgium
  • Q-Music The Netherlands
  • Radio 10 Gold The Netherlands
  • Radio 10 Gold 60s 70s Hits The Netherlands
  • Radio 10 Gold 80s Hits The Netherlands
  • Radio 10 Gold 90s Hits The Netherlands
  • Radio 10 Gold Dance Classics The Netherlands
  • Radio 10 Gold Top 4000 The Netherlands
  • Radio 8FM The Netherlands
  • Radio Veronica The Netherlands
  • Veronica Hit Radio The Netherlands
  • Veronica Rock Radio The Netherlands
  • Veronica Top 1000 Allertijden The Netherlands
  • Radio Vlaanderen Internationaal Belgium
  • RTL Lounge The Netherlands
  • SkyRadio 101FM The Netherlands
  • SkyRadio Love Songs The Netherlands
  • SkyRadio NL The Netherlands
  • SkyRadio Seasonal (Summer Hits / Christmas) The Netherlands
  • SmashFM The Netherlands
  • WildFM The Netherlands

As you can see we already support over 50 radio stations. Ofcourse I’m still testing if everything works fine, so a few stations might not be available in the public version right away. Even though the list is quite long already, I would still like to hear from you if you’re missing your favourite station. If the radio station publishes Now Playing information on their website or if they broadcast using IceCast (Ill be adding support for ShoutCast and others soon), there’s a big chance that I will be able to add them to the list.

How it works? Well, I developed a few pieces of software to make this possible using Java, PHP and MySQL. I run a Java application locally that detects the plays and sends them to the website through an API (written in PHP). The API tries to match the data with data from the database or create a new artist / track in the database if needed. The Java application also handles the scrobbling and now playing updates for all the users. The website also has another API that will be used for mobile and desktop clients in the future and I’m also thinking of some kind of embedded player.

The biggest reason I split the software is to make it more cost efficient. When developing Last 3FM I wrote everything in PHP and it all had to run on the same server. But detecting the plays does cost some bandwidth and resources on the server, while the website itself didn’t use that much resources. I ended up renting a Virtual Private Server to host the service and even though the VPS was rather inexpensive (about $20 a month), the few bucks I earned through the ads on the website didn’t nearly cover the costs. I hope that the API will take up less resources than the scanning progress did, so I can host it on a shared hosting server (costs are about $2 to $7 a month, quite a difference!).

Another advantage of this structure is that it will enable me to write custom software for radio stations (if they are interesting in cooperating with me) so that plays can be pushed to our service directly from their studio, since the API supports several data sources. If you work at a radio station and you might be interested in this, just drop me a line!

Finally, for all the other developers out there, I will probably be opening up the API used by the website and mobile/desktop apps, which I mentioned before. Using this API you can offer the users of your app now playing information of several radiostations and you can registers users on the website so they can enable scrobbling directly from your app. More details on this API will follow when I decide to make it publicly available.

Now let’s hope I get my MacBook Pro back soon, so I can design the corporate design and website for Luister.us and put the public beta up! ;)

    • #LastFM
    • #luisterus
    • #development
    • #iphone
    • #android
    • #blackberry
    • #mac
    • #windows
    • #lfm
    • #3fm
    • #skyradio
    • #stubru
    • #538
    • #radio
    • #mashup
    • #now playing
    • #php
    • #java
    • #API
  • 7 months ago
  • 13
  • Comments
  • Permalink
  • Share

13 Notes/ Hide

  1. vurymepuvi liked this
  2. arnom posted this

Recent comments

Blog comments powered by Disqus
← Previous • Next →

Portrait/Logo

Find me on..

  • @ArnoMoonen on Twitter
  • Facebook Profile
  • itavero on Youtube
  • ArnoM on Last.fm
  • itavero on Foursquare
  • itavero on Gowalla
  • Google
  • Call me on Skype
  • Linkedin Profile
  • itavero on github

Latest DailyBooth Picture

Last known location

  • RSS
  • Random
  • Archive
  • Got a question for me?
  • Mobile

Copyright by Arno Moonen. Effector Theme by Carlo Franco.

Powered by Tumblr