Paul

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.

New Smarter Playlists component

Chris Kelly pointed out that he likes to preserve his Discover Weekly playlists like so:
2016-01-06 at 7.46 AM

I liked the idea so I added a new Smarter Playlists component to make this happen.   The component is called Save to New Playlist.

2016-01-06 at 7.47 AM

With this new component you can save your Smarter Playlists to a new playlist that is tagged with a date or timestamp.  It makes it easy to make the completist Discover Weekly Archiver that Chris Kelly likes:

2016-01-06 at 7.50 AM

Thanks Chris for the suggestion!

1 Comment

Archiving your Discover Weekly with Smarter Playlist

Earlier this week I released the second alpha version of Smarter Playlists. This version of Smarter Playlists includes a scheduler that will let you schedule your programs to run periodically.  In this post, I walk through creating and scheduling a Smarter Playlist that will automatically archive your discover weekly tracks.

Step 1 -Login to Smarter Playlists

Go to Smarter Playlists and login with your Spotify Credentials.

2016-01-05 at 6.48 AM

Step 2 -Import the My Discover Weekly Archiver

Go to the Imports page and import the My Discover Weekly Archiver by clicking the Import button.

2016-01-05 at 7.12 AM

2016-01-05 at 7.14 AM

Step 3 – Edit the program

Ideally, you’d be able to just import the program and run it, but unfortunately, there’s no API (yet) that allows Smarter Playlists to find your Discover Weekly playlist, so you’ll have to customize the program with your own URIs.

Go to the Smarter Playlists Programs page, find the program called “import of My Discovery Weekly Archiver” and edit it (by clicking the edit button).

2016-01-05 at 7.15 AM

Step 3 – add your Discovery Weekly URI to the program

You have to add your own URIs to the program.  First, in the Spotify Client, browse to your Discover Weekly Playlist (you can get to it by clicking on ‘browse’ and then ‘discover’).  Right click on the playlist and Copy Spotify URI.

2016-01-05 at 7.17 AM

Now in your Discover Weekly Archiver, double click on the box labeled ‘Discovery Weekly’.  You’ll see the component editor page.  In the URI field, paste the URI for your Discover Weekly.

2016-01-05 at 7.18 AM.png

Step 4 – add your Discovery Weekly Archive URI to the program

Go back to Spotify and create the playlist that will be your archive.  Get its URI, head back to Smarter Playlists and add the URI to the My Discovery Weekly component, and the Save to Spotify component.

2016-01-05 at 7.20 AM

Step 5 – Test your program

Press the run button. If all goes well, you should see your Discovery Weekly Archive playlist populated with this week’s tracks.  If you run it again, you should see the same tracks (since we filter out any dups).

2016-01-05 at 7.21 AM

Step 6 – Schedule your program to run once a week.

Once you are convinced that your program is running properly, you can schedule it to run once a week.  To do this press the ‘schedule’ button next to your program to bring up the scheduler.

2016-01-05 at 7.22 AM

Click on the ‘How Often’ drop-down and select Every Week.   Set ‘How Many Times’ to an appropriate value (50 will back you up for a year). Click on Update Schedule  to make it happen.  If you want to schedule the program to run on a particular day of the week, click on the calendar button in the Next Run field to pick a particular date.

2016-01-05 at 7.24 AM

Once you do this, your program will run once a week to archive your discoveries.

Step 7 – Check the status of your runs

You can check the status of your scheduled runs and see if there are any errors just be visiting the Scheduler page for your program.

2016-01-05 at 7.24 AM 2

Going Deeper – how does the program work?

Read on if you are interested in learning how the archiver works.

2016-01-05 at 7.26 AM

The archiver is rather simple program. It consists of 4 components – 2 playlist components, a filter and a playlist saver.  The first playlist component reads in the current Discovery Weekly playlist. The second playlist component reads the contents of your current archive. These two playlists are input into the track filter, this only passes tracks through that are on the green stream that are not on the red stream. The result is that only tracks that are not currently in the archive are passed through.  These tracks are then sent on to the save to Spotify  component.  This component will write the input tracks to the given playlist.  This component has the append flag set so that it appends tracks to the archive instead of overwriting the archive.

Wrapping up

With all that URI copying I think it is still a bit too complex to set up a simple program like the discovery archiver. But as new APIs are added things should get simpler.

1 Comment

Smarter Playlists Alpha V2 is here!

Today, I’m releasing the second alpha release of Smarter Playlists – the web app that helps you automate the creation of sophisticated playlists.

ravenscry

This big feature of this release is that you can now schedule your smarter playlist programs to run periodically.  This lets you do all sorts of nifty things from automatically archiving your Discover Weekly recommendations to giving you a fresh mix of your favorites tracks with a few tracks from Fresh Finds sprinkled in.

2016-01-04 at 7.26 AM

If you are a professional curator managing dozens or hundreds of playlists, you can use the scheduling feature to keep your playlists fresh automatically.

The Scheduler lets you run your programs periodically. You can control how often your program runs, how many times it will run, and the exact date and time it will run.

2016-01-04 at 7.05 AM

This release also gives you better ways to manage your set of programs.

2016-01-04 at 7.02 AM

There are also a bunch of new components – such as personalized sources (my saved tracks, my saved albums, my followed artists, etc.),  a nifty artist separation component that reorders tracks to maximize the distance between tracks by the same artist and a whole bunch more.

Note that the previous release is still online. Unfortunately there’s no automated way to move your programs from Alpha V1 to Alpha V2.

This release has been nearly ready to go since August, but life intervened, and my time for spare time projects evaporated. Over the holiday break, I finally had some time to devote to getting this out the door.  Give it a go and send me feedback.

Check it out at: smarterplaylists.playlistmachinery.com

 

10 Comments

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.

6 Comments

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:

combine2

 

 

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.

ravenscry

 

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

5 Comments

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:

[gist https://gist.github.com/plamere/2fa839150815f040450d]

Here’s the resulting playlist:

[spotify spotify:user:plamere:playlist:6TIeQMve7pVBLCAY8WUX3L]

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, 'echonest.energy', 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

[spotify spotify:user:plamere:playlist:0VKGTR6eCPe55bBjezi5z3]

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 http://pbl.readthedocs.org/ and the source is at https://github.com/plamere/pbl.

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:

[youtube http://youtu.be/4C6a-MqAF_A]

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.

,

4 Comments