Posts Tagged The Echo Nest

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 Future of Mood in Music

One of my favorite hacks from Music Hack Day London is Mood Knobs.  It is a Spotify App that generates Echo Nest playlists by mood. Turn some cool virtual analog knobs to generate playlists.

Mood Knobs

The developers have put the source in github. W00t.  Check it all out here: The Future of Mood in Music.

, ,

1 Comment

Jennie’s ultimate road trip

Last weekend at Music Hack Day Boston, I teamed up with Jennie, my 15-year-old daughter, to  build her idea for a  music hack which we’ve called  Jennie’s Ultimate Road Trip.  The hack helps you plan a road trip so that you’ll maximize the number of great concerts you can attend along the way.   You give the app your  starting and ending city, your starting and ending dates, and the names of some of your favorite artists and Jennie’s Ultimate Road Trip will search through the many events to find the ones that fit your route schedule that you’d like to see and gives you an itinerary and map.

We used the wonderful SongKick API to grab events for all the nearby cities.  I was quite surprised at the how many events SongKick would find.  For just a single week, in the geographic area between Boston and New York City, SongKick found 1,161 events with 2,168 different artists.  More events and more artists makes it easier to find a route that will give a satisfying set of concerts – but it can also make finding a route a bit more computationally challenging too (more on that later).  Once we had the set of possible artists that we could visit, we needed to narrow down the list of artists to the ones would be of most interest to the user.  To do this  we used the new Personal Catalogs feature of the Echo Nest API.  We created a personal catalog containing all of the potential artists (so for our trip to NYC from Boston, we’d create a catalog of 2,168 artists).  We then used the Echo Nest artist similarity APIs to get recommendations for artists within this catalog.  This yielded us a set of 200 artists that best match the user’s taste that would be playing in the area.

The next bit was the tricky bit – first, we subsetted the events to just include events for the recommended set of artists. Then we had to build the optimal route through the events, considering the date and time of the event, the preference the user has for the artist, whether or not we’ve already been to an event for this artist on the trip, how far out of our way the venue is from our ultimate destination and how far the event is from our previous destination.  For anyone who saw me looking grouchy on Sunday morning during the hack day it was because it was hard trying to figure out a good cost function that would weigh all of these factors: artist preference, travel time and distance between shows, event history.    The computer science folks who read this blog will recognize that this route finding is similar to the ‘travelling salesman problem‘ – but with a twist, instead of finding a route between cities, which don’t tend to move around too much, we have to find a path through a set of artist concerts where every night, the artists are in different places.   I call this the ‘travelling rock star’ problem. Ultimately I was pretty happy with how the routing algorithm, it can find a decent route through a thousand events in less than 30 seconds.

Jennie joined me for a few hours at the Music Hack Day – she coded up the HTML for the webform and made the top banner – (it was pretty weird to look over on her computer and see her typing in raw HTML tags with attached CSS  attributes – kids these days).  We got the demo done in time – and with the power of caching  it will generate routes and plot them on a map using the Google API.  Unfortunately, if your route doesn’t happen to be in the cache, it can take quite a bit of time to get a route out of the app – gathering events from SongKick, getting the recommendations from the Echo Nest, and finding the optimal route all add up to an app that can take 5 minutes before you get your answer.  When I get a bit of time, I’ll take another pass to speed things up. When it is fast enough, I’ll put it online.

It was a fun demo to write. I especially enjoyed working on it with my daughter. And we won the SongKick prize, which was pretty fantastic.

 

Jennie with the SongKick prize

 

, , ,

3 Comments

testing one of the new APIs

nest% least_energy the beatles
0.08 Julia
0.09 Yesterday
0.11  Golden Slumbers
0.11 Blackbird  / Yesterday

nest% least_danceable the beatles
0.02 Revolution 9
0.07 Within You Without You _ Tomorrow Never Knows
0.07  Because

nest% most_energy led zeppelin
0.98 Moby Dick — Bonzo’s Montreux
0.98 Bonzo’s Montreux
0.95 Walter’s Walk
0.95 D’yer Mak’er

nest% most_danceable led zeppelin
0.73 Black Country Woman
0.64 Boogie With Stu
0.63 All My Love
0.63 The Rover

, , , ,

2 Comments

The Name Dropper

[tweetmeme source= ‘plamere’ only_single=false]

TL;DR;  I built a game called Name Dropper that tests your knowledge of music artists.

One bit of data that we provide via our web APIs is Artist Familiarity.  This is a number between 0 and 1 that indicates how likely it is that someone has heard of that artists.    There’s no absolute right answer of course – who can really tell if Lady Gaga is more well known than Barbara Streisand or  whether Elvis is more well known than Madonna. But we can certainly say that The Beatles are more well known, in general, than Justin Bieber.

To make sure our familiarity scores are good, we have a Q/A process where a person knowledgeable in music ranks our familiarity score by scanning through a list of artists ordered in descending familiarity until they start finding artists that they don’t recognize.  The further they get into the list, the better the list is.  We can use this scoring technique to rank multiple different familiarity algorithms quickly and accurately.

