Archive for category Music
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
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.
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:
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:
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:
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:
Compare that to the much more intense drop:
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.
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.
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.
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.
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.
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.
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 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.
Yesterday I gave a talk at SXSW about what we can learn about how we listen to music by looking at all sorts of listener data that we collect at Spotify. You can see the slides for my talk here … but the slides only tell half the story, the other have are in my words, but those aren’t written down anywhere. You’ll just have to assume that they were very insightful, and a little bit humorous, but at the end told an incredible story leaving you inspired and fulfilled.
I just had a skype call with a group of young women called the Hippie Pandas, a First Lego League Team based in Rochester New York. As part of the First Lego League competition(*), they are working on a research project titled “How can we improve the way teachers learn to use music in the classroom to improve student’s performance and behavior.” In their research they found that particular types of music when played in the classroom can improve memorization, creativity and behavior. The team has created a website with a number of specialized Spotify playlists that teachers can use to enhance learning and behavior in the classroom.
For example, here’s a playlist that they’ve build for Focus and Memorization:[spotify spotify:user:hippiepandas:playlist:6Nb7j4oY5qCpSARych2cxN]
Here’s a playlist designed to Energize and Wake up the classroom.[spotify spotify:user:hippiepandas:playlist:7dKK633DuISF8c06OckeMp]
The Hippie Pandas use audio attributes such as tempo and instrumentalness to create these task-appropriate playlists.
Like all good scientists the Hippie Pandas have tested their hypotheses. They have worked with a number of classroom teachers who are testing their contextual playlists with students in the classroom. Although they haven’t published any results yet, they’ve reported that the teachers have seen great improvements in the classroom when these task-appropriate playlists.
The Hippie Pandas have gone beyond creating playlists for teachers – they have also identified a number of barriers that would prevent music from being used in the classroom and are working to eliminate those barriers. For example, in many schools access to Spotify is blocked since, according to school administrators, Spotify doesn’t provide educational benefit. The HP team has been able to get access to Spotify restored in their local school district after demonstrating how music can improve student performance. Another barrier the Pandas have recognized is that not all teachers will have access to Spotify. To address this issue, the Pandas are lobbying Spotify to make free accounts available for all teachers. That sounds like a great idea to me.
In April, the Hippie Pandas journey to St. Louis to take part in the FIRST World Festival competition. They’ve competed in the world championships in previous years and have brought home a number of trophies and received special recognition for their project that could save lives. I think they will do well this year too. They’ve done quite a good job at identifying an opportunity for teachers to improve students behavior and performance in the classroom just by playing appropriate music. They are a smart, engaging group of young women who present their findings with energy and enthusiasm. I wish them well.
(*) For Inspiration and Recognition of Science and Technology (FIRST), is an organization that was founded by Dean Kamann in 1989 to inspire young people’s interest and participation in science and technology. The program is for students K-12 and the mission is to inspire young people to be science and technology leaders, by engaging them in exciting mentor-based programs that build science, engineering and technology skills, that inspire innovation, and that foster well-rounded life capabilities including self-confidence, communication, and leadership. The FIRST Lego League (FLL) introduces younger students (9-14) to real-world engineering challenges by buildingLEGO-based robots to complete tasks on a thematic playing surface and through a research and development project to solve a real world problem. Today there are over 28,000 FLL teams around the world. This years theme was called, World Class, learning unleashed
The Spotify Web API team pushed out a new feature recently that extends the search API to include playlist search. With this new feature it is now possible to search across all of the popular public playlists created by Spotify users. To try out the new search capability I created a new web app called The Playlist Miner.
The Playlist Miner is a web app that will create a Spotify playlist for you by finding the top songs in all of the playlists that match your criteria. Say, for example, that I want to create a dinner party playlist. First, I find the top playlists that match ‘dinner party’ with The Playlist Miner:
The Playlist Miner will find up to the top 1,000 most popular playlists that match dinner party. It shows them to me, giving me a chance to refine my query to focus in on the exact type of playlist that I am interested in.
For this first try, I see lots of Christmas-oriented playlists (‘Tis the Season after all), but since I’m looking for music for a post-holiday dinner party, I’d rather not have holiday music in the playlist. So I refine my query to find non-Christmas oriented dinner party playlists like so:
The resulting playlists are suitably non-Christmasy.
I like the look of these playlists so I hit the Find Top Tracks button and The Playlist Miner will scour through all of the matching playlists (290 of them in this case) and find the most frequently appearing tracks.
Once the top 100 tracks are found, I can save them to Spotify as my own playlist.
Selecting Prefer more distinctive labor and delivery tracks adjusts the track order for popularity so that tracks that are more distinctive to the particular playlist context will rise to the top. You can also use logical operators to focus in on the exact type of playlist you want to. You can search for “work out” OR workout NOT running to find workout playlists without running in their titles/descriptions.
Under the hood – The Playlist Miner uses lots of bits of the Spotify API – user authentication, playlist search, playlist reading, playlist saving and more. The app is a an API calling beast – aggregating all the tracks from a thousand playlists requires 1,000 API calls. It’s a testament to the Spotify Web API that it doesn’t even blink under the load. You can play with the code on github.
It’s fun to use The Playlist Miner to explore the quirkier aspects of how people listen to music. There are ironing playlists and sleeping baby playlists. There are playlists for getting psyched and playlists for Labor and Delivery. With the Playlist Miner you can pull from all the playlists created for a particular purpose and build your own. Give it a try.
No other holiday dominates our listening like Christmas. During this season, we are exposed to a seemingly never ending playlist of Christmas music. So its no surprise that there’s a huge amount of Christmas music available on Spotify. How much? Let’s take a look.
How much Christmas music is there?
It is actually quite hard to pinpoint the exact number of Christmas songs. First, every week during the holiday season thousands more Christmas songs are added to the set. Second, some songs are seasonal – is Frosty The Snowman a Christmas song? Not literally, but it gets a lot of play at this time of year, even by the antipodes. Finally, there are a number of other holidays and celebrations at this time of year such as Hanukkah, Boxing Day, New Years, Kwanzaa, the Winter Solstice, and Festivus that we want to include in this category. So when I say “Christmas Music” I’m referring to western music that is played primarily during December. There’s probably a better term to describe this music, but terms like seasonal, and holiday have their own special baggage – perhaps something like music coincident with the northern hemispheric winter solstice is the most precise description, but lets stick with Christmas music just to keep things simple. So how much Christmas music is there? In early December 2014, crack music + data nerd Aaron Daubman dove into the Spotify + Echo Nest music catalog and found 914,047 Christmas tracks – that’s just under a million Christmas tracks. Let’s unwrap this dataset to see what we can find.
First, some basic stats: Those 914,047 tracks represent 180,660 unique songs and were created by 63,711 unique artists – from Aaron Neville to Zuma the King. The top 20 artists with the most Christmas tracks in the Spotify catalog are all pre-Beatles artists:
Artists with the most Christmas Tracks
|4||Nat King Cole||11613|
|5||Johann Sebastian Bach||8958|
|15||The Andrews Sisters||3567|
Yes, that’s right, Bing Crosby has 22,382 different Christmas tracks (!) in the Spotify catalog. Now, a little digression on what we consider to be a unique track. Music, especially popular music, is released in many forms. A very popular song, such as Bing Crosby’s White Christmas, may appear on a wide range of albums – from the original studio release to a plethora of Christmas Compilations and artist ‘best of’ albums. Each of these track releases may have different album art, different rights holders and regional licenses. Thus, even though the audio for White Christmas may be the same on each of the release, we consider each release as a different track.
Let’s take a closer look at Bing Crosby’s White Christmas. In our catalog of nearly a million Christmas tracks, 2,196 of them are Bing Crosby’s classic. I’ll say that again, just because it is a rather phenomenal fact – there are 2,196 different albums on Spotify that contain Bing’s White Christmas. It is hard to believe, so I created a web page that contains all 2,196 of the albums so you can see them all. Click on the image below to load them all up (warning – with 2000+ album covers it’s a bit of a browser buster).
White Christmas isn’t the only uber-track of the holidays. Here are the top 25 Christmas tracks based upon the number of times they have been released on an album:
The most released Christmas tracks
|1||Bing Crosby – White Christmas||2196|
|2||Eartha Kitt – Santa Baby||1286|
|3||Elvis Presley – Blue Christmas||1285|
|4||Frank Sinatra – Jingle Bells||1121|
|5||Harry Belafonte – Mary’s Boy Child||904|
|6||Bing Crosby – Silver Bells||881|
|7||Nat King Cole – The Christmas Song||870|
|8||Frank Sinatra – The Christmas Waltz||811|
|9||Rosemary Clooney – Suzy Snowflake||788|
|10||Bobby Helms – Jingle Bell Rock||779|
|11||Elvis Presley – White Christmas||738|
|12||Judy Garland – Have Yourself a Merry Little Christmas||735|
|13||Frank Sinatra – White Christmas||703|
|14||Frank Sinatra – Christmas Dreaming||696|
|15||Frank Sinatra – Have Yourself a Merry Little Christmas||695|
|16||Elvis Presley – Silent Night||688|
|17||Elvis Presley – I Believe||664|
|18||Frank Sinatra – Santa Claus Is Coming to Town||660|
|19||Louis Armstrong – Zat You Santa Claus||598|
|20||Dean Martin – The Christmas Blues||575|
|21||Frank Sinatra – Mistletoe and Holly||568|
|22||Louis Armstrong – Cool Yule||566|
|23||Frank Sinatra – Silent Night||563|
|24||Bing Crosby – Jingle Bells||560|
|25||Elvis Presley – Santa Claus Is Back in Town||559|
You can see all of the releases for Elvis’s Blue Christmas and Eartha Kitt’s Santa Baby here:
So there are lots of copies of Bing Crosby’s White Christmas and Eartha Kitt’s Santa Baby out there – but what are the most common Christmas songs overall? Which ones have been recorded the most by any artist? The following table shows the top 25:
Most recorded songs
|5||Joy to the World||9093|
|6||The First Noel||8731|
|7||Have Yourself a Merry Little Christmas||8511|
|8||O Holy Night||7925|
|9||Hark The Herald Angels Sing||7727|
|10||The Christmas Song||7673|
|11||Away in a Manger||7544|
|12||God Rest Ye Merry Gentlemen||7524|
|13||O Little Town of Bethlehem||7480|
|14||Santa Claus Is Coming To Town||6851|
|15||I’ll Be Home for Christmas||6844|
|16||O Come All Ye Faithful||6273|
|17||Deck The Halls||6057|
|20||What Child Is This?||5755|
|21||We Wish You A Merry Christmas||5619|
|22||It Came Upon A Midnight Clear||5019|
|25||Let It Snow! Let It Snow! Let It Snow!||4598|
Of course this data may be confounded by the uber-tracks like White Christmas that have thousands of versions by a single artist, so lets look at the most recorded songs by unique artists – that is, we only count Bing Crosby once for White Christmas instead of 2,196 times. When we do that the top 25 changes a bit:
Most recorded Christmas songs (Unique Artists)
|3||Joy to the World||3593|
|5||O Holy Night||3536|
|6||The First Noel||3181|
|7||What Child Is This?||3150|
|8||Away in a Manger||3140|
|9||God Rest Ye Merry Gentlemen||2871|
|10||Have Yourself a Merry Little Christmas||2823|
|11||O Come All Ye Faithful||2675|
|12||Hark The Herald Angels Sing||2638|
|13||Angels We Have Heard on High||2494|
|15||The Christmas Song||2398|
|16||We Wish You A Merry Christmas||2281|
|17||Deck The Halls||2274|
|18||O Little Town of Bethlehem||2197|
|19||We Three Kings||2048|
|20||Santa Claus Is Coming To Town||1837|
|21||It Came Upon A Midnight Clear||1768|
|23||Auld Lang Syne||1603|
|25||I’ll Be Home for Christmas||1577|
The songs in green are the songs that are unique to each list.
Artists with the most number of unique songs
Bing Crosby is at the top of the Most Christmasy artists mainly because of the widespread re-issuing of White Christmas. But if we look at unique songs (i.e. White Christmas only counts once for Bing Crosby), the top Christmas artists look very different – with classical composers, Karaoke ‘artists’ and music factories topping the charts:
Artists with the most number of unique songs
|1||Johann Sebastian Bach||3681|
|3||The Karaoke Channel||1098|
|4||George Frideric Handel||903|
|7||ProSound Karaoke Band||762|
|8||Pyotr Ilyich Tchaikovsky||691|
|9||SBI Audio Karaoke||641|
|10||Mega Tracks Karaoke Band||577|
|12||Ameritz Karaoke Entertainment||508|
|13||Tbilisi Symphony Orchestra||506|
|16||Karaoke – Ameritz||428|
|17||Nat King Cole||413|
|18||Ameritz Karaoke Band||397|
|19||Merry Tune Makers||385|
Current popular Christmas crooner Michael Bublé, with 31 unique Christmas songs has a way to go before he makes it on to the most-unique-songs-recorded chart.
Speaking of Karaoke – there’s lots of Christmas Karaoke – 23,472 tracks to be precise. The top 25 Karaoke songs are the classics:
Top Karaoke Christmas Songs
|9||The Christmas Song||185|
|10||Jingle Bell Rock||172|
|11||Have Yourself a Merry Little Christmas||171|
|12||Please Come Home for Christmas||163|
|13||Little Drummer Boy||163|
|15||O Come All Ye Faithful||154|
|16||Here Comes Santa Claus||150|
|18||All I Want for Christmas Is You||146|
|19||O Holy Night||144|
|20||I Saw Mommy Kissing Santa Claus||143|
|21||Rockin’ Around the Christmas Tree||135|
|22||Santa Claus Is Coming to Town||126|
|23||Frosty the Snowman||125|
|24||Rudolph the Red Nosed Reindeer||121|
|25||We Wish You a Merry Christmas||118|
We can build a good list of seasonal terms by finding the most frequently occurring words in song titles. Here are the top 75 or so, as a word cloud created by wordle (stop words are removed of course).
Longest Christmas song name
There are lots of very long song names in the set of Christmas songs – the longest is this Christmas medly.
Andrea und Manuela – Morgen kommt der Weohnachtsmann – Medley / Morgen kommt der Weihnachtsmann/Leise rieselt der Schnee/Oh du Fröhliche/Ihr Kinderlein kommet/Süßer die Glocken nie klingen/Oh Tannenbaum/Kling Glöckchen/Stille Nacht, heilige Nacht/Alle Jahre wieder – Morgen kommt der Weihnachtsmann/Leise rieselt der Schnee/Oh du Fröhliche/Ihr Kinderlein kommet/Süßer die Glocken nie klingen/Oh Tannenbaum/Kling Glöckchen/Stille Nacht, heilige Nacht/Alle Jahre wieder
A great song for testing how well your music player UI deals with unusual titles.
One would think that with a million Christmas tracks we’d already have more than enough Christmas music – but, it seems, we still like new Christmas music. Ariana Grande’s recently released Santa Tell Me is climbing the streaming charts (currently #44 at charts.spotify.com).
Plus, there’s seemingly no-end to the variety of Christmas Music. If White Christmas with Bing Crosby is not your style, then there’s Blue Christmas by Elvis.
And If that’s not your thing, maybe you’ll enjoy Red Christmas by Insane Clown Posse.