Archive for category Music

Revisiting iLike music recommendations

ilikeThere has been quite a bit of rumor in the last couple of days that iLike is about to be acquired by MySpace.  iLike is one of the biggest music apps in the Facebook world so it seems that this acquisition could set up an interesting dynamic between MySpace and Facebook.   I’ve never been a big fan of iLike. It never has really worked for me as a music discovery site, instead it always seemed to me to be just another social web site that just happened to use music taste as a way to find new friends.

Back in October 2005, on the day when iLike first launched, I took the site for a spin and wrote about the rather poor iLike music  recommendations.  Six months later I checked again and their music recommendations were still really crappy.  With iLike in the news, I decided to take one more  look to see how there music recommendations have improved since 2005. Here’s what I found.

For my first test, I created an iLike radio station with a seed artist of Miles Davis, iLike happily added The Pogues, Christina Aguileira and the Dixie Chicks to the mix. That left me feeling kind of blue.

ilike-still-sucksNext up, a little bit of James Brown – iLike filled out the playlist with the Pretenders and the electronic artist  A.M. (and who is Carl Hatmaker? – this feels like a shill recommendation for an iLike/Garageband artist). Again, a playlist that left my neck hurting from the iPod whiplash as I was jerked from genre to genre.

ilike-james-brownAnother try, some Aphex Twin.  This leads to some PJ Harvey, The Buzzcocks and the Mars Volta. (ouch!)

ilike-aphex-twin.1

Listening to Bob Marley – iLike gave me some Clapton, Moby and  Queen.

ilike-bob-marleyIt looks like today’s  iLike music recommendations are not  much better than they were back in October of 2005.  A good fraction of the recommended artists are clunkers that don’t match the seed artist – sometimes feeling like anti-recommendations – (Christina may be just about as far away from Miles as one can get).  They also like to sprinkle in their own Garageband artists which seems to me more like an artist promotion rather than an honest recommendation.  After four years, I’m still not impressed with iLike’s music recommendations.   When I’m looking for new music, I’ll continue to go somewhere else.  But I’m open minded, I’ll be sure to check in again in four years to see if they’ve got it right.

3 Comments

The Stairway Detector

Last night I was watching the pilot for Glee (a snarky TV version of High school musical) with my 3 teenage daughters.  I was surprised to hear the soundtrack filled with songs by the band Journey, songs that  brought me back to my own high school years.   The thing that I like the most about Journey is that many of their songs have this slow and gradual build up over the course of the whole song  as in this song Lovin Touchin Squeezin:

A number of my favorite songs have this slow build up. The canonical example is Zep’s ‘Stairway to Heaven’ – it starts with a slow acoustic guitar and over the course of 8 minutes builds to metal frenzy.    I thought it would be fun to see if I could write a bit of software that could find the songs that have the same arc as ‘Stairway to Heaven’ or ‘Lovin, Touchin Squeezin’  – songs that have this slow build. With this ‘stairway detector’  I could build playlists filled with the songs that fire me up.

The obvious place to start with is to look how the loudness of a song changes overtime. To do this I used the Echo Nest developer API to extract the loudness as a function of time for  Journey’s Lovin, Touchin Squeezin:

louness-journey-no-avgIn this plot the light green curve is the loudness, while the blue line is a windowed average of the loudness.  This plot shows a nice rise in the volume over the course of the song.   Compared to a song like the Beatles ‘Ticket to Ride’ that doesn’t have this upward slope:

loudness-ticket-to-ridFrom these two examples, it is pretty clear that we can build our stairway-detector just by looking at the average slope of the volume. The higher the slope, the bigger the build.  Now, I suspect that there’s lots of ways to find the average slope of a bumpy line – but I like to always try the simplest thing that could possibly work first – and for me the simplest thing was to just divide the average loudness of the second half of the song by the average loudness of the first half of the song.   So for example, with the Journey song the average loudness of the second half of the song is -15.86 db and the average of the first half of the song is -24.37 db.  This gives us a ratio of 1.54, while ‘Ticket to ride’ gets a ratio of 1.06.  Here’s the Journey song with averages shown:

loudness-for-journeyHere are a few more songs that fit the ‘slow build’ profile:

