I'm the Director of Developer Community at The Echo Nest, a research-focused music intelligence startup that provides music information services to developers and partners through a data mining and machine listening platform. I am especially interested in hybrid music recommenders and using visualizations to aid music discovery.

Smarter Playlists alpha v2 coming soon

I’m getting close to releasing the next version of Smarter Playlists.  This will be a big update with all sorts of new features.  Big tent features are:

Ability to schedule when your programs run. – You’ll be able to schedule your programs to run at a pre-determined time and period.

2015-08-17 at 6.43 AM

Improved system for sharing, publishing and importing Smarter Playlist Programs:

2015-08-17 at 6.45 AM

Improved program management UI:

2015-08-17 at 6.50 AM Some new components including:

  • separate artists – minimizes the number of adjacent songs by the same artist
  • mix in – flexibly mix two input streams
  • personalized sources – my saved tracks produces a list of the current user’s saved tracks

Under the hood, there are huge changes – programs are no longer saved in the browser, but instead are saved on the server. The authentication model has been upgraded to use the 3-factor version. This will allow me to run programs on the server side and have them update your playlists on your behalf. An essential capability for scheduling.

All these changes mean that your Smarter Playlists V1 programs will no longer work with Smarter Playlists V2.  You’ll have to re-create them in V2.

I’ve received lots of feedback from folks using Smarter Playlists V1 – and will work to incorporate all the suggested features, improvements and bug fixes too. Thanks, all, and keep the feedback coming.

Look for the alpha v2 release within the next week or so.


Smarter Playlists

I’ve just pushed out an early alpha version of Smarter Playlists, my summer spare-time project. Smarter Playlists is a playlist builder that lets you create new interesting playlists by combining sources of tracks (like albums, artists, other playlists) and filtering, sorting and re-arranging these tracks into a playlist. For example. Here’s a simple playlist that combines two Spotify playlists: Morning Commute and Your favorite Coffee house into a single new playlist:




Here’s a more complex example that starts with a Gothic Metal playlist and mixes in the top tracks from the band Ravenscry into the first songs in the playlist.



This is still very much an alpha version, so there are likely to be a bug or two – but give it a go if you are so inclined.

Check it out at Smarter Playlists


Wicked smart playlists

Over the past few weekends I’ve been working on a little side project called the Playlist Builder Library (or PBL for short). The Playlist Builder Library is a Python library for creating and manipulating playlists. It’s sort of like remix for playlists. With PBL you can take songs from playlists, albums, artists, genres and flexibly combined them,  rearrange them, filter them and sort them into new playlists.

For example, here’s a PBL program that creates radio station of today’s top hits but guarantees that every 4th song is either by Sia or Katy Perry:

Here’s the resulting playlist:

That’s 5 lines a code to create a non-trivial playlist.

PBL supports all sorts of sources for tracks such as Spotify playlists, top tracks from artists,  albums, genres, the extremely flexible and powerful Echo Nest playlisting API. These sources can be manipulated in all sorts of interesting ways.  Here are a couple more examples:

You can filter all the songs in ‘Your favorite coffeehouse’ to get just the lowest energy songs:

coffee = PlaylistSource('coffeehouse', ucoffee_house) 
low_energy_coffee = AttributeRangeFilter(coffee, '', max_val=.5)

You an combine your favorite playlists in a single one:

playlist_names = ['Your Favorite Coffeehouse', 'Acoustic Summer','Acoustic Covers', 'Rainy Day']
all = DeDup(Alternate([Sample(PlaylistSource(n), 10) for n in playlist_names]))

Even sophisticated tasks are really easy. For instance, imagine dad is on a roadtrip with daughter. They agree to alternate between dad’s music and daughter’s music. Dad is selfish, so he makes a playlist that alternates the longest cool jazz tracks with the shortest teen party playlists with this 3 line script:

teen_party = First(Sorter(PlaylistSource('Teen Party'), 'duration'), 10) 

jazz_classics = Last(Sorter(PlaylistSource('Jazz Classics'), 'duration'), 10) 

