Revisiting the click track

February 8, 2010

One of my more popular posts from last year was ‘In Search of the Click track‘ where I posted some plots showing the tempo deviations from the average tempo for a number of songs.  From these plots it was pretty easy to see which songs had a human setting the beat and which songs had a machine setting the beat (be it a click track, drum machine or an engineer fitting the song to a tempo grid).  I got lots of feedback along with many requests to generate click plots for particular drummers.   It was  a bit of work to generate a click plot (find the audio, upload it to the analyzer, get the results, normalize the data, generate the plot, convert it to an image and finally post it to the web) so I didn’t create too many more.

Last week Brian released the alpha version of a nifty new set of APIs that give access to the analysis data for millions of tracks.  Over the weekend, I wrote a web application that takes advantage of the new APIs to make it easy to get a click plot for just about any track. Just type in the name of the artist and track and you’ll get the click plot – you don’t have to find the audio or upload it or wrestle with python or gnuplot.  The web app is here:

In Search of the Click Track

Here are some examples of the output. First up is a plot of  “I love rock’n’ roll’  by Britney Spears.   The plot shows the tempo deviations from the average song tempo over the course of the song.  The plot shows that there’s virtually no deviation at all.  Britney is using a machine to set the beat.

click plot for britney spears

Now compare Britney’s plot to the click plot for the song ‘So Lonely’ by the Police:

click plot for so lonely by the policeHere we see lots of tempo variation.  There are four main humps each corresponding to each chorus where Police drummer Stewart Copeland accelerates the beat.  Over the course of the song there is an increase in the average  tempo that build tension and excitement.  In this song the tempo  is maintained by a thinking, feeling human, whereas Britney is using a coldhearted, sterile machine to set the tempo for her song.

For some types of music, machine generated tempos are appropriate.  Electronica, synthpop and techno benefit from an ultra-precise tempo. Some examples are Kraftwerk and The Postal Service:

click plot for kraftwerkclick plot for postal serviceBut for many songs, the tempo variations add much to the song.  The gradual speed up in Jefferson Airplane’s White Rabbit:

click plot for white rabbit

and the crescendo in ‘In the Hall of the Mountain King’:

click plot of in the hall of the mountain kingAnd in the Rolling Stone’s Sympathy for the Devil

rolling stone click plot

It is also fun to use the click plots to see how steady drummers are (and to see which ones use clicktracks).  Some of my discoveries:

Keith Moon used a click track on ‘Won’t Get Fooled Again’:

click plot for the who(You can see him wearing headphones in this video)

It looks like Neil Peart uses a click track on Stick it out:

rush click plot

Art Blakey can really lay it down without a click track (he really looks like a machine here):

blakey click plotAs does Ginger Baker (or does he use a click?):

It seems that all of the nümetal bands use clicks:

Breaking Benjamin

Seether

Nickelback

click plot for nickeback As do some of the indie bands:

The Decemberists

click plot for the decemberistsVampire Weekend

click plot for vampire weekendMGMT

MGMT click plot

I find it interesting to look at the various click plots. It gives me a bit more insight into the band and the drummer.  However, some types of music such as progressive rock – with its frequent time signature and tempo changes are really hard to  plot – which is too bad since many of the best drummers play prog rock.

In addition the plots I attempted a couple of objective metrics that can be used to measure the machine like quality of drummer. The Machine Score is a measure of how often the beat is within a 2 BPM window of the average tempo of the song.  Higher numbers indicate that the drummer is more like a machine.  This metric is a bit troublesome for songs that change tempo, a song that changes tempo often may have a lower machine score than it should.   The Longest run of machine like drumming is the count of the longest stretch of continuous beats that are within 1BPM of the average tempo of the song.  Long runs (over a couple hundred beats) tend to indicate that a machine is in charge of the beat. Both these metrics are somewhat helpful in determining whether or not the drumming is live, but I still find that the best determinate is to look at the plot.  More work is needed here.

The new click plotter was a fun weekend project.  I got to use rgraph – an HTML5 canvas graph library (thanks to Ryan for suggesting client-side plotting), along with cherrypy, pound and, of course, the Brian’s new web services.  The whole thing is just 500 lines of code.

I hope you enjoy generating your own click plots. If you find some interesting ones post a link here and I’ll add them to the Gallery of Drummers.


Roundup of Echo Nest hacks at Stockholm Music Hack Day

February 1, 2010

Tristan at the Stockholm Hackday

