Archive for category Music

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

http://www.rdio.com/people/plamere/playlists/5773579/Top_best_running_songs_via_SPB/

Coding

http://www.rdio.com/people/plamere/playlists/5773559/Top_coding_songs_via_SPB/

Sad Love Songs

http://www.rdio.com/people/plamere/playlists/5773508/Top_sad_love_songs_songs_via_SPB/

Chillout

http://www.rdio.com/people/plamere/playlists/5773867/Top_chillout_songs_via_SPB/

Date Night

http://www.rdio.com/people/plamere/playlists/5773474/Top_date_night_songs_via_SPB/

Sexy Time

http://www.rdio.com/people/plamere/playlists/5773535/Top_sexytime_songs_via_SPB/

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

http://www.rdio.com/people/plamere/playlists/5773544/Top_country_songs_via_SPB/

Post Rock

http://www.rdio.com/people/plamere/playlists/5773642/Top_post_rock_songs_via_SPB/

Weezer

http://www.rdio.com/people/plamere/playlists/5773606/Top_weezer_songs_via_SPB/

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

The Most Replayed Songs

rocklobsterI still remember the evening well. It was midnight during the summer of 1982.  I was living in a thin-walled apartment, trying unsuccessfully to go to sleep while the people who lived upstairs were music bingeing on The B52’s Rock Lobster.  They listened to the song continuously on repeat for hours, giving me the chance to ponder the rich world of undersea life, filled with manta rays, narwhals and dogfish.

We tend to binge on things we like – potato chips, Ben & Jerry’s, and Battlestar Galactica. Music is no exception. Sometimes we like a song so much, that as soon as it’s over, we want to hear it again. But not all songs are equally replayable.  There are some songs that have some secret mysterious ingredients that makes us want to listen to the song over and over again. What are these most replayed songs? Let’s look at some data to find out.

The Data – For this experiment I used a week’s worth of song play data from the summer of 2013 that consists of user / song /  play-timestamp triples.  This data set has on the order of 100 million of these triples for about a half million unique users and 5 million unique songs.  To find replays I looked for consecutive plays by a user of song within a time window (to ensure that the replays are in the same listening session). Songs with low numbers of plays or fans were filtered out.

For starters, I simply counted up the most replayed songs. As expected, this yields very boring results – the list of the top most replayed songs is exactly the same as the most played songs.  No surprise here.  The most played songs are also the most replayed songs.

Top Most Replayed Songs  – (A boring result)

  1. Robin Thicke — Blurred Lines featuring T.I., Pharrell
  2. Jay-Z — Holy Grail featuring Justin Timberlake
  3. Miley Cyrus — We Can’t Stop
  4. Imagine Dragons — Radioactive
  5. Macklemore — Can’t Hold Us (feat. Ray Dalton)

To make this more interesting,  instead of looking at the absolute number of replays, I adjusted for popularity by looking at the ratio of replays to the total number of plays for each song. This replay ratio tells us the what percentage of plays of a song are replays. If we plot the replay ratio vs. the number of fans a song has the outliers become quite clear. Some songs are replayed at a higher rate than others.

click to open an interactive version of this chart.

I made an interactive version of this graph, you can mouse over the songs to see what they are and click on the songs to listen to them.

Sorting the results by the replay ratio yields a much more interesting result.  It surfaces up a few classes of frequently replayed songs: background noise,  children’s music,  soft and smooth pop and friday night party music.  Here’s the color coded list of the top 20:

Top Replayed songs by percentage

  1. 91% replays   White Noise For Baby Sleep — Ocean Waves
  2. 86% replays   Eric West — Reckless (From Playing for Keeps)
  3. 86% replays   Soundtracks For The Masters — Les Contes D’hoffmann: Barcarole
  4. 83% replays   White Noise For Baby Sleep — Warm Rain
  5. 83% replays   Rain Sounds — Relax Ocean Waves
  6. 82% replays   Dennis Wilson — Friday Night
  7. 81% replays   Sleep — Ocean Waves for Sleep – White Noise
  8. 74% replays   White Noise Sleep Relaxation White Noise Relaxation: Ocean Waves 7hz
  9. 74% replays   Ween — Ocean Man
  10. 73% replays   Children’s Songs Music — Whole World In His Hands
  11. 71% replays   Glee Cast — Friday (Glee Cast Version)
  12. 63% replays   Rain Sounds — Rain On the Window
  13. 63% replays   Rihanna — Cheers (Drink To That)
  14. 60% replays   Group 1 Crew — He Said (feat. Chris August)
  15. 59% replays   Karsten Glück Simone Sommerland — Schlaflied für Anne
  16. 56% replays   Monica — With You
  17. 54% replays   Jessie Ware — Wildest Moments
  18. 53% replays   Tim McGraw — I Like It, I Love It
  19. 53% replays   Rain Sounds — Morning Rain In Sedona
  20. 52% replays   Rain Sounds — Rain Sounds

