CS 465, Fall 2006
Project Canary is a network-based music player that allows groups to organically select appropriate music for a room full of people by accounting for the preferences of each participant.

The system is designed around a server that plays music for the entire room, connected to ambient speakers. The music is streamed directly from participants' laptops using the DAAP protocol. Each participant runs a Dashboard Widget allowing them express preferences about the sorts of music they like, the currently playing song, or the sound volume.
Implementation
The current implementation is more a proof-of-concept than a distributable app. It is somewhat difficult to configure and quite inefficient. Everything works though, so its a fun toy in it's current form.
The focus of the project is the Dashboard Widget. It uses XML-HTTP requests to send a user's "Profile" to the server. Each user may have several profiles that they select among, to express different interests in music, depending on the setting, time, or user's mood. A profile collects any settings that are made about the current song, as well as any explicit preferences added in the Profile Editor area. Preferences are set by adjusting sliders related to the Song, Artist, or Genre which the user is interested in. Volume is also controlled with a slider, and the volume for the room is updated shortly after changing the input volume. The widget is coded in pure JavaScript, so it should be portable to other widget platforms such as Yahoo Widgets.
The server is a command line process that collects the profiles sent to it by each of the clients and assigns a weight to each song that it finds via DAAP. Songs are randomly selected based on the weight assigned earlier, with more weight being assigned to preferences about songs, than preferences about genres. This cause specific interests to have a more intense effect. The audio playback is handled externally by mpg123, due to Python's poor MP3/m4a support on Mac OS X. The server runs a tiny http server which receives the profile data and sends back status information regarding the currently playing song, both static information like title, and artist, as well as dynamic information like current rating and time remaining. The server is written in pure Python.
Future Work
Add capability to skip songs if everyone immediately rates them poorly.
Implement tateful protocol/socket based connections.
iTunes 7 compatibility
If you decide to work on it, please forgive the very messy state of the code. It was implemented in a very short period of time to meet the requirements of the User Interface Design class, making the way it looked and the UI functioned more important than the quality of the codebase.
The buglist grows every day. Right now there may or may not be a problem when pressing return, sliders aren't grayed out in disconnected mode and the buttons are all wrong
Downloads/Installation
Widget (client)
Python-based Server
The widget should download and install automatically. There is only one thing to configure and no easy way to configure it. You need to edit the source, Canary.js to reference the name of your server, instead of "beluga.local"; then just be on a subnet that the server is also running on. If you'd like your music played, you need to run a DAAP server, such as mt-daapd, Music Publisher, or iTunes 6.
The installation of the server package is a bit more complicated. First it requires mpg123 to be installed at /sw/bin/mpg123. Next you'll need Python 2.5, PythonDaap, and bonjour-py. I recommend you install PythonDaap from svn, as it is least buggy in that form. We have some local patches that make it more reliable which may or may not be integrated in the trunk. Once you have all these prerequisites met, you should be able to simply run the server with python server.py and start letting clients connect. If it repeatedly displays a message about "No Libraries" being available, make sure you're running a compatible (read non iTunes-7) DAAP server on the subnet.
Final Presentation
(December 6, 2006)
Presentation [PDF] [SWF]
Group Members
Contact us at: project-canary@listserv.uiuc.edu
- Joey Hagedorn
- Molly Punke
- Sundeep Reddy
- Waleed Bishouty