stairway-to-heaven‘Stairway to Heaven’ has a score of 1.6 so it has a bigger build than Journey’s Lovin’.

loudness-for-bridge-over-troubled-waterSimon and Garfunkle’s ‘Bridge over troubled water’ has an even bigger build with a score of 1.7.

Also sprach ZarathustraAlso sprach Zarathustra has a more modest score of  1.56

With this new found metric I analyzed a few thousand of the tracks in my personal collection to find the songs with the biggest crescendos.  The biggest of all was this song by Muse with a whopping score of  3.07:

loudness-for-muse-take-a-bowAnother find is Arcade Fire’s “My Body is a Cage” with a  score of 2.32.

loudness-for-my-body-is-a-cage

The metric isn’t perfect. For instance, I would have expected Postal Services ‘Natural Anthem’ to have a high score because it has such a great build up, but it only gets a score of 1.19. Looking at the plot we can see why:

loudness-for-postal-service-natural-anthemAfter the initial build up, there’s a drop an energy for that last quarter of the song, so even though the song has a sustained crescendo for 3 minutes it doesn’t get a high score due to this drop.

Of course, we can use this ratio to find tracks that go the other way, to find songs that gradually wind down. These seem to occur less frequently than the songs that build up.  One example is Neutral Milk Hotel’s Two Headed Boy:

loudness-for-two-headed-boy

Despite the fact that I’m using a very naive metric to find the loudness slope,  this stairway detector is pretty effective in finding songs that have that slow build.   It’s another tool that I can use for helping to build interesting playlists.  This is one of the really cool things about how the Echo Nest approaches music playlisting.   By having an understanding of what the music actually sounds like,  we can build much more interesting playlists than you get from genius-style playlists that only take into account  artists co-occurrence.

, , ,

1 Comment

WordPress and Soundcloud

yay! WordPress now directly supports the Soundcloud player, so now I can embedded my Soundcloud tracks.  Here’s a track that I built with Echo nest remix a few months back:

Leave a comment

Would you like a free ISMIR Registration?

My colleague and buddy Steve at Sun has an extra ISMIR registration that he’s going to give away to someone who really needs it.  So if a free registration may make the difference between whether or not you can get to ISMIR, head on over to Steve’s blog and read the details about how you can apply for this free registration.

Leave a comment

What is the tempo of this song?

Please help us settle a debate we are having in the office.  What is the tempo of this song?

26 Comments

New news feed for developer.echonest.com

en_logo_250x200_ltIf you are interested in keeping up with the latest news about the Echo Nest APIs you can now subscribe to a developer.echonest.com news feed where we are posting news and articles about the Echo Nest APIs.   Read more and subscribe at developer.echonest.com.

,

Leave a comment

Spotify for the iPhone

On the Spotify blog they have a video of the latest version of the Spotify iPhone app that has just been submitted to the iPhone app store for approval. Notice how on the video, the Spotify client  is in the position on the home screen that the iPod app normally occupies.  I wonder if Apple is going to like this.

Some of the interesting details emerging about the app are:

  • Won’t be released in the US app store since Spotify is not available in the U.S (sniff)
  • Free Download
  • Only works for premium users
  • Offline mode allows you to cache 3,333 tracks (!)
  • Works on iPod touch
  • Music stops when you switch away from the app

I’m really looking forward to being able to run this app.   And rumor is that  it won’t be long before people in the US get to play.

, , , ,

6 Comments

The Busker and the CTO

At the recent Music Hackday developers Matt Biddulph and George J Cook garnered the Echo Nest prize with their iPhone Music Visualiser.  They recently  took a few minutes to answer some of my questions about themselves and the hack – so, without further ado, here are their answers:

1) Tell me a bit about yourselves. Where do you live? What do you do for a living? What do you do for fun?

 Matt: I live in London and I’m the CTO at Dopplr (http://www.dopplr.com). I used to work at BBC Radio putting radio on the internet, and I’m a big music fan.

George: I live in London. I’m a musician and a flex contractor.

George as a digital busker

George as a digital busker

I was a busker for many years, and lived in a van, so now for fun I combine all of those aspects – I’m making an iphone app called iBusk: it’s the worlds first iphone busker. I also love being geeky and watching great movies – just saw Moon this weekend it’s really good, I highly recommend it.

2) How did each of you find your way to the Music Hackday. How did you hear about it? What made you want to hole up for 30+ hours with 200 programmers during a summer weekend?

