Posts Tagged fun

Getting Ready for Boston Music Hack Day


Boston Music Hack Day starts in exactly 10 days.  At the Hack day you’ll have about 24 hours of hacking time to build something really cool.   If you are going to the Hack Day you will want to maximize your hacking time, so here are a few tips to help you get ready.

  • Come with an idea or two but be flexible – one of the really neat bits about the Music Hack Day is working with someone that you’ve never met before. So have a few ideas in your back pocket, but keep your ears open on Saturday morning for people who are doing interesting things, introduce yourself and maybe you’ve made a team.  At previous hack days all the best hacks seem to be team efforts.  If you have an idea that you’d like some help on, or if you are just looking for someone to collaborate with, check out and/or post to the Music Hack Day Ideas Wiki.
  • Prep your APIs – there  are a number of  APIs that you might want to use to create your hack. Before you get to the Hack Day you might want to take a look at the APIs, figure out which ones you might want to use- and get ready to use them.  For instance, if you want to build music exploration and discovery tools or apps that remix music, you might be interested in the Echo Nest APIs.   To get a head start for the hack day before you get there you should register for an API Key,  browse the API documentation then check out our resources page for code examples and to find a client library in your favorite language.
  • Decide if you would like to win a prize – Of course the prime motivation is for hacking is the joy of building something really neat – but there will be some prizes awarded to the best hacks.  Some of the prizes are general prizes – but some are category prizes (‘best iPhone /  iPod hacks’) and some are company-specific prizes (best application that uses the Echo Nest APIs).  If you are shooting for a specific prize make sure you know what the conditions for the prize are.  (I have my eye on the Ultra 24 workstation and display, graciously donated by my Alma Mata).

To get the hack day jucies flowing check out this nifty slide deck on Music Hackday created by Henrik Berggren:


    , , , , , , , ,

    Leave a comment

    Where is my JSpot?

    I like Spotify.  I like Java.  So I combined them.  Here’s a Java client for the new Spotify metadata API:  JSpot

    This client lets you do things like search for a track by name and get the Spotify ID for the track so you can play the track in Spotify.  This is useful for all sorts of things like building web apps that use Spotify to play music, or perhaps to build a Playdar resolver so you can use Spotify and Playdar together.

    Here’s some sample code that prints out the popularity and spotify ID for all versions of Weezer’s  ‘My Name Is Jonas’.

        Spotify spotify = new Spotify();
        Results<Track> results = spotify.searchTrack("Weezer",  "My name is Jonas");
        for (Track track : results.getItems()) { 
           System.out.printf("%.2f %s \n", track.getPopularity(), track.getId());

    This prints out:




    If you have Spotify and you click on those links, and those tracks are available in your locale you should hear Weezer’s nerd anthem.

    You can search for artists, albums and tracks and you can get all sorts of information back such as release dates for albums, countries where the music can be played, track length, popularity for artists, tracks and albums.  It is very much a 0.1 release. The search functionality is complete so its quite useful, but I haven’t implemented the ‘lookup’ methods yet.   There some javadocs.  There’s a jar file: jspot.jar.  And it is all open source: jspot at google code.

    , , , ,


    Music Playlist quiz followup

    I had a playlist quiz the other day. To recap, I asked, given a set of 6 songs, find the organizing principal and pick a new good song for the playlist.   A few attempted to extend the playlist, but only Adam offered a successful match.   Here are the seed songs, but this time I also include the album art – which may help you decide what songs fit and what don’t:

    • Made to measure – Umphrey’s McGeez
    • Diablo Rojo – Rodrigo Y Gabriella
    • Livin’ Thing – Electric Light Orchestra
    • Two Step – Dave Matthew’s Band
    • Vortex – Burst
    • Almost Honest – Megadeth

    Adam’s suggestion of XTC’s Wake up fits well:

    We’ll call this playlist, the squared circle.  There are lots more potential album covers for albums in this genre on Flickr: squaredcircle

    , , ,

    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:
             audio = random.choice(
             if audio['url'] not in played:
                 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.

    , , , , , ,


    Beat Rotation Experiments

    Doug Repetto, researcher at Columbia University (and founder of dorkbot),  has been taking the Echo Net Remix API for a spin. Doug is interested in how beat displacement and re-ordering affects the perception of different kinds of music. To kick off his research, he’s created some really interesting beat rotation experiments.  Here’s a couple of examples.

    Rich Skaggs & Friends playing Bill Monroe, “Big Mon”, rotated so that the beats are in order  2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1:

    The same song rotated so that the beats are in order  1 3 4 2 1 3 4 2 1 3 4 2 1 3 4 2:

    This time  rotated so that the beats are in order  1 3 4 2 1 2 3 4 1 3 4 2 1 2 3 4:

    All 3 versions are musically interesting and sound different.  I’m amazed at how music that sounds so complex can be manipulated so simply to give such interesting results.    Doug has lots more examples of his experiments: rotational energy and centripetal force.  If you are  interested in computational remixology, it is worth checking out.

    , , ,

    Leave a comment