Archive for category The Echo Nest

Going Undercover

My Music Hack Day Stockholm hack is ‘Going Undercover‘.  This hack uses the extensive cover song data from SecondHandSongs to construct paths between artists by following chains of cover songs.  Type in the name of  a couple of your favorite artists and Going Undercover will try to find a chain of cover songs that connects the two artists.  The resulting playlist will likely contain familiar songs played by artists that you never heard of before.   Here’s a Going Undercover playlist from Carly Rae Jepsen to Johnny Cash:

 

Screenshot_1_20_13_12_01_PM

For this hack I stole a lot of code from my recent Boil the Frog hack, and good thing I could do that otherwise I would never have finished the hack in time. I spent many hours working to reconcile the Second Hand Songs data with The Echo Nest and Rdio data (Second Hand Songs is not part of Rosetta stone, so I had to write lots of code to align all the IDs up).   Even with leveraging the Boil the Frog code, I had a very late night trying to get all the pieces working (and of course, the bug that I spent 2 hours banging my head on at 3AM was 5 minutes of work after a bit of sleep).

I am pretty pleased with the results of the hack.  It is fun to build a path between a couple of artists and listen to a really interesting mix of music.  Cover songs are great for music discovery, they give you something familiar to hold on to while listening to a new artist.

, , , ,

1 Comment

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 Music We Lost in 2012

It’s the time of the year when music critics make their lists of artists that we passed away or bands that broke up in the last twelve months.  To help them write their retrospectives I’ve put together two lists: One of well-known musicians that died during 2012, and one of well-known bands that called it quits during the year.

Screenshot 12:19:12 4:00 PM-3

 

I made the list using the Echo Nest Artist Search API, restricting the results to artists that had a year ending in 2012.

Lots of great music left us in 2012.  See the lists here:  2012 Music Memoriam

Leave a comment

How music recommendation works – and doesn’t work

Brian just posted  ‘How Music Recommendation works – and doesn’t work‘ over at his Variogr.am blog.  It is a must-read for anyone interested in the state of the art in music recommendation.  Here’s an excerpt:

 Try any hot new artist in Pandora and you’ll get the dreaded:

Pandora not knowing about YUS

This is Pandora showing its lack of scale. They won’t have any information for YUS  for some time and may never unless the artist sells well. This is bad news and should make you angry: why would you let a third party act as a filter on top of your very personal experiences with music? Why would you ever use something that “hid” things from you?

Grab a coffee, sit back and read Brian’s post. Highly recommended.

1 Comment

Visualizing the Structure of Pop Music

The Infinite Jukebox generates plots of songs in which the most similar beats are connected by arcs. I call these plots cantograms. For instance, below is a labeled cantogram for the song Rolling in the Deep by Adele. The song starts at 3:00 on the circle and proceeds clockwise, beat by beat completely around the circle. I’ve labeled the plot so you can see how it aligns with the music. There’s an intro, a first verse, a chorus, a second verse, etc. until the outro and the end of the song.

Rolling in the Deep (labelled) by Adele

One thing that’s interesting is that most of the beat similarity connections occur between the beats in the three instances of the chorus. This certainly makes intuitive sense. The verses have different lyrics, so for the most part they won’t be too similar to each other, but the choruses have the same lyrics, the same harmony, the same instrumentation. They may even be, for all we know may even be exactly the same audio, that perfect performance, cut and pasted three times by the audio engineer to make the best sounding version of the song.

Now take a look at the cantogram for another popular song. The plot below shows the beat similarities for the song Tik Tok by Ke$ha. What strikes me the most about this plot is how similar it looks to the plot for Rolling in the Deep. It has the characteristic longer intro+first verse, some minor inter-verse similarities and the very strong similarities between the three choruses.

Tik Tok by Ke$ha

As we look at more plots for modern pop music we see the same pattern over and over again. In this plot for Lady Gag’s Paparazzi a cantogram we again see the same pattern.

Lady Gaga – Paparazzi

We see it in the plot for Justin Bieber’s Baby:

Justin Bieber – Baby

Taylor Swift’s Fearless has a two verses before the first chorus, shifting it further around the circle, but other than that the pattern holds:

Taylor Swift – Fearless

Now compare and contrast the pop cantograms with those from other styles of music. First up is Led Zeppelin’s Stairway to heaven. There’s no discernable repeating chorus, or global song repetition, the only real long-arc repetition occurs during the guitar solo for the last quarter of the song.

