Posts Tagged The Echo Nest
Hacking on the Echo Nest on Music Hackday
Posted by Paul in code, Music, The Echo Nest, web services on July 9, 2009
Music Hackday is nearly upon us. If you want to maximize your hacking time during the hackday there are a few things that you can do in advance to get ready to hack on the Echo Nest APIs:
- Get an Echo Nest API Key – If you are going to be using the API, you need to get a key. You can get one for free from: developer.echonest.com
- Read the API overview – The overview gives you a good idea of the capabilities of the API. If you are thinking of writing a remix application, be sure to read Adam Lindsay’s wonderful remix tutorial.
- Pick a client library – There are a number of client libraries for The Echo Nest (link will be live soon)- select one for your language of choice and install it.
- Think of a great application – easier said than done. If you are looking for some inspiration, checkout these examples: morecowbell, donkdj, Music Explorer FX, and Where’s the Pow? . You’ll find more examples in the Echo Nest gallery of Showcase Apps. If you are stuck for an idea ask me (paul@echonest.com) or Adam Lindsay – we have a list of application ideas that we think would be fun to write.
At the end of the hackday, Adam will choose the Most Awesome Echo Nest Hackday Application. The developer of this application will go home a shiny new iPod touch. If you want your application to catch Adam’s eye write an Echo Nest application that makes someone say “woah! how did you do that!”, extra points if its an application with high viral potential.
I’m rather bummed that I won’t be attending the event, so I hope folks takes lots of pictures and post them to flickr so I can have a vicarious hackday experience.
The Sinister Index
Posted by Paul in data, fun, Music, research, The Echo Nest, web services on July 8, 2009
Like many, I like to eat Cheetos,
when I’m relaxing and browsing the web, especially when I’m looking for new music. The problem is that Cheetos leaves this nasty residue on the fingers which gets transferred to the keyboard rather quickly. To avoid this problem I like to use my keyboard one handed (I know what you are thinking, but really, its the Cheetos). Which is why one of my favorite bands is Weezer. I can type ‘weezer’ with my left hand leaving my right hand free for Cheetos, and leaving my keyboard clean. Still, I was in the mood for music by some other bands so I thought it would be interesting to find all of the bands that can be typed using just my left hand. I wrote a Python script, ran it on a list of about 800 thousand artist names and came up with a rather large list of sinister band names. Here are the longest:
der weg des wassers
everette red bear
sweet ever after
state far better
cassettezzzzzzzz
barbara decesare
westgate street
streetbeat crew
street bastards
reve de cabaret
rebecca everett
cabezas de cera
barbara taggart
warsaw was raw
Restricting the search to just the more popular artists I find this list of popular sinister artists:
wet wet wet
savatage
bee gees
seabear
garbage
cascada
carcass
caesars
weezer
feeder
vader
texas
sweet
stars
seeed
eve 6
dredg
creed
vast
sade
free
bebe
abba
xtc
war
rza
eve
era
d12
atb
afx
abc
311
112
bt
To be evenhanded, I offer this list of dexterous artists:
phillip moll
phillip hill
yumiko ohno
yoon il-loh
uh uh loony
polmo polpo
pinko pinko
opi yum yum
oli oli oli
oh no oh my
nylon union
nylon pylon
monki monki
homo homini
yuko kouno
yuho yokoi
And a list of popular dexterous artists:
yoko ono
moloko
pulp
pink
mylo
mono
koop
mum
iio
him
l7
There seem to be many more sinister artists than dexterous artists. I suspect that this is because many artists now recognize the Cheetos issue and are selecting sinister names. Since identifying sinister artists is becoming such a big issue in music search, we will likely be offering a sinister index as part of The Echo Nest web services. The sinister index is a number between zero and one that indicates how easy it is to type the artist name with your left hand. Weezer has a sinister index of 1 while Yoko Ono has a sinister index of zero. Look for it soon.
Flash API for the Echo Nest
Posted by Paul in code, The Echo Nest, web services on July 8, 2009
It’s a busy week for client APIs at the Echo Nest. Developer Ryan Berdeen has released a Flash API for the Echo Nest. Ryan’s API supports the track methods of the Echo Nest API, giving the flash programmer the ability to analyze a track and get detailed info about the track including track metadata, loudness, mode and key along with detailed information relating to the tracks rhythmic, timbrel, and harmonic content.
One of the sticky bits in using the Echo Nest from Flash has been the track uploader. People have had a hard time getting it to work – and since we don’t do very much Flash programming here at the nest it never made it to the top of the list of things to look into. However, Ryan dug in an wrote a MultipartFormDataEncoder that works with the track upload API method – solving the problem not just for him, but for everyone.
Ryan’s timing for this release is most excellent. This release comes just in time for Music Hackday – where hundreds of developers (presumably including a number of flash programmers) will be hacking away at the various music APIs including the Echo Nest. Special thanks goes to Ryan for developing this API and making it available to the world
You make me quantized Miss Lizzy!
Posted by Paul in code, Music, remix, The Echo Nest, web services on July 5, 2009
This week we plan to release a new version of the Echo Nest Python remix API that will add the ability to manipulate tempo and pitch along with all of the other manipulations supported by remix. I’ve played around with the new capabilities a bit this weekend, and its been a lot of fun. The new pitch and tempo shifting features are integrated well with the API, allowing you to adjust tempo and pitch at any level from the tatum on up to the beat or the bar. Here are some quick examples of using the new remix features to manipulate the tempo of a song.
A few months back I created some plots that showed the tempo variations for a number of drummers. One plot showed the tempo variation for The Beatles playing ‘Dizzy Miss Lizzy’. The peaks and valleys in the plot show the tempo variations over the length of the song.

