Remixing for the masses at SXSW 2010

We are hoping to be able to present a panel on  Echo Nest remix at next year’s SXSW interactive.  We want to show lots of rather nifty ways that one can use Echo Nest remix to manipulate music – lots of code plus lots of music and video remix examples. What could be more fun?  To actually get to present the panel we have to make it through the SXSW panel picking process.  If you think this might be a good panel, head on over to our panel proposal page and vote for our panel called ‘remixing for the masses‘.

,

Leave a comment

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

Making better plots

For many years, I’ve used awk and gnuplot to generate plots but as I switch over to using Python for my day to day programming, I thought there might be a more Pythonic way to do plots.  Google pointed me to Matplotlib and after kicking the tires, I’ve decided to retire gnuplot from my programming toolkit and replace it with matplotlib.

mat-plot-lib

Matplotlib is a 2D plotting library that produces a wide variety of high quality figures suitable for interactive applications or for inserting into publications.  A quick tour of the gallery shows the wide range of plots that are possible with Matplotlib.    The syntax for creating plots is simple and familiar to anyone who’s used matlab for plotting.

With this new tool in my programming pocket, I thought I’d update my click plotter program to use matplotlib.  (The click plotter is a program that generates plots showing how a drummer’s BPM varies over the course of a song.  By looking at the generated plots it is easy to see if the beat for a song is being generated by a man or  a machine. Read more about it in ‘In Search of the Click Track‘).

The matplotlib code to generate the plots is straightforward:

def plot_click_track(filename):
   track = track_api.Track(filename)
   tempo = float(track.tempo['value'])
   beats = track.beats
   times = [ dict['start'] for dict in beats ]
   bpms = get_bpms(times)
   plt.title('Click Plot for ' + os.path.basename(filename))
   plt.ylabel('Beats Per Minute')
   plt.xlabel('Time')

   plt.plot(times, get_filtered_bpms(bpms), label='Filtered')
   plt.plot(times, bpms, color=('0.8'), label='raw')
   plt.ylim(tempo * .9, tempo * 1.1)
   plt.axhline(tempo, color=('0.7'), label="Tempo")
   plt.show()

The complete source code for click_plot is in the example directory of the pyechonest module.

Here are a few examples plots generated by click_plot:

tom-sawyer-live

porcupine_tree_what_happens_now

buddy_rich_on_carson

elp_rondo_live

To create your own click plots grab the example from the SVN repository, make sure you have pyechonest and matplotlib installed, get an Echo Nest API key and start generating click plots with the command:

%  click_plot.py  /path/to/music.mp3

, , ,

Leave a comment

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