One thing I noticed, is that not only could we tell how good our familiarity score was with this technique, this also gives a good indication of how well the tester  knows music.  The further a tester gets into a list before they can’t recognize artists, the more they tend to know about music.   This insight led me to create a new game:  The Name Dropper.

The Name Dropper is a simple game.  You are presented with a list of dozen artist names.  One name is a fake, the rest are real.

If you find the fake, you go onto the next round, but if you get fooled, the game is over.    At first, it is pretty easy to spot the fakes, but each round gets a little harder,  and sooner or later you’ll reach the point where you are not sure, and you’ll have to guess.  I think a person’s score is fairly representative of how broad their knowledge of music artists are.

The biggest technical challenge in building the application was coming up with a credible fake artist name generator.  I could have used Brian’s list of fake names – but it was more fun trying to build one myself.  I think it works pretty well.  I really can’t share how it works since that could give folks a hint as to what a fake name might look like and skew scores (I’m sure it helps boost my own scores by a few points).  The really nifty thing about this game is it is a game-with-a-purpose.  With this game I can collect all sorts of data about artist familiarity and use the data to help improve our algorithms.

So go ahead, give the Name Dropper a try and see if you can push me out of the top spot on the leaderboard:

Play the Name Dropper


, , , , ,

6 Comments

Amsterdam Music Hack Day

The Amsterdam Music Hack Day is underway.  The Echo Nest is participating but due to some problems with actually getting there, we are participating virtually.    We needed someone to physically give our API presentation – Matt Ogle of Last.fm graciously offered to give it – so around 5AM this morning I had the surreal experience of watching via a  streaming webcam, employee #1 of Last.fm don an Echo Nest tee-shirt and talk about the Echo Nest APIs.  Surreal especially since many of our APIs overlap with Last.fm’s wonderful APIs – its kind of like seeing a Mercedes car salesman helping BMW meet their sales quota.  So many thanks to Matt – he’s a totally classy guy. He did such a great job that people tweeted that they thought the Echo Nest API presentation was one of their favorites of the music hack day.

Matt Ogle wearing an Echo Nest shirt presenting the Echo Nest API (photo by frenkie)

We are releasing a bunch of new stuff this weekend. So much stuff, in fact that it is hard to write about it all in one post, so I shall be posting in small doses.  Here’s what’s new from the Echo Nest:

So what is a Music Hack Day all about?  It’s the hacking!  This video gives you a taste:

,

2 Comments

The Echo Nest Song API

This weekend at the Amsterdam Music Hack day we are releasing lots of new stuff. First of all, we opening up beta access to the next version of our APIs.  This version is an all new architecture – that I’m rather excited about. Some new features:
  • Performance – api method calls run faster – on average API methods are running 3X faster than the older version.
  • JSON Output – all of our methods now support JSON output in addition to XML.  This greatly simplifies writing client libraries for the Echo Nest
  • Nimble coding – with the new architecture it will be much easier for us to roll out new features – so expect to see new features added to the Echo Nest platform every month
  • No cruft – we are revisiting our APIs to try to eliminate inconsistencies, redundancies and unnecessary features to make them as clean as we can.

The beta version of our next generation APIs are here:  http://beta.developer.echonest.com/

The first significant new API we are adding is the Song API – this gives you all sorts of ways to search for and retrieve song level data.  With the song API you can do the following:

  • search for songs via  artist name, song title, and description. You can affect the results with constraints and sorts:
    • constrain the results by a number of factors including musical attributes like tempo, loudness, time signature and key, artist hotttnesss, location
    • sort – the results by any of the attributes
  • Find similar songs – find similar songs to  a seed song
  • Find profile – get all sorts of info about a song including audio, audio summary info, track data for different catalogs, song hottttnesss, artist_hotttnesss, artist_location, and detailed track analysis
  • Identify songs – works in conjunction with the ENMFP

There are lots of things you can do with this API. Here’s just a quick sample of the types of queries you can make:

Find the loudest thrash songs

song/search?sort=loudness-desc&description=thrash

Find indie songs for jogging

song/search?min_tempo=120&description=indie&max_tempo=125

Fetch the tempo of Hey Jude

search?title=hey+jude&bucket=audio_summary&artist=the+beatles

Fetch the track audio and analysis of Bad Romance

search?title=bad+romance&bucket=tracks&bucket=id:paulify&artist=lady+gaga

Find songs similar to Bad Romance

song/similar?id=SOAOBBG127D9789749

We have two clients that support the new beta version of the API:
  • jen-api – a java client
  • beta_pyechonest – a new branch of the venerable pyechonest library. Grab it from SVN with
svn checkout http://pyechonest.googlecode.com/svn/branches/ beta-pyechonest-read-only

I’ll be writing more about all of the new APIs real soon.   Access the beta Echo Nest APIs here:

http://beta.developer.echonest.com/

, , ,

2 Comments