both = Alternate([teen_party, Reverse(jazz_classics)])

Here’s the result

Note that the average duration of Teen Party songs is much less than 3 minutes, while the average duration of Jazz Classics is above 6 minutes. Selfish dad gets to listen to his music twice as long with this jazz-skewing playlist.

There’s a whole lot of nifty things that can be done with PBL.  If you are a Python programmer with an itch for creating new playlists check it out.  The docs are online at and the source is at

PBL is pretty modular so it is easy to add new sources and manipulators, so if you have an idea or two for changes let me know or just send me a pull request.

, ,

1 Comment

The Drop Machine

I spent last weekend in Cannes, participating in the MIDEM Hack Day – an event where music hackers from around the globe gather to hack on music. My hack is called The Drop Machine.  It is a toy web app that plays nothing but the drops.  Here’s a video demo of it:

The interesting bit in this hack is how The Drop Machine finds the drops.  I’ve tried a number of different ways to find the drops in the past – for instance, the app Where’s the Drama found the most dramatic bits of music based on changes in music dynamics. This did a pretty good job of finding the epic builds in certain kinds of music, but it wasn’t a very reliable drop detector. The Drop Machine takes a very different approach – it crowd sources the finding of the drop. And it turns out, the crowd knows exactly where the drop is.  So how do we crowd source finding the drop? Well, every time you scrub your music player to play a particular bit of music on Spotify, that scrubbing is anonymously logged. If you scrub to the chorus or the guitar solo or the epic drop, it is noted in the logs. When one person scrubs to a particular point in a song, we learn a tiny bit about how that person feels about that part of the song – perhaps they like it more than the part that they are skipping over  – or perhaps they are trying to learn the lyrics or the guitar fingering for that part of the song. Who’s to say? On an individual level, this data wouldn’t mean much. The cool part comes from the anonymous aggregate behavior of millions of listeners, from which a really detailed map of the song emerges.  People scrub to just before the best parts of the song to listen to them.  Let’s take a look at a few examples.

For starters here’s a plot that shows the most listened to part of the song In the Air Tonight by Phil Collins based upon scrubbing behavior:

2015-06-09 at 6.58 AM

The prominent peak at 3:40 is the point when the drums come in.  Based upon scrubbing behavior alone, we are able to find arguably the most interesting bit of that song.

Here’s another example – Whole Lotta Love by Led Zeppelin:

2015-06-09 at 7.02 AM

The trough at 1:40 corresponds to the psychedelic bits while the peak at 3:20 is the guitar solo. Again, by looking at scrubbing behavior we get a really good indication of what parts of a song listeners enjoy the most.

When we look at scrubbing behavior for dance music, especially dubstep and brostep, we see a very characteristic strong peak, usually at around a minute into the song. This is invariably ‘the drop’. Here are some examples:

2015-06-09 at 7.05 AM




2015-06-09 at 7.08 AM




2015-06-09 at 7.09 AM

The scrubbing behavior not only shows us where the drop is, but it also shows us how intense the drop is – drops with lots of appeal get lots of attention (and lots of scrubs) while songs with milder drops get less attention. Here’s a milder drop by Skrillex:



2015-06-09 at 7.14 AM

Compare that to the much more intense drop:

2015-06-09 at 7.15 AM

Songs with more intense drops have more prominent scrubbing and listening peaks at the drop than others.  The Drop Machine uses the prominence of the peak at the drop to find the songs with the most intense drops.

Putting it all together, the Drop Machine searches through the most popular dance, dubstep and brostep tracks and finds the ones with the most prominent listening peaks based upon scrubbing behavior. It then surfaces these tracks into a playlist, and then plays 10 seconds of each track centered around the drop. The result is non-stop drop. Add in a bit of animation synchronized to the music and that’s the Drop Machine.

Currently, the Drop Machine is an internal-use only hack, I’m working on making a public version, so hopefully the world won’t have to wait too long before you all can listen to the Drop Machine.



The Fresh 40

