Archive for category web services

Berlin Music Hackday presentation videos

There are a bunch of videos of presentations and demos from the Music Hackday berlin: http://qik.com/digitalwaveriding:

Picture 3

, ,

Leave a comment

Hacking on the Echo Nest at the Berlin Music Hackday

The Berlin Music Hackday is nearly upon us.  Ben Lacker (a.k.a. DJ API) will be representing the Echo Nest at this wonderful event.  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:

  1. 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
  2. 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.
  3. Pick a client library – There are a number of client libraries for The Echo Nest – select one for your language of choice and install it.
  4. Think of a great application – easier said than done.  If you are looking for some inspiration, checkout these examples: morecowbelldonkdj, 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 Ben  – we have a list of application ideas that we think would be fun to write.

At the end of the hackday, Ben 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 Ben’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.  Check out the list of hacks created at the London Music Hackday to get inspiration.

,

Leave a comment

The Music Hackday Comes to Boston

The London Music Hackday

<W00T!> -The Music Hackday is coming to Boston.  Set aside the weekend of November 21 and 22 for the Boston Music Hackday being held at  the Microsoft New England Research and Develpment Center (aka NERD).   The Music Hackday is a place where folks can gather for a weekend of nearly uninterrupted hacking on music.  Expect to see (and hear) all kinds of music hacks: from web-hacks, iPhone apps, analog noisemakers to cool visualizations.  Anything goes as long as it is music related.   The Boston hackday is being organized by Dave Haynes (SoundCloud), Jon Pierce (Betahouse) and myself (The Echo Nest).  We here at the Echo Nest are pretty excited to be involved. It should be really fun.

If you hack music and are going to be within a day’s drive of Boston on the weekend before  Thanksgiving, you really should be planning to attend the hackday.  Registration is free, but space is limited. To guarantee a spot register early and be sure you tell us how you want to hack music (because of the limited number of slots, we give preference to music hackers).

Event:   Boston Music Hackday
When:  November 21, 22
Where: NERD
PRICE: $FREE
Register
: http://musichackdayboston.eventbrite.com/

Looking for hacking inspiration? Check out all of the music hacks that were built during the London Music Hackday:

1 Comment

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

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

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

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

New Echo Nest Terms of Service – w00t

en_logo_250x200_lt1We’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.

,

Leave a comment

Hacking on the Echo Nest on Music Hackday

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:

  1. 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
  2. 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.
  3. 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.
  4. Think of a great application – easier said than done.  If you are looking for some inspiration, checkout these examples: morecowbelldonkdj, 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.

, ,

Leave a comment

The Sinister Index

cheetosLike many, I like to eat Cheetos, weezer 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.

, , ,

2 Comments