It is no surprise that the list is dominated by background noise. There’s nothing like ambient ocean waves or rain sounds to help baby go to sleep in the noisy city. A five minute track of ambient white noise may be played dozens of times during every nap. It is not uncommon to find 8 hour long stretches of the same five minute white noise audio track played on auto repeat.

The top most replayed song is Reckless  by Eric West from the ‘shamelessly sentimental’ 2012 movie Playing for Keeps (4% rotten).  86% of the time this song is played it is a replay. This is the song that you can’t listen to just once. It is the Lays potato chip of music. Beware, if you listen to it, you may be caught in its web and you’ll never be able to escape. Listen at your own risk:

Luckily, most people don’t listen to this song even once. It is only part of the regular listening rotation of a couple hundred listeners. Still, it points to a pattern that we’ll see more of – overly sentimental music has high replay value.

Top Replayed Popular Songs
Perhaps even more interesting is to look at the top most replayed popular songs.  We can do this by restricting the songs in the results to those that are by artists that have a significant fan base:

  1. 31% replays   Miley Cyrus — The Climb
  2. 16% replays   August Alsina — I Luv This sh*t featuring Trinidad James
  3. 15% replays   Brad Paisley — Whiskey Lullaby
  4. 14% replays   Tamar Braxton — The One
  5. 14% replays   Chris Brown — Love More
  6. 14% replays   Anna Kendrick — Cups (Pitch Perfect’s “When I’m Gone”)
  7. 13% replays   Avenged Sevenfold — Hail to the King
  8. 13% replays   Jay-Z — Big Pimpin’
  9. 13% replays   Labrinth — Beneath Your Beautiful
  10. 13% replays   Karmin — Acapella
  11. 12% replays   Lana Del Rey — Summertime Sadness [Lana Del Rey vs. Cedric Gervais]
  12. 12% replays   MGMT — Electric Feel
  13. 12% replays   One Direction — Best Song Ever
  14. 12% replays   Big Sean — Beware featuring Lil Wayne, Jhené Aiko
  15. 12% replays   Chris Brown — Don’t Think They Know
  16. 11% replays   Justin Bieber — Boyfriend
  17. 11% replays   Avicii — Wake Me Up
  18. 11% replays   2 Chainz — Feds Watching featuring Pharrell
  19. 10% replays   Paramore — Still Into You
  20. 10% replays   Alicia Keys — Fire We Make
  21. 10% replays   Lorde — Royals
  22. 10% replays   Miley Cyrus — We Can’t Stop
  23. 10% replays   Ciara — Body Party
  24.   9% replays   Marc Anthony — Vivir Mi Vida
  25.   9% replays   Ellie Goulding — Burn
  26.   9% replays   Fantasia — Without Me
  27.   9% replays   Rich Homie Quan — Type of Way
  28.   9% replays   The Weeknd — Wicked Games (Explicit)
  29.   9% replays   A$AP Ferg — Work REMIX
  30.   9% replays   Jay-Z  — Part II (On The Run) featuring Beyoncé

It is hard to believe, but the data doesn’t lie – More than 30% of the time after someone listens to Miley Cyrus’s The Climb they listen to it again right away –  proving that there is indeed always going to be another mountain that you are going to need to climb.  Miley Cyrus is well represented – her aptly named song We can’t Stop is the most replayed song of the top ten most popular songs.

Here are the top 30 most replayed popular songs in Spotify and Rdio playlists for you to enjoy, but I’m sure you’ll never get to the end of the playlist, you’ll just get stuck repeating The Best Song Ever or Boyfriend forever.

Here’s the Rdio version of the Top 30 Most Replayed popular songs:

http://www.rdio.com/people/plamere/playlists/5733386/Most_replayed/

