Posts Tagged playlists

My new superpower – creating Spotify playlists from a web app

labs_echonest_com_CityServer_callback_html_access_token_BQBcbPg0FicOcTQ2Epc5XxGkMNuQPU4LA-ou9LP0lo7qx-4FNd7QlJNXtXziRF04gPtbATfmh9Xe25vJeUVrOQLOrhpQi4La3jT6dEUc7XHD_7iB9oStWBN9PuNGoWB_WKg8goz92CQpYHVM50z_wjY_token_type_Bearer_expires_in_360The new Spotify Web API allows the developer to create and add tracks to a playlist on behalf of a listener. This is a pretty powerful feature, opening the door for a whole range of apps. For instance, this weekend, I added the ability to save a Roadtrip Mixtape playlist, so you can now actually take your mixtapes on the road.   The code is on github if  you are interested in seeing how it is done.

 

, , ,

9 Comments

Top cover songs

I’ve always been a big fan of cover songs. They provide a great way to experience old music in a new way. They can help you discover a new artist or a new genre – by combining the familiar with the novel.  To build the ultimate cover song playlist I used the Smart Playlist Builder to create a playlist of covers that most frequently appear in cover songs playlists. These are the essential covers.  Have a listen:

You can read more about the Smart Playlist Builder and create your own wisdom-of-the-crowds playlists.

,

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

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

The Playlist Survey

 Playlists have long been a big part of the music experience.  But making a good playlist is not always easy.  We can spend lots of time crafting the perfect mix, but more often than not, in this iPod age, we are likely to toss on a pre-made playlist (such as an album),  have the computer generate a playlist (with something like iTunes Genius) or (more likely) we’ll just hit the shuffle button and listen to songs at random.   I pine for the old days when Radio DJs would play well-crafted sets – mixes of old favorites and the newest, undiscovered tracks – connected in interesting ways.  These professionally created playlists magnified the listening experience.   The whole was indeed greater than the sum of its parts.

The tradition of the old-style Radio DJ continues on Internet Radio sites like Radio Paradise. RP founder/DJ Bill Goldsmith says of   Radio Paradise: “Our specialty is taking a diverse assortment of songs and making them flow together in a way that makes sense harmonically, rhythmically, and lyrically — an art that, to us, is the very essence of radio.”  Anyone who has listened to Radio Paradise will come to appreciate the immense value that a professionally curated playlist brings to the listening experience.

I wish I could put Bill Goldsmith in my iPod and have him craft personalized playlists for me  – playlists that make sense harmonically, rhythmically and lyrically, and customized to my music taste,  mood and context . That, of course, will never happen. Instead I’m going to rely on computer algorithms to generate my playlists.  But how good are computer generated playlists? Can a computer really generate playlists as good as Bill Goldsmith,  with his decades of knowledge about good music and his understanding of how to fit songs together?

To help answer this question,  I’ve created a Playlist Survey – that will collect information about the quality of playlists generated by a human expert, a computer algorithm and a random number generator.   The survey presents a set of playlists and the subject rates each playlist in terms of its quality and also tries to guess whether the playlist was created by a human expert, a computer algorithm or was generated at random.

Bill Goldsmith and Radio Paradise have graciously contributed 18 months of historical playlist data from Radio Paradise to serve as the expert playlist data. That’s nearly 50,000 playlists and a quarter million song plays spread over nearly 7,000 different tracks.

The Playlist Survey also servers as a Radio DJ Turing test.  Can a computer algorithm (or a random number generator for that matter) create playlists that people will think are created by a living and breathing music expert?  What will it mean, for instance, if we learn that people really can’t tell the difference between expert playlists and shuffle play?

Ben Fields and I will offer the results of this Playlist when we present Finding a path through the Jukebox – The Playlist Tutorial – at ISMIR 2010 in Utrecth in August. I’ll also follow up with detailed posts about the results here in this blog after the conference.  I invite all of my readers to spend 10 to 15 minutes to take The Playlist Survey.  Your efforts will help researchers better understand what makes a good playlist.

Take the Playlist Survey

, , , , , ,

5 Comments

MOG makes playlists easy

MOG has posted a video demonstrating their new playlist editor for the soon to be released MOG all access.

It looks pretty nifty – lightweight, tag-able, shareable playlists.  It’s nice to see MOG paying attention to playlists.   With millions of songs to chose from, music discovery gets to be a big problem.   Playlists can help with that.   Of course, playlists bring their own discovery problems. How can I discovery new playlists that contain music that I like?   Currently, most sites that support playlists and playlist sharing only provide limited ways for people to discover new playlists. However, as playlists become more ubiquitous, sites like MOG will need to expand the tools for helping people find new and interesting playlists.  Some options for playlist discovery:

  • Search for playlists by tag.  Example: “Find playlists tagged ‘emo’ and ‘christmas'”
  • Search for playlist by artist / track.  Example: “Find playlists that have songs by Deerhoof”
  • Query by example.  Example: “Find playlists that are similar to this playlist”
  • Popularity. Example:  “Play me the most popular playlists” or “Play me the Billboard hot 100″
  • Social discovery.  Example: “What playlists are my friends listening to now?”
  • Expert curated. Example: “Give me the Pitchfork 100 playlist”
  • Machine made.  Example: “Build me a playlist that is similar to this playlist” or “Build me a playlist for tags: ‘emo’, ‘female’, ’90s'”
  • Recommended playlists. Example: “Find me playlists that I will like based upon my music taste and my context (e.g. the time of day).

