Posts Tagged rdio

Using the wisdom of the crowds to build better playlists

At music sites like Rdio and Spotify, music fans have been creating and sharing music playlists for years. Sometimes these playlists are carefully crafted sets of songs for particular contexts like gaming or sleep and sometimes they are just random collections of songs.  If I am looking for music for a particular context, it is easy to just search for a playlist that matches that context.  For instance, if I am going on roadtrip there are hundreds of roadtrip playlists on Rdio for me to chose from. Similarly, if I am going for a run, there’s no shortage of running playlists to chose from.  However, if I am going for a run, I will need to pick one of those hundreds of playlists, and I don’t really know if the one I pick is going to be of the carefully crafted variety or if it was thrown together haphazardly, leaving me with a lousy playlist for my run.   Thus I have a problem –  What is the best way to pick a playlist for a particular context?

Naturally, we can solve this problem with data.  We can take a wisdom of the crowds approach to solving this problem. To create a running playlist, instead of relying on a single person to create the playlist, we can enlist the collective opinion of everyone who has ever created a running playlist to create a better list.

I’ve built a web app to do just this. It lets you search through Rdio playlists for keywords. It will then aggregate all of the songs in the matching playlists and surface up the songs that appear in the most playlists.  So if Kanye West’s  Stronger appears in more running playlists than any other song, it will appear first in the resulting playlist.  Thus songs, that the collective agree are good songs for running get pushed to the top of the list.  It’s a simple idea that works quite well. Here are some example playlists created with this approach:

Best Running Songs

Coding

Sad Love Songs

Chillout

Date Night

Sexy Time

This wisdom of the crowds approach to playlisting isn’t limited to contexts like running or coding, you can also use it to give you an introduction to a genre or artist as well.

Country

Post Rock

Weezer

The Smart Playlist Builder

The app that builds these nifty playlists is called The Smart Playlist Builder.  You type in a few keywords and it will search Rdio for all the matching playlists.  It will show you the matching playlists, giving you a chance to refine your query.  You can search for words, phrases and you can exclude terms as well. The query sad “love songs” -country will search for playlists with the word sad,  and the phrase love songs in the title, but will exclude any that have the word country.

Smart_Playlist_Builder

When you are happy with your query you can aggregate the tracks from the matching playlists. This will give you a list of the top 100 songs that appeared in the matching playlists.

Smart_Playlist_Builder

If you are happy with the resulting playlist, you can save it to Rdio, where you can do all the fine tuning of the playlist such as re-ordering, adding and deleting songs.

Top_sad_love_songs_-country_songs_via_SPB_–_Rdio

The Smart Playlist Builder uses the really nifty Rdio API. The Rdio folks have done a fantastic job of giving developers access to their music and data. Well done Rdio team!

Go ahead and give The Smart Playlist Builder a try to see how the wisdom of the crowds can help you make playlists.

, ,

7 Comments

A quick hack to explore gender and music

Given that it is a holiday today, I only had a short amount of coding time this morning. Still, I built something that is pretty fun to play with. It is a little tool that lets you explore gender and music.  With the tool, you can search for Rdio playlists via keywords and the app will give you the gender breakdown of the matching playlist creators. For example, if you type in ‘exercise’  the tool finds the top 200 playlists with exercise in the title and gives you the gender breakdown like so:

Screenshot_3_31_13_9_15_AM

You can use the tool to explore gender biases in music. Some examples:

  • 90% of Bieber playlists are by female listeners
  • 81% of  heavy metal playlists are by male listeners
  • 61% of love playlists are by female  listeners
  • 70% of driving playlists are by male listeners
  • 70% of cleaning playlists are by female listeners
  • 95% of coding playlists are by male (!) listeners
  • 100% of Mamma Mia playlists are by female listeners
  • 88% of frat playlists are by male listeners

The tool was built using the superduper Rdio API.  Try the tool out here:   Gender Bias in Music

 

1 Comment

Boil The Frog

