Boil the Frog – the unreleased Spotify Version

Update – You are probably looking for this web-based version of Boil The Frog and the blog post about it.

Screenshot 1:2:13 5:54 AM-3

The rest of this article is about the unreleased Spotify Version of Boil the Frog.

I’m at Music Apps Hack Weekend doing my favorite thing: hacking on music. I’ve just finished my hack called Boil the Frog.  Boil the Frog  is a Spotify App that will create playlists that gradually take you from one music style to another.  It is like the proverbial story of the frog in the pot of water. If you heat the water gradually, the frog won’t notice and will happily sit in the pot until it becomes frog stew.  With Boil the Frog  you can do the same thing musically.  Create a playlist that gradually takes your pre-teen from Miley Cyrus to Miles Davis, or perhaps more perversely the Kenny G fan to Cannibal Corpse.

To build the app I built an artist similarity graph of 100,000 of the most popular artists. I use The Echo Nest artist similarity to connect each artist to its four nearest neighbors. To find the path between any two artists I use a bidirectional Dijkstra shortest path algorithm.  Most paths can be computed in less than 100ms.

The Spotify Apps API is the perfect hacking platform. You can build a Spotify app that has full access to the vast Spotify music catalog and artwork, along with access to the listener’s catalog.   Since the Spotify Apps run in an embedded browser all of your web app programming skills apply.  You can use jQuery, make calls to JSON APIs, use HTML 5 canvas. It is all there. Spotify has done a really good job putting together this platform.  The only downside is that, unlike the web, it is hard to actually release Spotify apps, but the Spotify team is working to make this easier.    I’d love to release Boil the Frog because it is really fun to make playlists that bring you from one music style to another. It is interesting to see what musical neighborhoods you wander through on your way.  For instance, I made a Kenny G to Cannibal Corpse playlist. To get there, the playlist brought me from easy listening, to movie soundtracks and then through video game soundtracks to get to the heavy metal world.  Cool stuff.  If you want to see a playlist between two artists let me  know in the comments and I’ll create and share the playlist with you.

I made a video of Boil the Frog in action.   Check it out:

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

Update: I’ve just pushed the client code out to github:  https://github.com/plamere/boilthefrog

, , ,

16 Comments

Hackathons are not nonsense

Dave Winer says that Hackathons are nonsense.  Specifically he says:

Hackathons are how marketing guys wish software were made.

However, to make good software, requires lots of thought, trial and error, evaluation, iteration, trying the ideas out on other users, learning, thinking, more trial and error, and on and on. At some point you say it ain’t perfect, but it’s useful, so let’s ship. That process, if the software is to be any good, doesn’t happen in 24 hours. Sometimes it takes years, if the idea is new enough.

Dave says that software is hard and you can’t you can’t expect to build shippable software in a day.  That’s certainly true, and if the goal of a hackathon was to get a bunch of developers together to build and ship commercial software in a day, I’d agree with him. But that’s not the goal of any of the hackathons I’ve attended.

I’ve participated in and/or helped organize perhaps a dozen Music Hack Days. At a Music Hack Day, people who are interested in music and technology get together for a weekend to learn about music tech and to build something with it.  The goal isn’t to ship a software product, it is to scratch that personal itch to do something cool with music.   The people who come to a Music Hack Day  are often not in the music tech space, but are interested in learning about  all the music APIs and tech available.  They come to learn and then use what they’ve learned to build something.  At the most recent Music Hack Day in San Francisco, 200 hackers built 60 hacks including new musical instruments, new music discovery tools, social music apps and music games.

Photo by Thomas Bonte

Music Hack Days are not nonsense. They are incredibly creative weekends that have resulted in a 1,000 or more really awesome music hacks.  Consider the hackathon to be the Haiku of programming. Instead of  17 syllables in 3 lines, a hacker has  24 hours. (Maybe we should call them Haikuthons;)   I think the 24 hour constraint contributes to the creativity of the event.

Here are some of my favorite hacks built at recent Music Hack Days. Plenty of whimsy but no nonsense here:

A hackathon is not nonsense.  It is not a time to build and ship a commercial product and no one who hacks at  a hackathon thinks that they are building anything more than a hack. That’s why hack is in the title. A hackathon is a time for like minded individuals to get together to learn something new, build something cool and show it off. In my experience, hackathons are incredibly creative time for learning and building something. What better way to spend a weekend.  Hackathons are awesome.