It’s good to see MOG working hard to make the creation of playlists easy. Next step is to make finding new and interesting playlists easy.

, ,

Leave a comment

Poolcasting: an intelligent technique to customise music programmes for their audience

In preparation for his defense, Claudio Baccigalupo has placed online his thesis: Poolcasting: an intelligent technique to customise music programmes for their audience.  It looks to be an in depth look at playlisting.

Baccigalupo-2009-PhdThesis.pdf (page 38 of 164)

Here’s the abstract:

Poolcasting is an intelligent technique to customise musical sequences for groups of listeners. Poolcasting acts like a disc jockey, determining and delivering songs that satisfy its audience. Satisfying an entire audience is not an easy task, especially when members of the group have heterogeneous preferences and can join and leave the group at different times. The approach of poolcasting consists in selecting songs iteratively, in real time, favouring those members who are less satisfied by the previous songs played.

Poolcasting additionally ensures that the played sequence does not repeat the same songs or artists closely and that pairs of consecutive songs ‘flow’ well one after the other, in a musical sense. Good disc jockeys know from expertise which songs sound well in sequence; poolcasting obtains this knowledge from the analysis of playlists shared on the Web. The more two songs occur closely in playlists, the more poolcasting considers two songs as associated, in accordance with the human experiences expressed through playlists. Combining this knowledge and the music profiles of the listeners, poolcasting autonomously generates sequences that are varied, musically smooth and fairly adapted for a particular audience.

A natural application for poolcasting is automating radio programmes. Many online radios broadcast on each channel a random sequence of songs that is not affected by who is listening. Applying poolcasting can improve radio programmes, playing on each channel a varied, smooth and group-customised musical sequence. The integration of poolcasting into a Web radio has resulted in an innovative system called Poolcasting Web radio. Tens of people have connected to this online radio during one year providing first-hand evaluation of its social features. A set of experiments have been executed to evaluate how much the size of the group and its musical homogeneity affect the performance of the poolcasting technique.

I’m quite interested in this topic so it looks like my reading list is set for the week.

, ,

Leave a comment

The Stairway Detector

Last night I was watching the pilot for Glee (a snarky TV version of High school musical) with my 3 teenage daughters.  I was surprised to hear the soundtrack filled with songs by the band Journey, songs that  brought me back to my own high school years.   The thing that I like the most about Journey is that many of their songs have this slow and gradual build up over the course of the whole song  as in this song Lovin Touchin Squeezin:

A number of my favorite songs have this slow build up. The canonical example is Zep’s ‘Stairway to Heaven’ – it starts with a slow acoustic guitar and over the course of 8 minutes builds to metal frenzy.    I thought it would be fun to see if I could write a bit of software that could find the songs that have the same arc as ‘Stairway to Heaven’ or ‘Lovin, Touchin Squeezin’  – songs that have this slow build. With this ‘stairway detector’  I could build playlists filled with the songs that fire me up.

The obvious place to start with is to look how the loudness of a song changes overtime. To do this I used the Echo Nest developer API to extract the loudness as a function of time for  Journey’s Lovin, Touchin Squeezin:

louness-journey-no-avgIn this plot the light green curve is the loudness, while the blue line is a windowed average of the loudness.  This plot shows a nice rise in the volume over the course of the song.   Compared to a song like the Beatles ‘Ticket to Ride’ that doesn’t have this upward slope:

loudness-ticket-to-ridFrom these two examples, it is pretty clear that we can build our stairway-detector just by looking at the average slope of the volume. The higher the slope, the bigger the build.  Now, I suspect that there’s lots of ways to find the average slope of a bumpy line – but I like to always try the simplest thing that could possibly work first – and for me the simplest thing was to just divide the average loudness of the second half of the song by the average loudness of the first half of the song.   So for example, with the Journey song the average loudness of the second half of the song is -15.86 db and the average of the first half of the song is -24.37 db.  This gives us a ratio of 1.54, while ‘Ticket to ride’ gets a ratio of 1.06.  Here’s the Journey song with averages shown:

loudness-for-journeyHere are a few more songs that fit the ‘slow build’ profile:

stairway-to-heaven‘Stairway to Heaven’ has a score of 1.6 so it has a bigger build than Journey’s Lovin’.

loudness-for-bridge-over-troubled-waterSimon and Garfunkle’s ‘Bridge over troubled water’ has an even bigger build with a score of 1.7.

Also sprach ZarathustraAlso sprach Zarathustra has a more modest score of  1.56