You know the old story – if you put a frog in a pot of cold water and gradually heat the pot up, the frog won’t notice and will happily sit in the pot until the water boils and the frog is turned into frog soup.  This story is at the core of my winter break programming project called Boil the Frog.   Boil the Frog will take you from one music style to another gradually enough so that you may not notice the changes in music style. Just like the proverbial frog sitting in a pot of boiling water, with a Boil the Frog playlist, the Justin Bieber fan may find themselves listening to some extreme brutal death metal such as Cannibal Corpse or Deicide (the musical equivalent to sitting in a pot of boiling water).

Screenshot 1:2:13 5:54 AM-3

To use Boil the Frog, you type in the names of any two artists you’ll be given a playlist that connects the two artists. Click on the first artist to start listening to the playlist.  If you don’t like the route taken to connect two artists, you can make a new route by bypassing an offending artist.  The app uses Rdio to play the music.  If you are an Rdio subscriber, you’ll hear full tracks, if not you’ll hear a 30 second sample of the music.

You can create some fun playlists with this app such as:

How does it work? To create this app,  I use  The Echo Nest artist similarity info to build an artist similarity graph of about 100,000 of the most popular artists. Each artist in the graph is connected to it’s most similar neighbors according to the Echo Nest artist similarity algorithm.

image graph

To create a new playlist between two artists, the graph is used to find the path that connects the two artists. The path isn’t necessarily the shortest path through the graph. Instead, priority is given to paths that travel through artists of similar popularity. If you start and end with popular artists, you are more likely to find a path that takes you though other popular artists, and if you start with a long-tail artist you will likely find a path through other long-tail artists. Without this popularity bias many routes between popular artists would venture into back alleys that no music fan should dare to tread.

Once the path of artists is found, we need to select the best songs for the playlist. To do this, we pick a well-known song for each artist that minimizes the difference in energy between this song, the previous song and the next song.   Once we have selected the best songs, we build a playlist using Rdio’s nifty web api.

This is the second version of this app.  I built the first version during a Spotify hack weekend. This was a Spotify app that would only run inside Spotify.  I never released the app (the Spotify app approval process was a bit too daunting for my weekend effort), so I though I’d make a new version that runs on the web that anyone can use.

I enjoy using Boil the Frog to connect up artists that I like. I usually end up finding a few new artists that I like.  For example, this Boil The Frog playlist connecting Deadmau5 and Explosions in the Sky is in excellent coding playlist.

Give Boil the Frog a try and if you make some interesting playlists let me know and I’ll add them to the Gallery.

, ,

15 Comments

Hear Here update

A bit more coding this weekend on ‘Hear Here’ my iPhone app that plays music by nearby artists.  It is now feature complete.  The list of features is rather small – it really is a ‘do one thing well’, kind of app.  It plays music by the nearest artists that match your filter. You can filter currently by the popularity of the artist.  If you are adventurous, you can listen to music by all nearby artists, but if you are not so brave you can just listen to music by mainstream or popular artists.   The app shows you how far away the ‘now playing’ artist is and shows you how many artists are within a 25 mile radius.   All music is streamed from Rdio and of course you’ll need an Rdio subscription to hear full streams.  I made my own icon – it is pretty ugly – if you have design skills and want to contribute a logo I’d be very pleased to use it.   Here’s a video of the app in action for a user who happens to be in Cupertino:

[youtube http://www.youtube.com/watch?v=Lfb5P8_8Dpk&hd=1]

Next steps for the app are lots of testing, especially with poor network connectivity.  After that, I’ll make sure I’m following all the rules for Rdio and Apple – and once I’m conforming to all the TOS’s and UI guidelines  I’ll submit it to the App Store (as a free app).

, , , ,

3 Comments

Hear Here version 0.1

My weekend programming project was to build a bare-bones version of Roadtrip Mixtape that runs on an iPhone.  This is an MVP (a term I learned from my Product Management buddies at work) – with only 5 basic features:

  • You can press ‘next’ and the app plays a song by the nearest band to where you are right now.
  • You can press ‘pause’ to pause/resume  the playing
  • You can login to Rdio so you can listen to full streams
  • You can look at the album art
  • You can simulate moving to another location (I was getting sick of listening to just Nashua music).
Here’s the app in all it’s designer beauty:

This is the first significant bit of iOS programming that I’ve done.  It is a lot of fun. Xcode has tons of features that make working with all the idiosyncrasies of the platform manageable.  There’s a huge amount of documentation including many tutorials, examples and recorded WWDC talks, plus tons more info on Stack Overflow.   To stream music I’m using the Rdio iOS SDK. It is very easy to use, very well documented, with lots of good examples. I thought that getting music to play was going to be the hard bit of this project, but it was actually really easy. Well done Rdio programmers!

Tomorrow I’ll take V0.1 on its maiden test drive on my commute to work to see how well it works on the road. I suspect that the playlists will not be the most listenable since they are often filled with very long tail artists.  On the list for V.2 will be the ability to add popularity and style filters to make it more likely that music that I actually like appears in the playlist.

Oh and I came up with a new working title for  the app = ‘Hear Here’.  Not sure if I’m 100% on board with the name though.  No one likes puns anymore.

, ,

6 Comments

Roadtrip Mixtape

Over the last few years I’ve made a number of 1,000+ mile road trips as I shuttle kids to colleges in far away places. Listening to music has always been a big part of these trips.  I thought it’d be nice to be able to listen to music by local artists when driving through a particular region, so I spent a few weekends creating an app called Roadtrip Mixtape that populates a roadtrip playlist with artists that are from the region you are driving through.

To create a playlist, type your starting and ending cities for your roadtrip.  The app will use Google’s directions to plan the best route between the two cities.  The route will then be broken into 15 minute playlist legs. Each playlist leg is populated by 15 minutes worth of music by nearby artists.

The beginning of each leg is represented by a green ball. You can click on the ball to see what artists will be played during that leg.  The app plays music via Rdio using their nifty Web  Player API.  If you are an Rdio subscriber you can listen to full streams, and if not you get to hear 30 second samples.  One bit of interesting info that I show for a route is the ‘Avg distance’.  This shows the average distance to each artist on the roadtrip. If this number is low, you are traveling through a musically dense part of the world, and if it is high,  you are traveling in a sparse musical region. For instance, for a roadtrip from Boston to New York the average artist distance is 3 miles (about as low as it goes).   However, if you are traveling from Omaha to Denver, the average artist distance is 81 miles.

You can also click anywhere on the map to see and listen to nearby artists.   For example, if you click on Shreveport you’ll see something like this:

When you click the ‘Hear here’ button, you’ll get a playlist of the hotttest artists from Shreveport.

Listening to nearby artists is quite fun. There’s potential from some extreme sonic whiplash as you drive near a brutal death metal band and then a pop vocalist from the 1950s

The Technical Bits
To build the app I used the new artist location data from The Echo Nest.  This (still in beta) feature, allows you to retrieve the location of any artist.  Here’s an example API call that retrieves the artist location for Radiohead:

http://developer.echonest.com/api/v4/artist/profile?api_key=N6E4NIOVYMTHNDM8J&name=radiohead&format=json&bucket=artist_location

For this app, I collected the locations for the top 100,000 or so most popular artists in the Rdio catalog.  These artists were from about 15,000 different cities.  I used geopy along with the Yahoo Placefinder geocoder to find the latitude and longitude for each of these cities.  For the mapping and route finding, I used version 3.9 of the Google maps API.   For music playback I used the Rdio Web Playback API.   With the tight integration between the Echo Nest and Rdio ID spaces it was easy to go from a geolocated Echo Nest artist to a list of Rdio track IDs for songs by that artist.

The Bad Bits
As a web app that relies on the flash-based Rdio web player,  Roadtrip Mixtape  is not really a mobile app.  It won’t play music on an iPhone or iPad, so the best way to actually use this app on the road is probably to bring along your tethered laptop.  Not the best user experience.  Thus, my next weekend project will be to learn a little bit of iOS programming a make a version of this app that runs on an iPhone and an iPad.  Stay tuned for the next version.

, , , ,

2 Comments