4 Comments

Billboard wins!

Yep, the numbers are in.  Out of 13 Grammy award, Billboard picked 7 correctly, while my web crawling approach picked 6.  Congrats to the a Billboard editorial team for winning (this round!).  Let me know where to send the milkshakes!

Here are the details. All the raw data is at Paul vs. Billboard.

 

Category Paul’s prediction Billboard’s prediction Actual Grammy Who was right?
Album Of The Year Adele Adele Adele Both
Record Of The Year Adele Adele Adele Both
Song of the Year Adele Bruno Mars Adele Paul
Best New Artist Bon Iver The Band Perry Bon Hiver Paul
Best Pop Solo Performance Adele Lady Gaga Adele Paul
Best Pop Duo/Group Performance Maroon 5 and Christina Aguilera Tony Bennett Tony Bennet Billboard
Best R&B Album Kelly Price Chris Brown Chris Brown Billboard
Best Country Album Jason Aldean Taylor Swift Lady Antebellum Neither
Best Dance/Electronica Album Cut/Copy Skrillex Skrillex Billboard
Best Rock Album Red Hot Chili Peppers Foo Fighters Foo Fighters Billboard
Best Alternative Music Album Bon Iver Bon Iver Bon Hiver Both
Best Latin Pop, Rock or Urban Album Calle 13 Calle 13 Maná Neither
Best Rap Album Kanye West & Jay-Z Nicki Minaj Kanye West Neither

Leave a comment

Paul vs. Billboard

Another weekend,  another Music Hack Day.  This weekend I’m at Tokbox headquarters in San Francisco at the 3rd annual Music Hack Day San Francisco, where 200 music hackers are building the future of music.

For my hack, I thought I would try to predict who would win the Grammy awards (the annual music awards presented by The Recording Academy) which is being held this evening.   To do this, I used the Echo Nest APIs to gather of lots of news and blog posts for each nominated artist. I then peered into the articles looking for mentions of the Grammy nominated items.  I tallied up the mentions and combined this with the overall artist hotttnesss to give me a ranked order of each nominated item, which I could then use to create my prediction.

Since Billboard has also made some Grammy predictions, I thought it’d be interesting to do a post-facto comparison on how well each of us predicts the winners – thus the hack title ‘Paul vs. Billboard’.

The hack is online here:  Paul vs. Billboard

Be sure to check out all of the other music hacks being created this weekend:

List of  Music Hackday San Francisco 2012 hacks

, ,

Leave a comment

Building a Seatwave + Echo Nest App

This weekend at Music Hack Day SF, Seatwave is launching their Ticketing and Event API.  This API will make it easy for developers to add event discovery  and ticket-buying functionality to their apps.  At the Echo Nest we’ve incorporated Seatwave artist IDs into our Rosetta ID mapping layer making it possible to use Seatwave IDs directly with the Echo Nest API.  This makes it easier for you to use the Seatwave and the Echo Nest APIs together.  For instance, you can call the Seatwave API, get artist event IDs in response and use those IDs with the Echo Nest API to get more context about the artist.

For example, we can make a call to the Seatwave API to get the set of Featured Contest with an API call:

http://api-sandbox.seatwave.com/v2/discovery/category/10/eventgroups/featured?apikey=4A14A77EC6F04EC8B0DB924D12F8E81B

The results include blocks of events like this:

{
“CategoryId”: 12,
“Currency”: “GBP”,
“Id”: 934,
“ImageURL”: “http://cdn2.seatwave.com/filestore/season/image/thestoneroses_934_1_1_20111018165906.jpg”,
“MinPrice”: 95,
“Name”: “The Stone Roses”,
“SwURL”: “http://www.seatwave.com/the-stone-roses-tickets/season”,
“TicketCount”: 1810
},

{
“CategoryId”: 10,
“Currency”: “GBP”,
“Id”: 702,
“ImageURL”: “http://cdn2.seatwave.com/filestore/season/image/redhotchilipeppers_702_1_1_20110617124457.jpg”,
“MinPrice”: 45,
“Name”: “Red Hot Chili Peppers”,
“SwURL”: “http://www.seatwave.com/red-hot-chilli-peppers-tickets/season”,
“TicketCount”: 1134
},