Led Zeppelin – Stairway to Heaven

Here’s another style of music. Deadmau5’s Raise your weapon. This is electronica (and maybe some dubstep). Clearly from the cantogram we can see that is is not a traditional pop song. Very little long arc repetition, with the densest cluster being the final dubstep break.

Deadmau5 – Raise your weapon

Dave Brubeck’s Take Five has a very different pattern, with lots of short term repetition during the first half of the song, while during the second half with Joe Morello’s drum solo there’s a very different pattern.

Dave Brubeck – Take Five

Green Grass and High Tides has yet a different pattern – no three choruses and out here. (By the way, the final guitar solo is well worth listening to in the Infinite Jukebox. It is the guitar solo that never ends).

Green Grass And High Tides by The Outlaws

The progressive rock anthem Roundabout doesn’t have the Pop Pattern

Yes – Roundabout

Nor does Yo-Yo Ma’s performance of the Cello suite No. 1.

01 Cello Suite No.1, 1. Prelude by Yo-Yo Ma

Looking at the pop plots one begins to understand that pop music really could be made in a factory. Each song is cut from the same mold. In fact, one of the most successful pop songs in recent years, was produced by a label with factory in its name. Looking at Rebecca Black’s Friday we can tell right away that it is a pop song:

Friday by Rebecca Black

Compare that plot to this years Youtube breakout, Thanksgiving by Nicole Westbrook, (another Ark Music Factory assembly):

Nicole Westbrook – It’s Thanksgiving (Official Video)

The plot has all the makings of the standard pop song for the 2010s.

In the music information retrieval research community there has been quite a bit of research into algorithmically extracting song structure, and visualizations are often part of this work. If you are interested in learning more about this research, I suggest looking at some of the publications by Meinard Müller and Craig Sapp.

Of course, not every pop song will follow the pattern that I’ve shown here. Nevertheless, I find it interesting that this very simple visualization is able to show us something about the structure of the modern pop song, and how similar this structure is across many of the top pop songs.

update: since publishing this post I’ve updated the layout algorithm in the Infinite Jukebox so that songs start and end at 12 Noon and not 3PM, so the plots you see in this post are rotated 90degrees clockwise from what you would see in the jukebox.

,

11 Comments

Bangarang Boomerang

My latest music hack is Bangarang Boomerang. It is a web app (runs in Chrome or the latest Safari), that lets you ‘drive’ the Skrillex song.  You can freeze-frame the song on  a beat, you can make the song go backwards beat by beat, you can advance through the song at  double time, or triple time, and set bookmarks to let you easily jump to different sections of the song. It is a rather fun app that lets you feel like a musician, even if you have very little musical talent.

Watch the quick Youtube demo, and then try it yourself:  Bangarang Boomerang