Every week, thousands of artists release albums on Spotify.  Sifting through all this new music to find good stuff to listen to can be hard. Luckily, there are lots of tools from New Music Tuesday playlists to the Spotify Viral 50 to help us find the needles in the proverbial haystack of new music. However, most of these tools tend to surface up new music by artists that have been around for a while. For instance, the top artist on Spotify Viral 50 as I write this is Jeremih who has been on the charts for five years. The top of New Music Tuesday right now is Mumford & Sons who’ve been recording for at least eight years.

I’m interested in finding music by the freshest artists – artists that are at the very beginning of their recording careers. To that end, I’ve built a new chart called ‘The Fresh 40’ that shows the top albums by the freshest artists. To build The Fresh 40 I scour through all of the albums that have been released in the last two weeks on Spotify (on average that’s about 30 thousand albums), and find the albums that are the very first album release for its artist. I then rank each album by a weighted combination of the number of followers the artist has on Spotify and the popularity of the artist and album (which is related to Spotify track plays). The result is a chart of the top 40 most popular fresh artists.

2015-04-27 at 7.50 AM

The Fresh 40 updates every day and shows all the salient info including the rank, yesterday’s rank, the overall score, artist followers, artist popularity, album popularity and the number of days that the album has been on the chart. Since an album can only be on the chart for 15 days, there’s quite a bit of change from day to day.

If you are interested in finding music by the very newest artists on Spotify, you might be interested in The Fresh 40. Give the chart a look.

The Fresh 40 was built on top of the increasingly marvelous Spotify Web API.  Code is on github.

, , , , , , ,


Fresh Faces on Spotify

My weekend programming project this week was to explore a new feature of the Spotify Web API that allows you to find albums that have been released in the last two weeks. The result is a web app called Fresh Faces.  This app goes through all of the recent releases and finds those that are the very first release for the artist. If you are looking for new music, there’s no fresher place to start than this app – it finds the newest music by the freshest artists – artists that are barely two weeks into their recording career.

2015-04-26 at 11.40 AM Fresh Faces lets you sort the results based on artist popularity, album popularity, artist followers or release date. You can click on an album to hear a sample, find more info about the album or open it on Spotify.

How many new releases are there?

I was curious about how many releases there are in a two week period, and when releases tend to happen, so I added a chart at the bottom of the Fresh Faces app that shows the distribution of fresh and recurring releases and the dates when releases happen.  You can see that the shift of releasing music from Tuesday to Friday is ongoing.

2015-04-26 at 11.45 AM

In the past two weeks about 32,000 albums have been released – about 5,200 of these are the first release for the artist. That’s a whole lot of fresh music.

Give Fresh Faces a try and let me know what you think.

, , , , , ,


The Unfollower

One of the problems with working at a company like Spotify is that my Spotify account gets filled up with all sorts of work-related playlists. Over the last few years I’ve built lots of apps that create playlists. When I test these apps I end up generating lots of playlists that I will never ever listen to. If I were a tidy soul, I’d clean up my playlists after ever project, but, alas, that is something I never do. The result is that after working at Spotify for a year (and using Spotify for 8 years), I’ve accumulated many hundreds of garbage playlists. Now I could go into the Spotify desktop client and clean these up, but in the current client there’s no good way to bulk delete playlists.  Each playlist delete takes at least 3 clicks.  The prospect of doing this hundreds of times to clean up the playlist garbage is  a bit overwhelming.

I had  a few hours to kill in a coffeeshop yesterday so I decided to deal with my playlist mess.  I wrote a little Spotify web app called The Unfollower that lets you unfollow any of your playlists with a single click.  If you change your mind, you can re-follow any playlist that you unfollow.

The Unfollower screenshot

The Unfollower uses the Spotify Web API to make it all happen. In particular it relies on the  Follow/Unfollow API that was recently added by the API team.

If you are like me and have lots of dead playlists clogging up your Spotify, and you are looking for a streamlined way of cleaning them up, give The Unfollower a try.

, , , ,



Get every new post delivered to your Inbox.

Join 1,448 other followers