We see events for the Stone Roses and for RHCP.  The Seatwave ID for RHCP is 702.  We can use this ID directly with in Echo Nest calls. For instance, to get  lots of Echo Nest info on the RHCP using the Seatwave ID, we can make an artist/profile call like so:

http://developer.echonest.com/api/v4/artist/profile?id=seatwave:artist:702
&bucket=biographies
&bucket=blogs&bucket=familiarity
&bucket=hotttnesss&bucket=images
&bucket=news&bucket=reviews

To show off the integration of Seatwave and Echo Nest, I’ve built a little web app that shows a list of top Seatwave concerts (generated via the Seatwave API). For each artist, the app shows the number of tickets available, the artist’s biography,  along with a play button that will let you listen to a sample of the artist (via 7Digital).

The application is live here:  Listen to Top Seatwave Artists.   The code is on github: plamere/SWDemo

The Seatwave API is quite easy to work with. They support JSON, JSONP, XML and SOAP(bleh).  Lots of good data, very nice artist images, generous affiliate program, easy to understand TOS.  Highly recommended.  See the Seatwave page in The Echo Nest Developer Center for more info on the Seatwave / Echo Nest integration.

,

1 Comment

The Midem Music Machine

Just a quick post before it is demo time.  This weekend at MIDEM Hack Day, I teamed up this weekend with the famous Mr. Doob  to build a music hack. We created the Midem Music Machine. It creates a beautiful visualization of music using The Echo Nest analyzer and Three.js.  Here’s a pic:

As you can see, our hack was inspired by the Animusic folks. Working with Mr. Doob was awesome. He did just amazing stuff.

You can see the Midem Music Machine online here:  Midem Music Machine.   You’ll need a browser that supports WebGL like Chrome.

,

1 Comment

The clean desk award

We’ve doubled our floor space here at the Echo Nest. I now have an office with a door and a window that opens. Look at that desk. I’ll be winning the clean desk award every day for the next week at least!

Leave a comment

Who is the A$%#hole?

In his blog post Can we kill the music business too?   James from songspin.fm has the magic formula to kill the major labels. He says:

In a nutshell, to kill the major label run music industry, startups will need to:

  1.  find great music from people who aren’t assholes
  2.  let people do cool things with that music
  3.  let users share what they create
  4.  profit!
James goes on to offer his definition of asshole:
By assholes, I mean people who will sue you for using their music in your startup, which probably makes this first step the hardest. You can’t have a great music startup without the music and more than that you need good music.

(Note that in that last quote, the first ‘sue’ link points to Grooveshark)

James is certainly right – you can’t have a great music startup without great music, but he goes off the rails if he thinks that companies protecting themselves from theft  infringement are assholes. A music startup, or any business should not be able to build a business on top of  someone else’s IP without compensating them for the use. It is easy to build a company that makes money by giving away someone else’s property. But it is not legal. For some insight on how things work at Grooveshark, read this thread on Digital Music News about how King Crimson tried to get their music taken off of Grooveshark. Included in the comment thread is this tasty bit by an individual who claims to work for Grooveshark that describes how they  ‘enhance’ the Grooveshark music library:

We are assigned a predetermined amount of weekly uploads to the system and get a small extra bonus if we manage to go above that (not easy).The assignments are assumed as direct orders from the top to the bottom, we don’t just volunteer to “enhance” the Grooveshark database.

All search results are monitored and when something is tagged as “not available”, it get’s queued up to our lists for upload. You have to visualize the database in two general sections: “known” stuff and “undiscovered/indie/underground”. The “known” stuff is taken care internally by uploads. Only for the “undiscovered” stuff are the users involved as explained in some posts above. Practically speaking, there is not much need for users to upload a major label album since we already take care of this on a daily basis.

Are the above legal, or ethical? Of course not. Don’t reply to give me a lecture. I know. But if the labels and their lawyers can’t figure out how to stop it, then I don’t feel bad for having a job. It’s tough times.