Most Manually Replayed
More than once I’ve come back from lunch to find that I left my music player on auto repeat and it has played the last song 20 times while I was away.  The song was playing, but no one was listening. It is more interesting to find songs replays in which the replay is manually initiated. These are the songs that grabbed the attention of the listener enough to make them interact with their player and actually queue the song up again.   We can find manually replayed songs by looking at replay timestamps. Replays generated by autorepeat will have a very regular timestamp delta, while manual replay timestamps will have more random delta between timestamps.

Here are the top manually replayed songs:  

  1. Body Party by Ciara
  2. Still Into You by Paramore
  3. Tapout featuring Lil Wayne, Birdman, Mack Maine, Nicki Minaj, Future by Rich Gang
  4. Part II (On The Run) featuring Beyoncé by Jay-Z
  5. Feds Watching featuring Pharrell by 2 Chainz
  6. Royals by Lorde
  7. V.S.O.P. by K. Michelle
  8. Just Give Me A Reason by Pink
  9. Don’t Think They Know by Chris Brown
  10. Wake Me Up by Avicii

There’s an Rdio playlist of these songs: Most Manually Replayed

So what?
Why do we care which songs are most replayed?  It’s part of our never ending goal to try to better understand how people interact with music.  For instance, recognizing when music is being used in a context like helping the baby go to sleep is important – without taking this context into account, the thousands of plays of Ocean Waves and Warn Rain would dominate the taste profile that we build for that new mom and dad. We want to make sure that when that mom and dad are ready to listen to music, we can recommend something besides white noise.

Looking at replays can help us identify new artists for certain audiences. For instance, parents looking for an alternative to Miley Cyrus for their pre-teen playlists after Miley’s recent VMA performance, may look to an artist like Fifth Harmony. Their song Miss Movin’ On has similar replay statistics to the classic Miley songs:

http://www.rdio.com/artist/Fifth_Harmony/album/Miss_Movin%27_On/track/Miss_Movin%27_On/

Finally, looking at replays is another tool to help us understand the music that people really like. If the neighbors play Rock Lobster 20 times in a row, you can be sure that they really, really like that song.   (And despite, or perhaps because of, that night 30 years ago, I like the song too). You should give it a listen, or two…

http://www.rdio.com/artist/The_B-52%27s/album/Rock_Lobster_/_6060-842_(Digital_45)/track/Rock_Lobster/

, , ,

Leave a comment

Beyond the Play Button – My SXSW Proposal

It is SXSW Panel Picker season.   I’ve submitted a talk to both SXSW Interactive and SXSW Music.  The talk is called ‘Beyond the Play Button – the Future of Listening’ – the goal of the talk is to explore new interfaces for music listening, discovery and interaction.  I’ll show a bunch of my hacks and some nifty stuff I’ve been building in the lab. Here’s the illustrated abstract:

35 years after the first Sony Walkman shipped, today’s music player still has essentially the same set of controls as that original portable music player. Even though today’s music player might have a million times more music than the cassette player, the interface to all of that music has changed very little.

 

In this talk we’ll explore new ways that a music listener can interact with their music. First we will explore the near future where your music player knows so much about you, your music taste and your current context that it plays the right music for you all the time. No UI is needed.

Next, we’ll explore a future where music listening is no longer a passive experience. Instead of just pressing the play button and passively listening you will be able to jump in and interact with the music. Make your favorite song last forever, add your favorite drummer to that Adele track or unleash your inner Skrillex and take total control of your favorite track.

If this talk looks interesting to you (and if you are a regular reader of my blog, it probably is), and you are going to SXSW, consider voting for the talk via the SXSW Panel Picker:

Leave a comment

One Minute Radio

If you’ve got a short attention span when it comes to new music, you may be interested in One Minute Radio. One Minute Radio is a Pandora-style radio app with the twist that it only every plays songs that are less than a minute long.  Select a  genre and you’ll get a playlist of very short songs.

One_Minute_Radio-2

Now I can’t testify that you’ll always get a great sounding playlist – you’ll hear  intros, false starts and novelty songs throughout, but it is certainly interesting.  And some genres are chock full of good short songs, like punk, speed metal, thrash metal and, surprisingly, even classical.

OMR was inspired by a conversation with Glenn about the best default for song duration filters in our playlisting API.  Check out One Minute Radio. The source is on github too.

