Old Blogs

Old blogs

Mobile Multimedia Mashups

Application development, Music - August 14th, 2006 - Written by Oren Levine

If you’re a Last.fm user (or know someone who is), you may know about Audioscrobbler, the engine behind Last.fm. Audioscrobbler provides a plugin protocol so that music player applications can update the server with the music you play, and exposes a set of public web services that let you access data and recommendations about Last.fm members and their favorite music.

What I haven’t seen (so far) is any mobile interfaces to the Audioscrobbler database. In an attempt to fill this gap (and encourage others to experiment), I wrote a couple of simple Python scripts for S60 devices that demonstrate some of the query features of the Audioscrobbler API (This also gave me a chance to learn Python!). Read on for the details.

Of course, Last.fm is not the only social music game in town. Other services, like MusicStrands, are already experimenting with mobile clients, and offer their own public API’s.

python_related.jpg The first script is a modification of the File Browser that is included with the S60 Python SDK. When you navigate to an MP3 file, you have the option of looking up related artists from Audioscrobbler. Right now, the script just displays the results, but this can potentially be extended to browse for more music, or information about the related artists. I tested this script on a Nokia N91 with release 1.3.8 of Python for S60.
The second script shows how you might integrate social music with your Contacts. In this case, if you add your friend’s Last.fm ID to his or her contact information, you can find out their favorite artists or tracks. I tested this script on a Nokia 6630, using release 1.3.1 of Python for S60. Note: This script will NOT WORK on S60 3rd Edition devices. Platform security blocks access to the Contacts from Python.

More info (Aug. 16): That is, unsigned Python scripts can’t access the contacts. You can sign the script to get additional capabilities, as with any other S60 application. See the discussion forum for more information.
top_artists.jpg

Thanks to Jürgen Scheible for his excellent Python tutorial, which made it much easier for me to get started. These scripts use Jürgen’s application skeleton. The first one also uses code from here to extract MP3 metadata (thanks to Erik Smartt for the link!)

Feel free to play with these scripts as you wish, and let me know if you create something interesting!

-Oren

About the author Oren Levine

I’m Oren Levine and I work in the S60 marketing team, focusing on what S60 offers to software developers and others who are interested in [..]

  • Number of posts: 54

Comments(21)

  1. SeaWolf wrote

    What would be very cool is to have the Music Player update Last.fm as you play tracks on your phone. Though you’d have to watch out for data charges.

  2. Oren wrote

    I agree, SeaWolf. Should be possible to write an Audioscrobbler plugin if you can get access to the “now playing” information. I’ll check it out with our player team.

  3. Erik Pettersson wrote

    Hey guys,

    I think the scrobbling feature is nice, but my guess is that it would be better suited for Ericssons as they have the music playing stuff (at least the commercials tells me so).

    I go with Nokia for the mad development stuff though, like Python (done a small bluetooth communication test and it seems nice, it just hangs a bit much;)

    My goal is to listen to Last.FM radio on my cellphone though, since it’s a killer feature which I use constantly.

    With the Internet Radio Player you guys have released that will be possible Real Soon Now.
    This little project has been going on for quite some time but this is the only time I’ve seen the light in the end of the tunnel.

    As for the scrobbling thing you were discussing, it possible but might require a new front-end (if you can’t get the ‘now playing’ info from the player). Worst case scenario you’ll have to re-implement it with and trigger something that saves that info. This could be sooo neat with Flash Lite 2.0. Don’t get me started :P
    Oren: feel free to contact me with python questions or random thoughts on mad projects

    Erik

  4. Erik Pettersson wrote

    Hmm, better drop the email address too :)
    petterson dot erik _[AT]_ gmail.com

  5. Oren wrote

    Thanks for the comments, Erik. Please keep us posted on your progress with the Last.fm project. I also think it would be interesting to have a scrobbler for Shoutcast (or even Visual Radio!), that uploads the song info from the metadata.

  6. Erik Pettersson wrote

    The thing with Radio is that you arn’t allowed to upload metadata from that, since it’s not really ‘your choice’ of music. It’s a LastFM guideline and it kinda makes sense to me. Radio content is never 100% matching but your playlist is.

    I will keep you posted on the LastFM progress!

  7. Paddy wrote

    Oren, I’ve been thinking along similar lines to SeaWolf, though I was thinking along the lines of an application that would record what you are listening to locally, to be uploaded in one go when convenient - a bit like YamiPod, which allows you to post your recently played tracks from your iPod to Last.fm. Except that in this case everything would be done from the phone. However, though I can find loads of information about the web services to get data from Last.fm, I can’t find anything about submitting data. Could you possibly point me in the right direction?

  8. Oren wrote

    Audioscrobbler documents the upload protocol in its Wiki: http://www.audioscrobbler.net/wiki/Protocol1.1
    This requires a way to extract “now playing” data from the Music Player. We’re working on that.

  9. Daudskrott wrote

    I have Nokia N70 smartphone. Do you know any Symbian S60 MP3-player that supports scrobbling with Audioscrobbler/last.fm plugin?

  10. Mads Chr. Olesen wrote

    Any news from the player team on this?
    I’m really looking forward to having the tracks listened to on my mobile AudioScrobbled :-)

  11. Mike wrote

    No need to reinvent the wheel. You can get some Python code to submit song track info to last.fm from my iPod scrobbler plugin http://www.hoc.net/mike/source/iPodScrobbler

    Supports Unicode too. :-)

  12. Miika Niemelä wrote

    Yes!

    The “now playing” info would be such a nice thing to have access to.

    As a person who listens music with a S60 device 90% of the time I have come to notice that this would really be a nice feature.

    I am at the moment looking into doing something like this on the native side, only thing missing is the “now playing” info which can only be generated by doing the player myself (which I am not going to do :).

  13. Richard Cooke wrote

    I have developed a prototype last.fm radio client in pyS60. It requires an external player and as such LCGJukebox seems to fit the bill. It is downloadable at http://m3solutions.co.uk/Documents/lastfm.py_v1.02.rar
    I would be very interested in any feedback.

  14. Jukka Eklund wrote

    Thanks Richard, loved it :)
    The Internet connection seems quite unstable on my N76, it keeps popping up the select access point dialog. Might be something with pyS60..

    This is sweet for parties etc. to control what’s playing.

  15. arjun wrote

    hiiiiiii
    if you have visual radio(or any fm radio for nokia s60 series)please send me this softwere.

  16. tatoosh wrote

    Hi,

    where to get a s60 3rd edition client for last.fm ??
    i need this client ;)
    the link above doesn’t work anymore: lastfm.py_v1.02.rar

  17. Liam wrote

    that link doesn’t work for me either.

    personally, I like the idea of being able to batch-upload a tracklist of all recently played tracks on my N95 to my Last.fm account. i use my N95 for listening to music on the go and in the car, and it’d help a lot when i log into Last.fm to update my preferences/playlists in making useful suggestions to me…

  18. Toni wrote

    Hi

    Any upadte on the last.fm client for S60?

    Thanks!

    Toni

  19. joonas wrote

    still no news about last.fm s60 client?

    boo!

  20. Toni wrote

    Hi

    There is a working Python project for a last.fm client for S60: http://code.google.com/p/aspyplayer/

    Toni

  21. Michael Coffey wrote

    I’ve written an s60 last.fm scrobbler. If anyone is interested in trying it then please go here.

    http://code.google.com/p/mobbler

    Thanks.

    Michael

Visit new S60 Blogs

You are browsing old S60 blogs. Please note that these sections are not updated any more. Go to the new S60 Blogs to find out the latest news!

New blog categories:

Categories

What is S60?