Why am I disclosing all this? Well, I have been here a while and I don’t like the attitude that the administration has acquired against the artists. They are the enemy. They are the threat. The things that are said internally about them would make you very very angry. Interns are promised getting a foot in the music industry, only to hear these people cursing and bad mouthing the whole industry all day long, to the point where you wonder what would happen if Grooveshark get’s hacked by Anonymous one day and all the emails leak on some torrent or something.

James may be right – that a big part of the future of music is letting developers do cool things with music, but holding up Grooveshark as an example of a music startup is a mistake. What Grooveshark is doing isn’t cool. It isn’t something that developers should emulate. James called those that sue Grooveshark assholes, but from my vantage point he got it exactly ass-backwards.

10 Comments

Controlling the artist distribution in playlists

The Echo Nest engineering team just pushed out a new feature giving you more control over the artist makeup in playlists.  There is a new parameter to the playlist/static API called distribution that can be set to wandering  or focused.   When the distribution is set to wandering the artists will appear with approximately equal distribution in the playlist. If the distribution is set to focused artists that are more similar to the seed artists will appear more frequently.  When combined with the variety parameter, you have excellent control over the number and distribution of artists in a playlist.  If you want to create a playlist suitable for music discovery, create a playlist with high variety and a wandering distribution.  If you want to create a playlist that more closely mimics the radio experience choose a low variety and a focused distribution.

I’ve put together a little demo that lets you create playlists with different levels of variety and distribution settings. The demo will create a playlist given a seed artist and show you the artist distribution for the playlist.  Here’s the output of the demo with distribution set to focused:

You can see from the artist histogram that the playlist draws more from artists that are very similar to the seed artist (Weezer).  Compare to these results from a wandering playlist with the same seed and variety:

You can see that there is flatter distribution of artists in the playlist.   You can use variety and distribution to tailor playlists to the listener.  For instance, you can give the Classic Rock Radio experience to a listener by setting variety to relatively low, setting the distribution to focused and seeding with a classic rock artist like Led Zeppelin.  Here’s the artist distribution for the resulting playlist:

That looks like the artist rotation for my local classic rock radio.

Give the demo a try to see how you can use variety and distribution to match playlists to your listener’s taste.  Then read the playlist API docs to see how to use the API to start incorporating these attributes into your apps.

The Demo:  Playlist Distribution Demo (source)

, , , , ,

Leave a comment

Using The Echo Nest to get the top 100 Twitter artists

This week Twitter and The Echo Nest announced a partnership where  Twitter IDs for verified accounts are incorporated into The Echo Nest’s ID mapping layer (aka Rosetta Stone).  This makes it easy for developers to get the Twitter handle for an artist.   To demonstrate just how easy it is, I wrote a little web app that displays the top 100 artists that have  verified Twitter accounts.    Here’s the core bit of code for the app:


function fetchTopTwitterArtists() {
    var url = 'http://developer.echonest.com/api/v4/artist/top_hottt?callback=?';

    $.getJSON(url, { 'api_key': 'GETYOUROWNAPIKEY', 'format':'jsonp',
      'results': 100, 'bucket': ['hotttnesss', 'id:twitter'], 'limit': true},
     function(data) {
       for (var i = 0; i < data.response.artists.length; i++) {
          var artist = data.response.artists[i];
          var elem = $("<li>");
          var link = $("<a>");
          var handle = artist.foreign_ids[0].foreign_id.replace('twitter:artist:', '');
          link.attr('href', 'http://twitter.com/' + handle);
          link.text(artist.name);
          elem.append(link);
          $("#results").append(elem);
       }
     }
  });
}

The key bits here are creating the artist/top_hottt request to The Echo Nest and  adding the id:twitter bucket and setting limit to true. This tells the Echo Nest to include the twitter handle information in the results and limit the results to only those artists that have twitter information.  After that it is just pulling the data out of the results and formatting it for the lovely display.   The Twitter ID info is returned in an ID block that looks like this:

            {"catalog": "twitter","foreign_id": "twitter:artist:LMFAO"}

Note that the Twitter ID is returned in a URN form. To get the actual Twitter URL for an artist we just need to replace the ‘twitter:artist:’ bits with ‘http://twitter.com/&#8217;.

You can see the app here:  Top 100 artists with verified Twitter accounts.  As you can see, I tried to make the web app as ugly as possible. The only thing it needs is some Comic Sansification.  The code is available for detailed study in this gist.

, ,

1 Comment