You got me speeding Miss Lizzy
With the tempo shifting capabilities of the API we can now not only look at the detailed tempo information – we can manipulate it. For starters here’s an example where we use remix to gradually increase the tempo of Dizzy Ms. Lizzy so that by the end, its twice as fast as the beginning. Here’s the clickplot:
And here’s the audio
I don’t notice the acceleration until about 30 or 45 seconds into the song. I suspect that a good drummer would notice the tempo increase much earlier. I think it’d be pretty fun to watch the dancers if a DJ put this version on the turntable.
As usual with remix – the code is dead simple:
st = modify.Modify()
afile = audio.LocalAudioFile(in_filename)
beats = afile.analysis.beats
out_shape = (2*len(afile.data),)
out_data = audio.AudioData(shape=out_shape, numChannels=1, sampleRate=44100)
total = float(len(beats))
for i, beat in enumerate(beats):
delta = i / total
new_ad = st.shiftTempo(afile[beat], 1 + delta / 2)
out_data.append(new_ad)
out_data.encode(out_filename)
You got me Quantized Miss Lizzy!
For my next experiment, I thought it would be fun if we could turn Ringo into a more precise drummer – so I wrote a bit of code that shifted the tempo of each beat to match the average overall tempo – essentially applying a click track to Ringo. Here’s the resulting click plot, looking as flat as most drum machine plots look:
Compare that to the original click plot:
Despite the large changes to the timing of the song visibile in the click plot, it’s not so easy to tell by listening to the audio that Ringo has been turned into a robot – and yes there are a few glitches in there toward the end when the beat detector didn’t always find the right beat.
The code to do this is straightforward:
st = modify.Modify()
afile = audio.LocalAudioFile(in_filename)
tempo = afile.analysis.tempo;
idealBeatDuration = 60. / tempo[0];
beats = afile.analysis.beats
out_shape = (int(1.2 *len(afile.data)),)
out_data = audio.AudioData(shape=out_shape, numChannels=1, sampleRate=44100)
total = float(len(beats))
for i, beat in enumerate(beats):
data = afile[beat].data
ratio = idealBeatDuration / beat.duration
# if this beat is too far away from the tempo, leave it alone
if ratio < .8 and ratio > 1.2:
ratio = 1
new_ad = st.shiftTempoChange(afile[beat], 100 - 100 * ratio)
out_data.append(new_ad)
out_data.encode(out_filename)
Is is Rock and Roll or Sines and Cosines?
Here’s another tempo manipulation – I applied a slowly undulating sine wave to the overall tempo – its interesting how more disconcerting it is to hear a song slow down than it does hearing it speed up.
I’ll skip the code for the rest of the examples as an exercise for the reader, but if you’d like to see it just wait for the upcoming release of remix – we’ll be sure to include these as code samples.
The Drunkard’s Beat
Here’s a random walk around the tempo – my goal here was an attempt to simulate an amateur drummer – small errors add up over time resulting in large deviations from the initial tempo:
Here’s the audio:
Higher and Higher
In addition to these tempo related shifts, you can also do interesting things to shift the pitch around. I’ll devote an upcoming post to this type of manipulation, but here’s something to whet your appetite. I took the code that gradually accelerated the tempo of a song and replaced the line:
new_ad = st.shiftTempo(afile[beat], 1 + delta / 2) with this:new_ad = st.shiftPitch(afile[beat], 1 + delta / 2)in order to give me tracks that rise in pitch over the course of the song.
Wrapup
Look for the release that supports time and pitch stretching in remix this week. I’ll be sure to post here when it is released. To use the remix API you’ll need an Echo Nest API key, which you can get for free from developer.echonest.com.The click plots were created with the Echo Nest BPM explorer – which is a Java webstart app that you can launch from your browser at The Echo Nest BPM Explorer site.
The Coolness Index
Posted by Paul in data, fun, Music, The Echo Nest on July 1, 2009
Some artists just are not cool – your mom likes ABBA, so there’s no way you are going to listen to them, even if you think Mamma Mia is rather catchy. Likewise you may think High School Musical’s ‘Bop to the top’ is mucho gusto, but you don’t want anyone to know it. Coolness is hard to quantify, ephemeral and transient (and of course, very subjective); some artists like Miles Davis and the Velvet Underground will always be totally cool – while some fade in and out of coolness (Elvis, Stevie Wonder, Neil Diamond, Sting), and some artists – well, it is hard to tell if they were ever cool (Miley Cyrus, Creed, and Nickeback come to mind).
Imagine if there was an objective measure for coolness – a number that could be attached to each artist that indicated how ‘cool’ the artist was. We’d be able to do all sorts of interesting things with such a ‘coolness index’. We could make a ‘music makeover’ playlist that would take you from Miley to Miles in 12 songs (consider it a 12-step taste recovery program) or we could create a music rehab playlist that takes you from Amy Winehouse to Kate Nash. But of course, the concept of cool is too hard to nail down. Is Johnny Cash cool? Michael Jackson? Prince? Context, demographics, locale all play a role.
It may be too hard to tell whether an artist is cool, but we have all sorts of ways to tell that an artist is definitely not cool. For instance, if lots of listeners really don’t want people to know that they are listening to a particular artist, then that artist is probably not too cool. Luckily, there’s an interesting source for just this kind of data. Recently, the researchers at Last.fm published a list of the ‘most unwanted scrobbles‘. This is a list of tracks that were most frequently deleted by the Last.fm community from their scrobbles in the last month. These are the tracks that Last.fm listeners didn’t want people to know that the listened to. Here’s the first page of the most unwanted scrobbles:
Kudos to Last.fm for publishing this data. It’s a great source for the uncool. Collecting all the artists from the pages we can build a list of artists that have frequently had their scrobbles deleted:
Lady GaGa
Britney Spears
Katy Perry
Rihanna
Paramore
Coldplay
Taylor Swift
Beyoncé
Avril Lavigne
Marc Seales, composer. New Stories. Ernie Watts, saxophone
Alexander Rybak
Black Eyed Peas
Kings of Leon
Muse
My Chemical Romance
Linkin Park
Korn
Miley Cyrus
Jason Mraz
Metro Station
Leona Lewis
Green Day
Evanescence
Amy Whinehouse
Oasis
Nelly Furtado
This list rings true as set of ‘uncool’ artists (with the exception Marc Seales, who happens to have a piece of music, called ‘Highway Blues’, that can be found in most ‘Sample Music’ folders on most Windows XP computers, and is likely frequently scrobbled because of this). Ideally this list should be normalized for popularity – naturally artists that have more listeners will be scrobbled more and consequently be deleted more too. but there’s not enough data in this list to normalize properly so we’ll make do with an unnormalize list. I find it interesting how many female acts are on the list. Is it not cool to listen to female artists?
Another approach to find the uncool is to look for artists that have been tagged as ‘guilty pleasure’ on sites like Last.fm. For these artists, by applying the ‘guilty pleasure’ tag people are identifying artists that they are embarrassed to be listening to. Here’s a list of the top 100 popular artists that have been frequently tagged with ‘guilty pleasure’ – for this list I’m normalizing the data so popularity doesn’t factor into the list order:
Katy Perry
Ashlee Simpson
Spice Girls
Lindsay Lohan
Mandy Moore
Jessica Simpson
Backstreet Boys
Hilary Duff
Metro Station
Britney Spears
Justin Timberlake
Taylor Swift
Rihanna
The Pussycat Dolls
Kelly Clarkson
Christina Aguilera
Fall Out Boy
Take That
Avril Lavigne
Ricky Martin
Girls Aloud
Fergie
Neil Diamond
McFly
Robyn
The Veronicas
Ace of Base
ABBA
Cline Dion
Chris Brown
All Time Low
Kanye West
Gwen Stefani
Good Charlotte
P!nk
Usher
blink-182
R. Kelly
Nelly Furtado
The Get Up Kids
Madonna
Timbaland
Beyonce
New Found Glory
Natasha Bedingfield
Akon
Jem
Ciara
Robbie Williams
Paramore
The Wallflowers
Michelle Branch
Taking Back Sunday
Creed
Savage Garden
The All-American Rejects
Simple Plan
Shania Twain
Sugababes
Tegan and Sara
Everclear
Sugarcult
The Starting Line
Brand New
Destiny’s Child
Cyndi Lauper
Mariah Carey
Westlife
Maroon 5
Melanie C
Jennifer Lopez
Michael Jackson
Kelis
Tears for Fears
Alkaline Trio
Dashboard Confessional
Vanessa Carlton
Lily Allen
Bowling for Soup
Jet
50 Cent
Trivium
Cher
Eve 6
Sean Paul
Kylie Minogue
Howie Day
Sophie Ellis-Bextor
My Chemical Romance
Third Eye Blind
Saves the Day
Bryan Adams
Blondie
Boston
John Mellencamp
Simply Red
Whitney Houston
The Corrs
The Calling
Motion City Soundtrack
There’s overlap between the two lists: Avril, Britney, Katy, Nelly, Taylor, Rihanna, along with the Disney crowd. Again, there seems to be an anti-female coolness bias on the list. It is hard to be cool and female.
The ‘most unwanted scrobbles’ and the ‘guilty+pleasure’ approach to the coolness index only get us so far. They can help us identify music that people are embarrassed to admit that they enjoy. But they only give us one end of the coolness spectrum. We can find what is not cool, but we can’t find out what is cool. We have in effect an ‘Uncoolness Index’. Still, knowing which artists are uncool can be helpful for all sorts of things. If we are building a playlist for that party, we can turn on the uncool filter to make sure that Ricky Martin or Robbie Williams won’t sneak into the mix. Likewise, if we are building a recommender, we can use the Uncoolness index to decide how cool the user is and recommend music that’s slightly less uncool than what they are used to listening to.
Next steps are to figure out how to learn not just what is uncool, but also what is cool, so we can build the true ‘coolness index’ and be able to tell how cool any artist is. I think that is going to be a harder problem, but I have some ideas …
The Echo Nest Cocoa Framework
Posted by Paul in code, Music, The Echo Nest, web services on July 1, 2009
Kamel Makhloufi (aka melka) has created a Cocoa Framework for the Echo Nest and has released it as open source. This framework makes it easy for Mac developers (and presumable iPhone and iTouch developers) to use the Echo Nest API services. Kamel’s goal is to build an application similar to Audiosurf (a music-adapting puzzle racer that uses your own music), but along the way Kamel realized his framework may be useful to others and so he has released it for all of us to use.
The Framework supports all of the Track/Analysis methods of the API including Track Upload, getting tempos, duration, bar, beat and tatum info as well as detailed segment information. On Melka’s TODO list is to add the Echo Nest artist methods.
Using the framework, Melka created a nifty track visualization tool that will render a colorful representation of the Echo Nest analysis for a track:
Kamel implemented this in about 300 lines of Objective-C code.
The Echo Nest Cocoa Framework is released under a GPL V3 license and is hosted on google code at: http://code.google.com/p/echonestcocoaframework/.
The release is just in time for Music Hackday – I’m hoping we see an iPhone app or two emerge from this event that use the Echo Nest APIs! Kamel’s framework is just the thing to make it happen
The Dissociated Mixes
Posted by Paul in fun, Music, remix, The Echo Nest, web services on June 30, 2009
Check out Adam Lindsay’s latest post on Dissociated Mixes. He’s got a pretty good collection of automatically shuffled songs that sound interesting and eerily different from the original. One example is this remixed audio/video of Beck’s Record Club cover of “Waiting for my Man” by The Velvet Underground and Nico:
Nothing but MJ …
Posted by Paul in Music, The Echo Nest on June 26, 2009
We’ve been listening nothing but Michael Jackson here today at the nest.
To help everyone remember how great MJ’s music is, Tristan put together a mix of MJ – 50 tracks in 25 minutes:
(== (+ “Clojure” “Echo Nest”) “woah!”)
Posted by Paul in code, Music, The Echo Nest on June 25, 2009
Here’s the first Echo Nest application (as far as I know) that is written in Clojure: Another reason I like Clojure
The Echo Nest Fanalytics
Posted by Paul in Music, recommendation, The Echo Nest on June 25, 2009
At the core of just about everything we do here at the Echo Nest is what we call “The Knowledge”. This is big pile of data that represents everything we know about music. To build ‘The Knowledge’ we crawl the web looking for every bit of info about music. We find music blogs, artist news, album reviews, biographies, audio, images, videos, fan activity and on and on. This gives us a huge set of raw data that represents the global conversation about music. Next, we apply a set of statistical and natural language processing algorithms to this raw data to give us a deeper understanding of what all this data means. For instance, one fundamental algorithm tells us whether a particular web document is about a particular artist. This might be easy for an artist with a distinctive name like Metallica, but may not be so easy for The Rolling Stones (is it the band or the magazine?), and can be hard for bands with ambiguous names like Air and Yes, and can be extremely difficult for artists such as Torsten Pröfrock who tragically has chosen the stage name ‘Various Artists‘ (what was he thinking?). Another algorithm that we apply to music reviews is sentiment analysis. This helps us decide whether or not a reviewer has a positive opinion about the music being reviewed. We can take a review like this one written by Jennie, my 14 year old daughter, and learn whether or not she likes the new album by Beyoncé and whether or not she tends to like R&B and pop music.
In addition to analyzing what people are writing about music, we also try to extract as much meaning as we can from the music itself. We apply digital signal processing and machine learning algorithms to audio allowing us to extract information such as tempo, key, song structure, loudness, energy, harmonic content and timbre from every song.
Traditionally, “The Knowledge” has helped us build tools to help music fans explore and discover music – using all this data helps us predict what type of music a listener might like. For the last year, we’ve offered artist similarity and music recommendation web services around this data. But now we are going to turn this all upside down. Instead of using this data to help listeners find new music, we are going to use this data to help artists find new fans. That is what Fanalytics is all about.
For example, music blogs and review sites are becoming increasingly important way for an artist to build buzz around a new release. However, there are thousands of music blogs – each with its own specialty. This becomes a problem for the artist. How can she decide which blogs she should target for promoting her new album? This is one of the problems that Fanalytics tries to solve. With ‘The Knowledge’ we know quite a bit about thousands of music blogs. We know the reputation and the reach of a blog. We know what types of a music a particular author tends to write about, and we know what kinds of music they tend to like. With this knowledge we can make what is essentially a recommendation engine for music promotion. For any artist we can recommend a set blogs and writers that would most likely be interested in writing about the artist.
In addition to this recommendation engine tailored to music promotion, Fanalytics also provides a set of analytics tools that use ‘The Knowledge’ to help artists better understand their audience. For instance, an artist can track everything that is being said online about them – every blog post, news item, music review, video, as well as their online ‘buzz’ – a quantitative measure of how much attention the artist is receiving from reviewers, bloggers, fans, etc.
We have just launched Fanalytics, but apparently we are already seeing strong interest from the labels. (According the press release Interscope, Independent Label Group (WMG), RCA Music Group (Sony) and The Orchard are already on board). That’s not too surprising, the labels are looking for new ways to reach out to fans. As we continue to grow “The Knowledge” here at the Echo Nest I’m sure we will be creating more interesting tools like Fanalytics that are built around the data .