[youtube http://youtu.be/GJQ1K1dnU2A]

, , ,

1 Comment

Hear Here update

A bit more coding this weekend on ‘Hear Here’ my iPhone app that plays music by nearby artists.  It is now feature complete.  The list of features is rather small – it really is a ‘do one thing well’, kind of app.  It plays music by the nearest artists that match your filter. You can filter currently by the popularity of the artist.  If you are adventurous, you can listen to music by all nearby artists, but if you are not so brave you can just listen to music by mainstream or popular artists.   The app shows you how far away the ‘now playing’ artist is and shows you how many artists are within a 25 mile radius.   All music is streamed from Rdio and of course you’ll need an Rdio subscription to hear full streams.  I made my own icon – it is pretty ugly – if you have design skills and want to contribute a logo I’d be very pleased to use it.   Here’s a video of the app in action for a user who happens to be in Cupertino:

[youtube http://www.youtube.com/watch?v=Lfb5P8_8Dpk&hd=1]

Next steps for the app are lots of testing, especially with poor network connectivity.  After that, I’ll make sure I’m following all the rules for Rdio and Apple – and once I’m conforming to all the TOS’s and UI guidelines  I’ll submit it to the App Store (as a free app).

, , , ,

3 Comments

What’s your musical stereotype?

You can usually learn something about a person by looking at what music they listen to.  Someone who listens to the Sex Pistols and the Ramones is likely to be from a very different demographic than someone whose favorite artist is Julie Andrews. Of course there are always exceptions to the rule – there are probably a few playlists out there in the world that have both “Anarchy in the UK” and “My Favorite things” but I’m quite sure you won’t be finding a mosh pit at a Julie Andrews concert any time soon.

As we collect more data about what people listen to we begin to learn more about the demographics of listening.  Who really listens to Country music? Are they really mostly right-leaning southerners?  Are all Hanson fans now 30 years old?  To learn how we can answer some of these questions be sure to read Echo Nest founder Brian Whitman’s latest post on Variogr.am about the kinds of predictions we can make about people based upon what they listen to.

This week, The Echo Nest is releasing some new API features that make it easy for developers to build apps that take advantage of this listening data. One new API is Taste Profile Similarity.   This API lets you take a seed taste profile  (a taste profile is how The Echo Nest represents an individual’s music taste) and find other taste profiles that are similar to that seed.  To demonstrate one type of application you can build with this new similarity API, we’ve created a web app called  “What’s your stereotype?”   This application will look at your music taste (based on your Facebook likes, or your jams from This is my Jam), and  tell you which Internet meme  best fits your listening style.

Yes, the app will pigeonhole you into a narrow, and probably demeaning demographic. You will probably be offended.  Here’s my musical stereotype:

If you want to have your own music tastes pigeonholed like this can try the app yourself at What’s your stereotype?  Just remember, you will probably be offended.

To create this app, we identified a whole bunch of Internet memes and personas and made some predictions about the type of music each of these personas would listen to. We then look at the music taste similarity between you and each of the personas – the closest matching one becomes your musical stereotype.

The hardest part about building this app was identifying all of the appropriate Internet memes, predicting the music taste for each meme, collecting images, links and attribution, and most challenging of all, writing the witticisms that accompany each meme. Leading this effort was Matthew Santiago, our chief data quality guy here at The Echo Nest. Matthew organized the meme-dream team  to collect and massage all this data.    Our highly creative meme-dream team includes Michelle, Nell, Charlie, Alyse, Ryan, Sonja, Nicola, Sam, Roisin, Julie, Sara and Alex.

This app demonstrates what we can do with just a little bit of data about your music tastes. Using the techniques that Brian describes coupled with all the deep data we are gathering around listening habits will help us get a much deeper understanding of your music tastes.  This understanding will be key to helping us craft the best music listening experience for you. So, go check out the What’s your stereotype? . I hope you’ll have as much fun with the app as we had in building it.

, , ,

3 Comments

Roadtrip Mixtape

Over the last few years I’ve made a number of 1,000+ mile road trips as I shuttle kids to colleges in far away places. Listening to music has always been a big part of these trips.  I thought it’d be nice to be able to listen to music by local artists when driving through a particular region, so I spent a few weekends creating an app called Roadtrip Mixtape that populates a roadtrip playlist with artists that are from the region you are driving through.

To create a playlist, type your starting and ending cities for your roadtrip.  The app will use Google’s directions to plan the best route between the two cities.  The route will then be broken into 15 minute playlist legs. Each playlist leg is populated by 15 minutes worth of music by nearby artists.

The beginning of each leg is represented by a green ball. You can click on the ball to see what artists will be played during that leg.  The app plays music via Rdio using their nifty Web  Player API.  If you are an Rdio subscriber you can listen to full streams, and if not you get to hear 30 second samples.  One bit of interesting info that I show for a route is the ‘Avg distance’.  This shows the average distance to each artist on the roadtrip. If this number is low, you are traveling through a musically dense part of the world, and if it is high,  you are traveling in a sparse musical region. For instance, for a roadtrip from Boston to New York the average artist distance is 3 miles (about as low as it goes).   However, if you are traveling from Omaha to Denver, the average artist distance is 81 miles.

You can also click anywhere on the map to see and listen to nearby artists.   For example, if you click on Shreveport you’ll see something like this:

When you click the ‘Hear here’ button, you’ll get a playlist of the hotttest artists from Shreveport.

Listening to nearby artists is quite fun. There’s potential from some extreme sonic whiplash as you drive near a brutal death metal band and then a pop vocalist from the 1950s

The Technical Bits
To build the app I used the new artist location data from The Echo Nest.  This (still in beta) feature, allows you to retrieve the location of any artist.  Here’s an example API call that retrieves the artist location for Radiohead:

http://developer.echonest.com/api/v4/artist/profile?api_key=N6E4NIOVYMTHNDM8J&name=radiohead&format=json&bucket=artist_location

For this app, I collected the locations for the top 100,000 or so most popular artists in the Rdio catalog.  These artists were from about 15,000 different cities.  I used geopy along with the Yahoo Placefinder geocoder to find the latitude and longitude for each of these cities.  For the mapping and route finding, I used version 3.9 of the Google maps API.   For music playback I used the Rdio Web Playback API.   With the tight integration between the Echo Nest and Rdio ID spaces it was easy to go from a geolocated Echo Nest artist to a list of Rdio track IDs for songs by that artist.

The Bad Bits
As a web app that relies on the flash-based Rdio web player,  Roadtrip Mixtape  is not really a mobile app.  It won’t play music on an iPhone or iPad, so the best way to actually use this app on the road is probably to bring along your tethered laptop.  Not the best user experience.  Thus, my next weekend project will be to learn a little bit of iOS programming a make a version of this app that runs on an iPhone and an iPad.  Stay tuned for the next version.

, , , ,

2 Comments

What is the most musical city in the United States?

There are many cities in the United States that are known for their music. Cities like Nashville, Detroit, Seattle and New Orleans have played a major part in the musical history and development of this country.  But what is the most musical city? Which city has spawned the most musical artists? To answer this question I used the soon-to-be-released artist location data from The Echo Nest artist API.  I gathered up the top 50,000 or so U.S. artists, found their city of origin and tallied the number of artists per city.  From this tally I calculated the number of artists per 1,000 inhabitants in each city. The more artists per 1000 inhabitants, the more musical the city.

Using the artists per 1k inhabitants, we can easily find the top 25 most musical cities in the United States:

# Artists per 1,000 inhabitants Artists Population City
1 3.14 111 35355 Beverly Hills, CA
2 2.26 1651 732072 San Francisco, CA
3 1.68 894 530852 Nashville, TN
4 1.64 936 571281 Boston, MA
5 1.54 651 422908 Atlanta, GA
6 1.53 53 34703 Charlottesville, VA
7 1.48 817 552433 Washington, DC
8 1.39 513 367773 Minneapolis, MN
9 1.37 740 540513 Portland, OR
10 1.32 51 38601 Burlington, VT
11 1.24 4789 3877129 Los Angeles, CA
12 1.22 15 12314 Muscle Shoals, AL
13 1.20 683 569369 Seattle, WA
14 1.11 755 678368 Austin, TX
15 1.05 75 71253 Bloomington, IN
16 1.05 50 47529 Chapel Hill, NC
17 1.05 47 44916 Olympia, WA
18 1.00 13 12945 Princeton, NJ
19 0.95 182 190886 Richmond, VA
20 0.94 11 11678 Hendersonville, NC
21 0.87 12 13769 Malibu, CA
22 0.87 88 100975 Denton, TX
23 0.86 179 207970 Orlando, FL
24 0.86 86 100158 Berkeley, CA
25 0.85 114 133874 Orange, CA

I find the results to be pretty interesting.  Beverly Hills, the tiny city at the heart of the entertainment world is #1.  San Francisco is the most musical of all large cities, followed closely by Nashville. Among, the most musical of small cities is Muscle Shoals AL  which, according to Wikipedia, is famous for its contributions to American popular music.  Less musical than expected are New Orleans (rank 36),  NYC (rank 37), Detroit (rank 52).

Among the least musical cities in the U.S. are my hometown (Manchester NH), with only one artist in the top 50,000 U.S. based artist for the 100K inhabitants.  The least musical large city in the U.S. is Kansas City KS, with only 7 top-50k artists for their nearly half million inhabitants. Luckily Kansas City residents can drive a few miles to Kansas city Missouri (with its 194 musicians for its 442k inhabitants) when they get tired of their own seven artists.

You can see the full list of cities with population greater than 5,000 ordered by their musicality here:  The Most Musical Cities in the United States.  I’d love to do this for all the cities in the world, but I can’t find a good source of city population data for world cities. If you know of one let me know.

I’m rather exited about this upcoming release of artist location data in our API. It will open the doors for a whole bunch of interesting applications, such as road trip playlisters that play music by artists local to the city you are near, contextual playlisters that will favor artists from your home town, or music exploration apps that will let you explore music from a particular region of the world.  I can’t wait to see what people build with this data. Stay tuned, I’ll post when the API is released.

 

19 Comments