Music Hackday is winding down
Posted by Paul in The Echo Nest on July 12, 2009
There are only a few hours of hacking left at Music Hackday, but the hackers are still going strong.
Here’ s a hardware hack – an automated drummer, submitted by Alistair and Mr Duck
Echo Nest on the iPhone
Posted by Paul in The Echo Nest on July 10, 2009
Melka just updated his Echo Nest Cocoa Framework to make it work with the iPhone. Here’s his track visualizer running on the device. This is totally awesome. And just in time for Music Hackday.
Echo Nest Remix 1.2 has just been released
Posted by Paul in code, fun, The Echo Nest on July 10, 2009
Just in time for hack day … Quoting Brian:
Hi all, 1.2 just “released.” There are prebuilt binary installers for Mac and Windows, and pretty detailed instructions for Linux and other source installs.
The main features of Remix 1.2 are video processing and time/pitch stretching, along with a reliance of “pyechonest” to do the communication with EN. This lets you do more than just track API calls.
Some relevant examples included in the stretch and videx folders.
Thanks to all for the hard work.
This release ties together the video processing, time and pitch stretching, making it possible to do the video and the stretching remixes from the same install. Awesome!
Flash Remix Demo
Posted by Paul in code, remix, The Echo Nest on July 10, 2009
Ryan Berdeen has been doing some cool things with Flash and the Echo Nest. He’s been making it the Echo Nest track analysis work with audio mixing functionality of Flash 10, effectively giving remix capabilities to the Flash programmer. He’s put together a simple demo that lets you upload a track and perform some manipulations of it. Check it out here: Flash Remix Demo (and the source is here). The demo uses Ryan’s new Echo Nest Flash API. Cool Stuff!
Adam Baratz speaks at the Django meetup
Adam Baratz, the man who built developer.echonest.com, gave a talk tonight at the Cambridge Django Meetup about the design and implementation of our web services using Python decorators and generators. I was lucky enough to hear the dry run of Adam’s talk – I learned a lot about Python and was inspired to dig deeper to learn the idioms. The video of the talk is online here: Cambridge Django Meetup on ustream
New Echo Nest Terms of Service – w00t
Posted by Paul in The Echo Nest, web services on July 9, 2009
We’ve updated the Echo Nest developer site to include recent API news. If you are interested in seeing what is up with the API, check it out. One news item that you’ll notice on the page today is that we have a new Terms of Service for the API that is much more developer friendly (you are no longer involving your first born when you use our API). We also have a set of API ground rules that explain what the TOS means without using a lot of legalese.
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.