The first music hack day of the new decade is in the can. There were lots of great hacks produced over the weekend.  Here are some of the hacks that used the Echo Nest APIs”

  • Proxim.fm – PresentRadio is a QT4 application using the open source Last.fm libraries, it has metadata views and muchos dataporn provided by Echonest. It looks out for local bluetooth devices and will seamlessly switch to the new station when new people arrive/leave without interrupting the track.
  • All In My Box - Allows non-djs to whip up sweet 1 hour mixes in seconds (err, minutes, considering the time to actually beat-match the songs on the server). The drag and drop interface allows users to choose genres and artists and drop them onto a timeline. We use the Echo Nest api to get tracks from the selected genres and artists and stitch them together to create a mix that flows from artist to genre and back again. Echo Nest Prize Winner
  • Echo Nest Midi Player – The Echo Nest Midi Player is a small box you plug into your music instrument (with midi protocol), and on the internet. In real time it plays tracks analysed on the Echo Nest. Echo Nest Prize Winner
  • discoveOMaticdiscoverOmatic allows you to discover new artists and tracks while listening to the radio or even your own collection. Simply select the radio station you’re currently listening to (currently on BBC brands supported) and we’ll do the rest. If you’re listening to music through other means and scrobbling to last.fm we can provide recommendation based on your currently playing or most recently scrobbled track as well. Discover the great music while listening to what you like with the discoverOmatic!

  • All Music Is Equal - Take any piece of music and turn it into a “music pupil plays church organ, using a slightly stumbling metronome” version!

Screencast:

  • Mystery Music Search - Mystery Music Search gives you the results for whatever the person before you searched for. Heavily inspired by mysterygoogle.com, and using the new Echonest search_tracks api. Echo Nest Prize Winner

  • MashboardMashboard is a simple dashboard for your SoundCloud tracks. You can analyze the tracks using the EchoNest analysis API, returning Key/Mode, BPM, and song section information that is written to the appropriate metadata fields in the SoundCloud track. What’s more, you can scrobble your tracks to your Last.fm profile while listening on your Mashboard profile page. Last, but certainly not least, you can trade your SoundCloud tracks on TuneRights by making and accepting offers from other users, managing the shareholders of your tracks, and bidding on other tracks in the TuneRights system. Echo Nest Prize Winner
  • HacKeyThis hack looks gives you a chart that shows you the keys of your most listened to songs in your last.fm profile.  (Read more about HacKey in this post).
    Echo Nest Prize Winner

  • AlbexOne - A mechanical device that creates unique visual patterns of the songs you are listening to! – Echo Nest Prize Winner

Congrats to all the winners and thanks to all for making cool stuff with the Echo Nest!


Music Hack Day Hacks – HacKey

January 31, 2010

The Stockholm Music Hack Day hacks are starting to roll in.  One really neat one is ‘hackKey‘ by Matt Ogle from Last.fm.  This hack looks gives you a chart that shows you the keys of your most listened to songs in your last.fm profile:

As you can see my favorite key is E minor.  I should put this on a tee-shirt.

The hack uses Brian’s new search_tracks API  for the key identification. Cool beans!   Will we see flaneur in velour?

I don’t know how well Matt’s hack will scale so I won’t put a link to it here on the blog until after he’s done demoing it at the hack day. Matt’s demo is done so here’s the link: http://users.last.fm/~matt/hackey/


Scar – an automatic remix of ‘Cars’

January 30, 2010

An automatic cut-up by Adam Lindsay of this video:

Adam says: No human choices were made in the creation of this video. The video and the audio are always cut in sync with reference to the original: what you see and hear at any given moment are what Rob Sheridan captured in real time with his single camera setup.


New Echo Nest APIs demoed at the Stockholm Music Hackday

January 30, 2010

photo by by Jon Åslund