With this new found metric I analyzed a few thousand of the tracks in my personal collection to find the songs with the biggest crescendos.  The biggest of all was this song by Muse with a whopping score of  3.07:

loudness-for-muse-take-a-bowAnother find is Arcade Fire’s “My Body is a Cage” with a  score of 2.32.

loudness-for-my-body-is-a-cage

The metric isn’t perfect. For instance, I would have expected Postal Services ‘Natural Anthem’ to have a high score because it has such a great build up, but it only gets a score of 1.19. Looking at the plot we can see why:

loudness-for-postal-service-natural-anthemAfter the initial build up, there’s a drop an energy for that last quarter of the song, so even though the song has a sustained crescendo for 3 minutes it doesn’t get a high score due to this drop.

Of course, we can use this ratio to find tracks that go the other way, to find songs that gradually wind down. These seem to occur less frequently than the songs that build up.  One example is Neutral Milk Hotel’s Two Headed Boy:

loudness-for-two-headed-boy

Despite the fact that I’m using a very naive metric to find the loudness slope,  this stairway detector is pretty effective in finding songs that have that slow build.   It’s another tool that I can use for helping to build interesting playlists.  This is one of the really cool things about how the Echo Nest approaches music playlisting.   By having an understanding of what the music actually sounds like,  we can build much more interesting playlists than you get from genius-style playlists that only take into account  artists co-occurrence.

, , ,

1 Comment

Artist radio in 10 lines of code

Last week we released Pyechonest, a Python library for the Echo Nest API.  Pyechonest gives the Python programmer access to the entire Echo Nest API including artist and track level methods.  Now after 9 years working at Sun Microsystems, I am a diehard Java programmer, but I must say that I really enjoy the nimbleness and expressiveness of Python.  It’s fun to write little Python programs that do the exact same thing as big Java programs.  For example, I wrote an artist radio program in Python that, given a seed artist, generates a playlist of tracks by wandering around the artists in the neighborhood of the seed artists and gathering audio tracks.   With Pyechonest, the core logic is 10 lines of code:

def wander(band, max=10):
   played = []
   while max:
     if band.audio():
         audio = random.choice(band.audio())
         if audio['url'] not in played:
             play(audio)
             played.append(audio['url'])
             max -= 1
     band = random.choice(band.similar())

(You can see/grab the full code with all the boiler plate in the SVN repository)

This method takes a seed artist (band) and selects a random track from set of audio that The Echo Nest has found on the web for that artist, and if we haven’t already played it, then do so. Then we select a near neighbor to the seed artist and do it all again until we’ve  played the desired number of songs.

For such a simple bit of code, the playlists generated are surprisingly good..Here are a few examples:

Seed Artist:  Led Zeppelin:

(I think the Dale Hawkins version of Susie-Q after  CCR’s Fortunate Son  is just brilliant)

Seed Artist: The Decemberists:

(Note that audio for these examples is audio found on the web – and just like anything on the web the audio could go away at any time)

I think these artist-radio style playlists rival just about anything you can find on current Internet radio sites – which ain’t to0 bad for 10 lines of code.

, , , , , ,

9 Comments

The Beat that follows your feet

There’s a new application in the Echo Nest developer showcase called SynchStep.  SynchStep is an iPhone/iTouch application (currently only for jailbroken devices) that automatically synchronizes the music to your walking or running pace.   SynchStep uses the Echo Nest Analyze API to extract the tempo for each song in your collection and when you are out for a walk or a run it will pick a song that matches your tempo.

I’ve seen a few academic systems that do this sort of thing.  For instance, at last year’s ISMIR there was a paper called  Development of an automatic music selection system based on runner’s step frequency that described a similar system. But SynchStep is the first system I’ve seen that is available to the general public  on a popular platform like the iPhone.

SynchStep is a great example of a context-sensitive playlister.   Instead of a list of songs selected via a random number generator, or via  a DJ sitting in some dark, smoke-filled sound booth you get a playlist that matches what you are doing.  I think we are going to see more attention paid to context-sensitive playlists:  ‘Music for the root canal’, ‘Music that synchronizes with my windshield wipers’,  ‘music for that first date with that girl who you think may be kind of emo’, and so on.    To make these kind of playlists, the playlist generators will have to know what you are doing, and they’ll have to know what the music sounds like.  Platforms like the iPhone already provides lots of context – the iPhone knows where you are,  what time it is, it can hear you, it can see you, it can feel you move,  it knows that the emo girl just sent you a  ‘dear john’ IM,  it can even hear your heartbeat.     Signal processing and music analysis provides the other piece of the puzzle – knowing what the music sounds like.   Just like SynchStep picks a track with a tempo that matches your pace, these next generation, context-aware playlisters will select music that fits the context.   So when that kind-of-emo girl dumps you, your iPhone will know about it and will try to cheer you up with a little Katrina & The Waves.  This song has super powers,  it can even make the emo boys happy.

, , ,

2 Comments

Follow

Get every new post delivered to your Inbox.

Join 1,005 other followers