, ,

2 Comments

The Saddest Stylophone – my #wowhack2 hack

Last week, I ventured to Gothenburg Sweden to participate in the Way Out West Hack 2   – a music-oriented hackathon associated with the Way Out West Music Festival.

wowhack-sign

I was, of course, representing and supporting The Echo Nest API during the hack, but I also put together my own Echo Nest-based hack: The Saddest Stylophone. The hack creates an auto accompaniment  for just about any song played on the Stylophone – an analog synthesizer toy created in the 60s that you play with a stylus.

Two hacking pivots on the way … The road to the Saddest Stylophone was by no means a straight line.  In fact, when I arrived at #wowhack2  I had in mind a very different hack – but after the first hour at the hackathon it became clear that the WIFI at the event was going to be sketchy at best, and it was going to be very slow going for any hack (including the hack I had planned) that was going to need zippy access to to the web, and so after an hour I shelved that idea for another hack day. The next idea was to see if I could use the Echo Nest analysis data to convert any song to an 8-bit chiptune version.  chiptunesThis is not new ground, Brian McFee had a go at this back at the 2012 MIT Music Hack Day. I thought it would be interesting to try a different approach and use an off-the-shelf 8bit software synth and the Echo Nest pitch data.   My intention was to use a Javascript sound engine called jsfx to generate the audio.  It seemed like it pretty straightforward way to create authentic 8bit sounds.  In small doses jsfx worked great, but when I started to create sequences of overlapping sounds my browser would crash.  Every time.  After spending a few hours trying to figure out a way to get jsfx to work reliably, I had to abandon jsfx.  It just wasn’t designed to generate lots of short overlapping and simultaneous sounds, and so I spent some time looking for another synthesizer.  I  finally settled on timbre.js.  Timbre.js seemed like a fully featured synth. Anyone with a Csound backgroundcsound would be comfortable with creating sounds with Timbre.js  It did not take long before I was generating tones that were tracking the melody and chord changes of a song.  My plan was to create a set of tone generators, and dynamically control the dynamics envelope based upon the Echo Nest segment data.  This is when I hit my next roadblock. The timbre.js docs are pretty good, but I just couldn’t find out how to dynamically adjust parameters such as the ADSR table.  I’m sure there’s a way to do it, but  when there’s only 12 hours left in a 24 hour hackathon, the  two hours spent looking through JS library source seemed like forever, and I began to think that I’d not figure out how to get fine grained control over the synth.   I was pretty happy with how well I was able to track a song and play along with it, but without ADSR control or even simple control over dynamics the output sounded pretty crappy. In fact I hadn’t heard anything that sounded so bad since I heard @skattyadz adamplay a tune on his Stylophone at the Midem Music Hack Day earlier this year.   That thought turned out to be the best observation I had during the hackathon. I could hide all of my troubles trying to get a good sounding output by declaring that my hack was a Stylophone simulator. Just like a Stylophone, my app would not be capable of playing multiple tones at once, it would not have complex changes in dynamics, it would only have a one and half octave range,  it would not even have a pleasing tone.  All I’d need to do would be to convincingly track a melody or harmonic line in a song and I’d be successful. And so, after my third pivot, I finally had a hack that I felt I’d be able to finish in time for the demo session and not embarrass myself.  I was quite pleased with the results.

The_Saddest_Stylophone_plays_Karma_Police_by_Radiohead

How does it work?  The Sad Stylophone takes advantage of the Echo Nest detailed analysis.  The analysis provides detailed information about a song. It includes information about where all the bars and beats are, and includes a very detailed map of the segments of a song. Segments are typically small, somewhat homogenous audio snippets in a song, corresponding to musical events (like a strummed chord on the guitar or a brass hit from the band).

A single segment contains detailed information on the pitch, timbre, loudness.  For pitch it contains a vector of 12 floating point values that correspond to the amount of energy at each of the notes in the 12-note western scale.  Here’s a graphic representation of a single segment:

The_Saddest_Stylophone_playsStairway_to_Heaven_by_Led_Zeppelin

 

This graphic shows the pitch vector, the timbre vector, the loudness, confidence and duration of a segment.