Today at the Stockholm Music Hack Day, Echo Nest co-founder Brian Whitman demoed the alpha version of a new set of Echo Nest APIs .  There are 3 new public methods and hints about a fourth API method.

  • search_tracks: This is IMHO the most awesomest method in the Echo Nest API.   This method lets you search through the millions of tracks that the Echo Nest knows about.  You can search for tracks based on artist and track title of course, but you can also search based upon how people describe the artist or track (‘funky jazz’, ‘punk cabaret’, ’screamo’.  You can constrain the return results based upon musical attributes (range of tempo, range of loudness, the key/mode), you can even constrain the results based upon the geo-location of the artist.   Finally, you can specify how you want the search results ordered. You can sort the results by tempo, loudness, key, mode, and even lat/long.This new method lets you fashion all sorts of interesting queries like:
    • Find  the slowest songs by Radiohead
    • Find  the loudest  romantic songs
    • Find  the northernmost rendition of a reggae track

    The index of tracks for this API is already quite large,  and will continue to grow as we add more music to the Echo Nest.  (but note, that this is an alpha version and thus it is subject to the whims of the alpha-god – even as I write this the index used to serve up these queries is being rebuilt so only a small fraction of our set of tracks are currently visible).  And BTW  if you are at the Stockholm Music Hack Day, look for Brian and ask him about the secret parameter that will give you some special search_tracks goodness!

    One of the things you get back from the search_tracks method is a track ID.  You can use this track ID to get the analysis for any track using the new get_analysis method.  No longer do you need to upload a track to get the analysis for it. Just search for it and we are likely to have the analysis already. This search_tracks method has been the most frequently requested method by our developers, so I’m excited to see this method be released.

  • get_analysis – this method will give you the full track analysis for any track, given its track ID.  The method couldn’t be simpler, give it a track ID and you get back a big wad-o-json.  All of the track analysis, with one call.  (Note that for this alpha release, we have a separate track ID space from the main APIs, so IDs for tracks that you’ve analyzed with the released/supported APIs won’t necessarily be available with this method).
  • capsule – this is an API that supports this-is-my-jam functionality.  Give the API a URL to an XSPF playlist and you’ll get back some json that points you to both a flashplayer url and an mp3 url to a capsulized version of the playlist.  In the capsulized version, the song transitions are aligned and beatmatched like an old style DJ would.

Brian also describes a new identify_track method that returns metadata for a track given the Echo Nest a set of  musical fingerprint hashcodes.  This is a method that you use in conjunction with the new Echo Nest audio fingerprinter (woah!).   If you are at the Stockholm music hackday and you are interested in solving the track resolution problem talk to  Brian about getting access to the new and nifty audio fingerprinter.

These new APIs are still in alpha – so lots of caveats surround them. To quote Brian: we may pull or throttle access to alpha APIs at a different rate from the supported ones. Please be warned that these are not production ready, we will be making enhancements and restarting servers, there will be guaranteed downtime.

The new APIs hint at the direction we are going here at the Echo Nest.  We want to continue to open up our huge quantities of data for developers, making as much of it available as we can to anyone who wants to build music apps.   These new APIs return JSON -  XML is so old fashioned. All the cool developers are using JSON as the data transport mechanism nowadays: its easy to generate, easy to parse and makes for a very nimble way to work with web-services.  We’ll be adding JSON support to all of our released APIs soon.

I’m also really excited about the new fingerprinting technology.  Here at the Echo Nest we know how hard it is to deal with artist and track resolution – and we want to solve this problem once and for all, for everybody – so we will  soon be releasing an  audio fingerprinting system.  We want to make this system as open as we can, so we’ll make all the FP data available to anyone. No secret hash-to-ID algorithms, and no private datasets.  The  Fingerprinter is fast, uses state-of-the-art audio analysis and will be backed by a dataset of fingerprint hashcodes for millions of tracks.   I’ll be writing more about the new fingerprinter soon.

These new APIs should give those lucky enough to be in Stockholm this weekend something fun to play with.  If you are at the Stockholm Hack Day and you build something cool with these new APIs you may find yourself going home with the much coveted Echo Nest sweatsedo:


Live coverage of the Stockholm Music hackday

January 30, 2010

There’s a great live feed of the Stockholm music hack day that is happening now:  http://stockholm.musichackday.org/live/ with tweets, photos and video.  Here’s a photo that Tristan took of Brian giving the Echo Nest workshop:


Best ever Echo Nest prize at the Stockholm Music Hackday

January 26, 2010

Yep, the Sweatsedos have arrived in Stockholm.  4 lucky users of the Echo Nest API will get to wear the official Echo Nest uniform home as a prize for their efforts.


Two new sweatsedos in the office

January 25, 2010

Meet Mr. QA and Dr. Scalable Architecture (He's not a real doctor)


What I see everyday at The Echo Nest

January 22, 2010


Stockholm Music Hack day

January 20, 2010

Nifty video showing the site for the upcoming Stockholm Music Hackday:

Via Mattias Arrelid’s Blog