Summer of Code 2008/Last.fm radio

From The Neuros Technology Wiki

Jump to: navigation, search

Contents

[edit] General Information

Student: Guillaume Béland

Mentor: Anders Waldenborg

I will blog here[1] on a regular basis about the progress I make. If you want to talk to me, give me suggestions, comments and feedback, you are welcome. My nickname on IRC is guillaumebel and my e-mail is guillaume dot beland at gmail dot com.

[edit] The Project

[edit] Abstract

The Neuros OSD is a great platform that let you record and store different types of media on an external hard drive. It also give you access to your media collection from your television with a nice interface. Another thing that the OSD allows is to bridge online services to your television. A good example is the YouTube application where you can access YouTube video directly from your television. There's other work in progress to bridge the gap between the internet and the television as well. On the audio side, the OSD has basic playback and music management capability. But the device is of no help when you want to discover new music with it and that's perfectly fine. In your everyday life there are few good ways to discover music these days. Most of the time we discover new music from friends suggesting unknown artists, listening to the radio and other such things.

Appearing on the scene recently is an increasingly popular online services called Last.fm. Using a music recommendation system known as "Audioscrobbler" Last.fm builds a detailed profile of each user's musical taste by recording details of all the songs the user listens to, either on the streamed radio stations or on the user's computer. All this information can be used to create custom radio stations based on user's musical taste as well as suggesting new music to the user. Last.fm's slogan is “The social music revolution”. The goal of this project is to give the user a new way to discover and enjoy music, to bring the Last.fm's revolution to the Neuros OSD.

[edit] Project summary

The application need to be simple to use but still full of information. The Last.fm web services API allow developer to access a very important quantity of information concerning the user's musical taste. The goal is to provide a good quantity of valuable information to the user as well as a rock solid radio engine.

There's no need to have a Last.fm account to enjoy the application. Although more customised radio stations can be created when the user have an account. It is possible to create radio station based on tag, similar artist, fan of artist. So a standard use case would be: the user enter in the application, choose to create a new station, choose between different type of station, enter required data with the on screen keyboard, save the station and start enjoying great music. From there, useful information about the currently playing artist will be displayed on the screen (top songs and albums from this artist, biography if available etc.). If the user have an account on Last.fm, all listened track will be scrobbled to his profile and more information will be displayed about his personal musical taste (top artist, weekly top artists, top tracks etc.). All these information are displayed nicely to the user. The user will be able to create as much stations as he want. Some stations will be pre-built for user owning an account. Station like “Recommended Artist” and “Neighborhood Radio”.

The only thing the application will depend on is, of course, an internet connection in order to retrieve the radio stream from Last.fm. Other than that there's absolutely no dependencies.

[edit] In details...

Here lay down the principals components of the application and the work that will need to be done on the OSD in order to make the application functional.

Graphical representation of the different component of the application
Graphical representation of the different component of the application

[edit] Last.fm Core / XML parser

Last.fm offer a huge quantity of information through web services (refer to http://www.audioscrobbler.net/data/webservices/). All this information come in different formats and the most used is obviously XML. In order to retrieve all the information wanted from a Last.fm account, the need for a good and adapted parser is mandatory. The Last.fm core represent all the low level work that need to be done with Last.fm

[edit] Last.fm services

This module can be considered as the higher level API of the XML Parser. This is a high level API that will use the XML parser in order to retrieve and convert the information in a way that it can be used and displayed easily to the end user. The design of this library need to be very extensible so if there's new information on Last.fm web services page, or there's a need for a custom information, it won't be hard to use or modify the library to retrieve the information wanted. This module also handle standard Last.fm functionality like the user account login, protocol handshake, love/ban/tag tracks and other such things.

[edit] Last.fm radio

The radio module is self explanatory. The module handle the creation, modification and deletion of radio station. It will also be responsible to provide the radio stream to the player. Last.fm provide 7 type of radio, all of them will be implemented (Personal, neighborhood, loved, group, similar artist, artist fan and tag radio) and some of them will be created by default. The user will be able to create and save different type of station.

[edit] Player

This is an evident module. Playback of the radio stream will be handled in this module. The player is in fact a xmms2 client implemented with the xmmsclient++ library.

[edit] Audioscrobbler

The audioscrobbler is a project in it's own. It's implemented as a xmms2 client running in parallel to any other client and scrobble the song played. Written in C, this audioscrobbler is portable and can be used on the any computer as well as the OSD.

[edit] Progress chart / Roadmap

Milestone 1: Port DrLecter (XMMS2 0.5) to the OSD, with this port, two new plugin will be built: lastfm and lastfmeta, which handle the playback for lastfm radio as well as the metadata provided with the stream. In parallel with this port, I'm coding the audioscrobbler module which will act as a client that will be started every time XMMS2 daemon is launched. So track played with the OSD audio player could scrobbled


Milestone 2: Implement the core layer of the Last.fm radio client of the OSD. XMMS2 client and Last.fm core.

Milestone 3 : Build the graphical user interface.

Roadmap
Task Status Priority
Basic task
Port the latest stable release of Xmms2(DrLecter) to the OSD Done High
Core functionality
Player
Xmms2 client Done High
Playlist layer
Abstraction layer between the Last.fm playlist and the xmms2 Playlist
Done High
Radio Layer
The Xmms2 Last.fm Radio plugin will be used.
Done High
Last.fm library
Web services / XML utils
Web services lower level implementation
Done High
Audioscrobbler Connection Done High
Audioscrobbler Queue
Queue of track to scrobble
Done High
Last.fm Account Done High
Mid level functionality
Last.fm services
Child of XML classes, Used to get any type of information from Last.fm services.
Done High
Audioscrobbler
If the user have an account, every track will be scrobbled.
Done Medium
Last.fm radio
Station Builder
Build radio station according to different criteria.
Done High
Configuration
User account information, Miscellaneous useful function related to saving and loading radio station and general preferences (audioscrobbler, chart etc)
Done Medium
Metadata
Abstraction layer between XMMS2 metadata provider and the graphical user interface
Done Medium
User interface
Global screen
Metadata box
Each radio stream provide some basic metadata for each track. This widget simply display them as well as the album art when available.
Done (Need Improvement) Medium
Login dialog
Optional dialog to login to your Last.fm Account
Done High
New station dialog
Dialog to create new radio station
Done High
Available station
A list of previously created station
Done (finalizing) Medium
Account screen
Top Album Done (finalizing) Low
Top Artist Done (finalizing) Low
Top Track Done (finalizing) Low
On demand chart
The goal of this module will be to provide access to most (if not every) chart information from Last.fm. This option won't be displayed as part of the default GUI but will be available with the XIM key and displayed on demand.
Not started Low
Artist screen
Top song from artist Done (finalizing) Low
Top album from artist Done (finalizing) Low
Similar artist Done (finalizing) Low
Other
General Debugging In progress Normal
Documentation In progress Normal
Code clean up In progress Normal

[edit] Profit for the Neuros OSD

As mentioned in the abstract. The Neuros OSD could greatly benefit from this kind of application. In an age where most of our tasks and entertainment is done on our computer and the internet. A device capable of playing different music station and make us discover new music based on our taste in the comfort of our living room is priceless. Bringing this “social music revolution” to our television enhance the multimedia experience that the OSD procure.

[edit] Success criteria

Having a working Last.fm radio player by the end of the Summer Of Code with all the specification mentioned above

Personal tools