Matt:I heard about the hackday from Dave Haynes, one of the organisers, whose company Soundcloud shares an office with us in East London. As a CTO I don’t always get a chance to spend solid time on coding as I’m busy running a company. The chance to sharpen some coding skills and try out some new APIs in a concentrated burst was very attractive. I heard the hackday was getting a lot of signups and I was looking forward to meeting a big crowd of like-minded geeks. Luckily the weather outside turned out to be pretty awful too.

George: I heard about it from my friend Jamie – he thought it’d be up my street, and he’s right.. the idea of lots of guys getting together for a common cause appeals to me – it has an A-team kind of feel to it, except the api’s are a bit more advanced than what ba hanniba and face would find in an old shed – though a montage of us building software probably isn’t as exciting as the A-team building a tank

 3) Had you met each other before the hack day? How did you decide to hook up and work together?

 Matt: We’d never met. I’d decided I wanted to do some for the iPhone as I’ve been learning Cocoa in my spare time. I was talking about what project to code with Eric from Soundcloud and George overheard us. He’s been working on some games that’ll be in the appstore soon and he was looking for an iPhone project to join.

 It turned out we’d both done some work with the cocos2d game framework and so we had a shared knowledge of basic graphics programming. We’re both programmers so we divided up the tasks – I concentrated mostly on the web API access and George did most of the cocos2d coding.

George: I’ve never met anyone at hack day before. Matt was sat 2 desks away and said the word “iphone app” loud enough for my detectors to kick in, so I asked him what he was up to and asked if I could help. He’s a nice chap, so he let me join him :)

 4) The project you built for hackday looks really cool – tell me about it – how did you build it? What APIs did you use? What’s next?

mhd-imv Matt: Our project uses the Soundcloud API to get a list of available tracks. When you choose a track, it downloads the MP3 and uploads it to Echonest for analysis (the free Objective C wrapper for the Echonest API helped us get started very quickly). When that’s done, it downloads the segment loudness data and uses it as a timeline to animate a visualisation of the music while playing back the track in sync. There’s a video at http://www.vimeo.com/5695496

 The OpenGL graphics are generated by cocos2d – http://cocos2d.org/ – which is a really easy-to-use and well-structured framework for games. It gives you primitives such as sprites, particle systems and drawing tools without needing any OpenGL knowledge.

 We used Github to collaborate on the source code while we were coding. We’ve open-sourced the code and so anyone who wants to use it as the basis for another project or improve the visualiser with better graphics is welcome to clone a copy from http://github.com/mattb/musichackday-viz

 

Matt presenting his and Georges hack

Matt presenting his and George's hack

 

George: Matt was the genius behind the API’s – and I see he’s already elaborated on that: We basically took the echonest analysis and used the cocos2d iphone engine to create graphical representaitons. I was excited to be doing something with echonest as I’m certainly going to be using it in the future versions of my new iphone app – it was really nice having the objective c wrappers for it too – THANKS whoever did those.

5) Did the hack day live up to your expectations – would you go again?

Matt:  Yes, it was a superb event. I love the hackday format and it was great to go to a music-specific event. I hear people are planning similar events around the world, including New York. That’d be great to go to. 

George: I thought it was great, but I was hoping more people would’ve bought instruments and jammed in the evening – I had no idea that people would keep working all evening! Those dudes are hardcore! I think I would go again if I could find some slackers who’d be willing to take a chill pill, grab some bongo’s and guitars and jam out for the night, otherwise it’d be too much for me… too many hours in an office and I go slightly nuts ;)

Now time for the lightning round questions –

1) Mac, PC or Linux?

Matt: Mac

George: Mac

2) Programming Language of choice?

Matt: Ruby

George: Objective c

3) vi / emacs or other?

Matt: vi

George: pico ( I know, I suck)

4) Favorite coding music?

Matt: drum’n’bass and dubstep

George: gorillaz

5) Most frequently used web API

Matt: Flickr

George: google maps

6) Favorite music discovery site
Matt: Songkick

George: last.fm