The Saddest Stylophone only uses the pitch, duration and confidence data from each segment. First, it filters segments to combine short, low confidence segments with higher confidence segments. Next it filters out segments that don’t have a predominant frequency component in the pitch vector. Then for each surviving segment, it picks the strongest of the 12 pitch bins and maps that pitch to a note on the Stylophone.  Since the Stylophone supports an octave and a half (20 notes), we need to map 12 notes onto 20 notes. We do this by unfolding the 12 bins by reducing inter-note jumps to less than half an octave when possible.  For example, if between segment one and segment two we would jump 8 notes higher, we instead check to see if it would be possible to jump to 4 notes lower instead (which would be an octave lower than segment two) while still remaining within the Stylophone range.  If so, we replace the upward long jump with the downward, shorter jump.  The result of this a list of notes and timings mapped on to the 20 notes of the Stylophone.  We then map the note onto the proper frequency and key position – the rest is just playing the note via timbre.js at the proper time in sync with the original audio track  and animating the stylus using Raphael.

I’ve upgraded the app to include an Under the hood selection that, when clicked opens up a visualization that shows the detailed info for a segment, so you can follow along and see how each segment is mapped onto a note.  You can interact with visualization, stepping through the segments, and auditioning and visualizing them.

The_Saddest_Stylophone_plays_Africa_by_Toto

That’t the story of the Saddest Stylophone – it was not the hack I thought I was going to make when I got to #wowhack – but I was pleased with the result, when The Sad Stylophone plays well, it really can make any song sound sadder and more pathetic. Its a win.  I’m not the only one – wired.co.uk listed it as one of the five best hacks at the hackathon.

Give it a try at Saddest Stylophone.

 

, , ,

Leave a comment

Cyborg Karaoke Party

Home-2

Another innovative hack built at the Toronto Music Hack Day is the Cyborg Karaoke Party developed by Cameron Gorrie, George Cheng, Kyle Barnhart, Dmitry Arkhipov and Marc Palermo.  This hack combines timestamped lyrics from Lyricfind with Rdio Karaoke tracks and a speech synthesizer to give you automatic robot karaoke. Its a neat idea. Perfect music to put on for your Roomba before you leave for work for the day.

1 Comment

Maestro

Maestro is a hack built at  Music Hack Day Toronto.  It allows you to ‘conduct’ your music by waving your iPhone around like a conductor waves their baton.  You can speed up and slow down your music at will.  Here’s the demo:

 

[youtube http://www.youtube.com/watch?v=Q8NYaKTJZR0#t=0m46s]

The hack was created by Wen-Hao Lue and Peter Sobot.

Leave a comment

FRANKENMASHER 2000

Brian McFee brought the heavy lifting to the Toronto Music Hack Day. His goal  – to see what it would sound like if Billie Holiday sang for Black Sabbath or if Kenny G and The Jesus Lizard formed a supergroup.  To do this he built the FRANKENMASHER 2000.   This program uses some heavy math to separate the vocals from one song and the instrumentation of another to combine them into what he calls a ‘horrible abomination of sonic torture’.  Here are some examples:

Brian has a blog post that describes a bit of the math involved and has more examples.  If you are into MIR, Brian’s the guy to keep an eye on. He’s doing interesting things.

Leave a comment

Remixes on Soundcloud

This cool hack created at the Toronto Music Hack Day by Devin Sevilla from Rdio looks at what you are currently playing in Rdio (using the Rdio ‘now playing’ API) and then finds all the remixes of that song that have been posted to to Soundcloud.  It is a fantastic idea and works great. I really had no idea how many remixes are posted to to Soundcloud.  For instance, check out this orchestral version of Skrillex’s First of the Year.

Remix_Search-2

A really cool hack.  Check out Remixes on Soundcloud

Leave a comment

The Music Radiator

The_Music_Radiator

I didn’t make it to the Toronto Music Hack Day, but I’ve heard great things about the event. One hack, built by Ned Lovely is getting lots of attention. It is called Music Radiator.  It gives you spot-on genre playlists with a very slick user interface.  Pick one of hundreds of genres and just let the music flow. If you give a song a ‘thumbs up’ it will be added to your Rdio collection, give it a ‘thumbs down’ and you’ll never hear it again (well, at least never again on The Music Radiator).  Ned has a great sense of design, and the music and the music flows well. I may use this app as my primary way to listen to music when on the web.  Check it out.

Leave a comment