7) My most frequently played song that I’m rather embarrassed about is:

Matt: Bohemian Rhapsody

George: interesting drug, off of bona drag, by morrissey


Thanks Matt, Thanks George for taking the time to answer these questions.




,

1 Comment

DJ API’s secret sauce

Last week at the Echo Nest 4 year anniversary party we had two renown DJs keeping the music flowing.  DJ Rupture was the featured act – but opening the night was the Echo Nest’s own DJ API (a.k.a Ben Lacker)  who put together a 30 minute set using the Echo Nest remix.

 

DJ API at work (Photo by Jason Sundram

DJ API at work (Photo by Jason Sundram

I was really quite astounded at the quality of the tracks Ben put together (and all of them apparently done on the afternoon before the gig).  I asked Ben to explain how he created the tracks. Here’s what he said:

1. ‘One Thing’ – featuring Michael Jackson’s (dj api’s rip)

I found a half-dozen a cappella Michael Jackson songs as well as instrumental and a cappella recordings of Amerie’s “One Thing” on YouTube. To get Michael Jackson to sing “One Thing”, I stitched all his a cappella tracks together into a single track, then ran afromb: for each segment in the a cappella version of “One Thing”, I found the segment in the MJ a cappella medley that was closest in pitch, timbre, and loudness. The result sounded pretty convincing, but was heavy on the “uh”s and breath sounds. Using the pitch-shifting methods in modify.py, I shifted an a cappella version of “Ben” to be in the same key as “One Thing”, then ran afromb again. I edited together part of this result and part of the first result, then synced them up with the instrumental version of “One Thing.”

2. One Thing (dj api’s gamelan version)

I used afromb again here, this time resynthesizing the instrumental version of “One Thing” from the segments of a recording of a Balinese Gamelan Orchestra. I synced this with the a cappella version of “One Thing” and added some kick drums for a little extra punch

3. Billie Jean (dj api screwdown)

First I ran summary on an instrumental version of Beyoncé’s “Single Ladies (another YouTube find) to produce a version consisting only of the “ands” (every second eighth note). I then used modify.shiftRate to slow down an a cappella version of “Billie Jean” until its tempo matched that of the summarized “Single Ladies”. I synced the two, and repeated some of the final sections of “Single Ladies” to follow the form of “Billie Jean

It was a great set and everyone had a good time listening to the morphed tunes. At the next party hopefully we’ll get to see Ben do some live remix performance programming during the set (which of course won’t be a set, it will really be a python list).

, , ,

7 Comments

Artist radio in 10 lines of code

Last week we released Pyechonest, a Python library for the Echo Nest API.  Pyechonest gives the Python programmer access to the entire Echo Nest API including artist and track level methods.  Now after 9 years working at Sun Microsystems, I am a diehard Java programmer, but I must say that I really enjoy the nimbleness and expressiveness of Python.  It’s fun to write little Python programs that do the exact same thing as big Java programs.  For example, I wrote an artist radio program in Python that, given a seed artist, generates a playlist of tracks by wandering around the artists in the neighborhood of the seed artists and gathering audio tracks.   With Pyechonest, the core logic is 10 lines of code:

def wander(band, max=10):
   played = []
   while max:
     if band.audio():
         audio = random.choice(band.audio())
         if audio['url'] not in played:
             play(audio)
             played.append(audio['url'])
             max -= 1
     band = random.choice(band.similar())

(You can see/grab the full code with all the boiler plate in the SVN repository)

This method takes a seed artist (band) and selects a random track from set of audio that The Echo Nest has found on the web for that artist, and if we haven’t already played it, then do so. Then we select a near neighbor to the seed artist and do it all again until we’ve  played the desired number of songs.

For such a simple bit of code, the playlists generated are surprisingly good..Here are a few examples:

Seed Artist:  Led Zeppelin:

(I think the Dale Hawkins version of Susie-Q after  CCR’s Fortunate Son  is just brilliant)

Seed Artist: The Decemberists:

(Note that audio for these examples is audio found on the web – and just like anything on the web the audio could go away at any time)

I think these artist-radio style playlists rival just about anything you can find on current Internet radio sites – which ain’t to0 bad for 10 lines of code.

, , , , , ,

9 Comments