Music Hacker’s Hall Of Fame
My Music Hacker’s Hall of Fame award has arrived all the way from Sydney Australia. It is just awesome!
The award was created by the acclaimed Aussie artist David Spencer. Thanks to Dave Mckinney and the rest of the Filter Squad team (creator of my favorite music discovery app), for making this happen!
Hear Here version 0.1
My weekend programming project was to build a bare-bones version of Roadtrip Mixtape that runs on an iPhone. This is an MVP (a term I learned from my Product Management buddies at work) – with only 5 basic features:
- You can press ‘next’ and the app plays a song by the nearest band to where you are right now.
- You can press ‘pause’ to pause/resume the playing
- You can login to Rdio so you can listen to full streams
- You can look at the album art
- You can simulate moving to another location (I was getting sick of listening to just Nashua music).
This is the first significant bit of iOS programming that I’ve done. It is a lot of fun. Xcode has tons of features that make working with all the idiosyncrasies of the platform manageable. There’s a huge amount of documentation including many tutorials, examples and recorded WWDC talks, plus tons more info on Stack Overflow. To stream music I’m using the Rdio iOS SDK. It is very easy to use, very well documented, with lots of good examples. I thought that getting music to play was going to be the hard bit of this project, but it was actually really easy. Well done Rdio programmers!
Tomorrow I’ll take V0.1 on its maiden test drive on my commute to work to see how well it works on the road. I suspect that the playlists will not be the most listenable since they are often filled with very long tail artists. On the list for V.2 will be the ability to add popularity and style filters to make it more likely that music that I actually like appears in the playlist.
Oh and I came up with a new working title for the app = ‘Hear Here’. Not sure if I’m 100% on board with the name though. No one likes puns anymore.
Roadtrip Mixtape
Posted by Paul in code, data, Music, The Echo Nest on June 17, 2012
Over the last few years I’ve made a number of 1,000+ mile road trips as I shuttle kids to colleges in far away places. Listening to music has always been a big part of these trips. I thought it’d be nice to be able to listen to music by local artists when driving through a particular region, so I spent a few weekends creating an app called Roadtrip Mixtape that populates a roadtrip playlist with artists that are from the region you are driving through.
To create a playlist, type your starting and ending cities for your roadtrip. The app will use Google’s directions to plan the best route between the two cities. The route will then be broken into 15 minute playlist legs. Each playlist leg is populated by 15 minutes worth of music by nearby artists.
The beginning of each leg is represented by a green ball. You can click on the ball to see what artists will be played during that leg. The app plays music via Rdio using their nifty Web Player API. If you are an Rdio subscriber you can listen to full streams, and if not you get to hear 30 second samples. One bit of interesting info that I show for a route is the ‘Avg distance’. This shows the average distance to each artist on the roadtrip. If this number is low, you are traveling through a musically dense part of the world, and if it is high, you are traveling in a sparse musical region. For instance, for a roadtrip from Boston to New York the average artist distance is 3 miles (about as low as it goes). However, if you are traveling from Omaha to Denver, the average artist distance is 81 miles.
You can also click anywhere on the map to see and listen to nearby artists. For example, if you click on Shreveport you’ll see something like this:
When you click the ‘Hear here’ button, you’ll get a playlist of the hotttest artists from Shreveport.
Listening to nearby artists is quite fun. There’s potential from some extreme sonic whiplash as you drive near a brutal death metal band and then a pop vocalist from the 1950s
The Technical Bits
To build the app I used the new artist location data from The Echo Nest. This (still in beta) feature, allows you to retrieve the location of any artist. Here’s an example API call that retrieves the artist location for Radiohead:
For this app, I collected the locations for the top 100,000 or so most popular artists in the Rdio catalog. These artists were from about 15,000 different cities. I used geopy along with the Yahoo Placefinder geocoder to find the latitude and longitude for each of these cities. For the mapping and route finding, I used version 3.9 of the Google maps API. For music playback I used the Rdio Web Playback API. With the tight integration between the Echo Nest and Rdio ID spaces it was easy to go from a geolocated Echo Nest artist to a list of Rdio track IDs for songs by that artist.
The Bad Bits
As a web app that relies on the flash-based Rdio web player, Roadtrip Mixtape is not really a mobile app. It won’t play music on an iPhone or iPad, so the best way to actually use this app on the road is probably to bring along your tethered laptop. Not the best user experience. Thus, my next weekend project will be to learn a little bit of iOS programming a make a version of this app that runs on an iPhone and an iPad. Stay tuned for the next version.
What happens when you bring a fan on stage?
Sometimes a performer at a concert will bring a fan up on stage to sing or play along with the band. Most of the time this does not go very well. As American Idol has shown, the Dunning-Kruger effect seems to apply most frequently to budding musicians. It is quite likely that the fan that was just brought on stage may think that they are ready to perform in front of thousands, but in reality they don’t deserve to be there. When you ask a fan to sing your are most likely to get these results:
[youtube http://www.youtube.com/watch?v=a_QqfEYNRlc&feature=youtube_gdata_player]Still, sometimes, a fan has talent or a special spark, and those moments are magical. It is why bands like Green Day will often bring audience members up on stage to take part in the show. Law of averages apply. Sooner or later Billie Joe finds a winner. My favorite Green Day fan performance is this German guitar player playing Basket Case:
[youtube http://www.youtube.com/watch?v=V7fal-gFOIo&feature=youtube_gdata_player]Another band that brings fans on stage is Avenged Sevenfold. In this clip a kid gets on the drums and rocks the house. Drumming starts about 2 minutes in:
[youtube http://www.youtube.com/watch?v=6pKqK2WtsA4&feature=youtube_gdata_player]At this Montreal show, Josh Groban comes into the audience to sing a duet with a 17 year old, french speaking young lady. Singing starts at 2:45 or so. It gets a little misty for me watching this.
[youtube http://www.youtube.com/watch?v=RXAak-NamNE&feature=fvwrel]In this clip, Johnny Reid, (Canadian Country musician) invites a very young fan to be one of his backup singers.
[youtube http://www.youtube.com/watch?v=xFCB4opoEyw&feature=youtube_gdata_player]It is fun to watch Michael Buble’s surprise when he realizes the boy on stage can actually sing (‘holy shitballs mom!’). The boy, Sam Hollyman, has an album out now on iTunes:
[youtube http://www.youtube.com/watch?v=o6TKpkY4WcM&feature=youtube_gdata_player]At a U2 show, Bono invited a blind man up on stage who had a sign asking to play a song for his wife. It is a touching moment:
[youtube http://www.youtube.com/watch?v=uURKYk06Q7c&feature=youtube_gdata_player]A very clean cut 13 year old plays with Machine Head. Surfer meets Metal
[youtube http://www.youtube.com/watch?v=LoWjFOTGgbM&feature=youtube_gdata_player]Another kid gets up to play with Linkin Park. He takes control of the stage. (his ten second audition starts at 4:00, and then into Faint):
[youtube http://www.youtube.com/watch?v=YNkTQSLL9U4&feature=youtube_gdata_player]A sixteen year old young lady is put on the spot by P!nk and pulls it off:
[youtube http://www.youtube.com/watch?feature=player_embedded&v=HB4E9XVt5Kc]My Chemical Romance with a chair bound fan. Enthusiasm trumps all here:
[youtube http://www.youtube.com/watch?v=as4afIlV2rk&feature=youtube_gdata_player]Hutzpah award goes to this young man who jumped on stage *after* a Decemberists concert, and started playing the song that Colin and company had just finished playing:
[youtube http://www.youtube.com/watch?v=oYMCnFgGFCA&feature=youtube_gdata_player]Update: One of the commenters on this post pointed me to this clip from a concert in Sydney when The Hives bring a bass player on stage. They give him a wardrobe upgrade before they let him play. Skip ahead to 50 seconds in.
[youtube http://www.youtube.com/watch?v=DcX52rbm-xw]The most famous fan appearance is probably The Horse Tranquilizer Incident where after an unfortunate run-in with some rather strong drugs Keith Moon was unable to finish a show, and so Pete Townsend asked the audience “can anybody play the drums? I mean somebody good.” Scott Haplin, who hadn’t played drums in a year volunteered. Video Timeline :
- At 1:10 Pete tells the crowd that Keith’s passed out.
- At 3:50 Moon passes out a 2nd time
- At 5:30 Pete asks the audience, “can anybody play the drums? I mean somebody good.”
- At 6:30 Audience member Scott Halpin replaces keith moon
- At 8:19 Scot Halpin and the band take a bow…
That year, Scott Haplin was awarded Rolling Stone magazine’s “Pick-Up Player of the Year Award” for his historic performance during this show. As far as I know, Scott remains the only fan called on stage to win an award for his performance.
Austin climbing the Most Musical City chart with a bullet!
I’ve received quite a bit of feedback on my recent Most Musical City post, especially from folks from Austin that didn’t like Austin’s 14th place ranking. This reddit/austin comment thread was rather brutal, and this Austinist article Wait, What?! Austin Not Ranked In Top 10 Musical Cities List even closed with this appeal: any data analysts out there up for the challenge to get Austin closer to the top?
Well, John Rees, the Director of Community & Economic Development at Capital Area Council of Governments in Austin is just the data analyst that the Austinist was looking for. He re-ran the analysis but instead of using city populations he calculated the rankings based upon metropolitan statistical areas. In the May issue of Data Points Newsletter John reports on this analysis:
When data from The Echo Nest is adjusted to include metropolitan statistical area population data, the rankings of America’s most musical places changes significantly. Topping the list is Nashville, San Francisco and Los Angeles (which includes Beverly Hills). The Austin region jumps ten places from the original list to become America’s forth [sic] most musical region.
John goes on to point out some of the non-quantifiable aspects of the Austin music scene such as the diversity of music as well as the presence of events such as SXSW and Austin City Limits. John makes a strong argument that Austin is one of the country’s premier music destinations. Even the reaction of Austin’s residents to my post says a lot about Austin as a music city. People from Austin really care about music and don’t take it kindly when they are not at the top of the most musical city list. So congrats to Austin, not just for moving up the chart but also for demonstrating that Austin is the city that is most passionate about music
What is the most musical city in the United States?
Posted by Paul in code, data, fun, The Echo Nest on May 20, 2012
There are many cities in the United States that are known for their music. Cities like Nashville, Detroit, Seattle and New Orleans have played a major part in the musical history and development of this country. But what is the most musical city? Which city has spawned the most musical artists? To answer this question I used the soon-to-be-released artist location data from The Echo Nest artist API. I gathered up the top 50,000 or so U.S. artists, found their city of origin and tallied the number of artists per city. From this tally I calculated the number of artists per 1,000 inhabitants in each city. The more artists per 1000 inhabitants, the more musical the city.
Using the artists per 1k inhabitants, we can easily find the top 25 most musical cities in the United States:
| # | Artists per 1,000 inhabitants | Artists | Population | City |
|---|---|---|---|---|
| 1 | 3.14 | 111 | 35355 | Beverly Hills, CA |
| 2 | 2.26 | 1651 | 732072 | San Francisco, CA |
| 3 | 1.68 | 894 | 530852 | Nashville, TN |
| 4 | 1.64 | 936 | 571281 | Boston, MA |
| 5 | 1.54 | 651 | 422908 | Atlanta, GA |
| 6 | 1.53 | 53 | 34703 | Charlottesville, VA |
| 7 | 1.48 | 817 | 552433 | Washington, DC |
| 8 | 1.39 | 513 | 367773 | Minneapolis, MN |
| 9 | 1.37 | 740 | 540513 | Portland, OR |
| 10 | 1.32 | 51 | 38601 | Burlington, VT |
| 11 | 1.24 | 4789 | 3877129 | Los Angeles, CA |
| 12 | 1.22 | 15 | 12314 | Muscle Shoals, AL |
| 13 | 1.20 | 683 | 569369 | Seattle, WA |
| 14 | 1.11 | 755 | 678368 | Austin, TX |
| 15 | 1.05 | 75 | 71253 | Bloomington, IN |
| 16 | 1.05 | 50 | 47529 | Chapel Hill, NC |
| 17 | 1.05 | 47 | 44916 | Olympia, WA |
| 18 | 1.00 | 13 | 12945 | Princeton, NJ |
| 19 | 0.95 | 182 | 190886 | Richmond, VA |
| 20 | 0.94 | 11 | 11678 | Hendersonville, NC |
| 21 | 0.87 | 12 | 13769 | Malibu, CA |
| 22 | 0.87 | 88 | 100975 | Denton, TX |
| 23 | 0.86 | 179 | 207970 | Orlando, FL |
| 24 | 0.86 | 86 | 100158 | Berkeley, CA |
| 25 | 0.85 | 114 | 133874 | Orange, CA |
I find the results to be pretty interesting. Beverly Hills, the tiny city at the heart of the entertainment world is #1. San Francisco is the most musical of all large cities, followed closely by Nashville. Among, the most musical of small cities is Muscle Shoals AL which, according to Wikipedia, is famous for its contributions to American popular music. Less musical than expected are New Orleans (rank 36), NYC (rank 37), Detroit (rank 52).
Among the least musical cities in the U.S. are my hometown (Manchester NH), with only one artist in the top 50,000 U.S. based artist for the 100K inhabitants. The least musical large city in the U.S. is Kansas City KS, with only 7 top-50k artists for their nearly half million inhabitants. Luckily Kansas City residents can drive a few miles to Kansas city Missouri (with its 194 musicians for its 442k inhabitants) when they get tired of their own seven artists.
You can see the full list of cities with population greater than 5,000 ordered by their musicality here: The Most Musical Cities in the United States. I’d love to do this for all the cities in the world, but I can’t find a good source of city population data for world cities. If you know of one let me know.
I’m rather exited about this upcoming release of artist location data in our API. It will open the doors for a whole bunch of interesting applications, such as road trip playlisters that play music by artists local to the city you are near, contextual playlisters that will favor artists from your home town, or music exploration apps that will let you explore music from a particular region of the world. I can’t wait to see what people build with this data. Stay tuned, I’ll post when the API is released.
WordPress now supports embedding of Spotify, Rdio and Gists.
WordPress now supports direct embedding of Spotify songs:
And direct embedding of Rdio songs:
http://www.rdio.com/#/artist/deadmau5/album/4×4=12_1/track/Raise_Your_Weapon/
And best of all Gist embeddimg!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import urllib | |
| import json | |
| from pyechonest import playlist | |
| def show_playlist(seed_artist): | |
| for s in playlist.basic(artist=seed_artist, type='artist-radio', ] | |
| buckets=['id:lyricfind-US'], results=10, limit=True): | |
| print '==================================================================' | |
| print s.title, 'by', s.artist_name | |
| print '==================================================================' | |
| show_lyrics(s) | |
| def show_lyrics(s): | |
| lfid = s.get_foreign_id('lyricfind-US').replace('lyricfind-US:song:', '') | |
| url = 'http://test.lyricfind.com/api_service/lyric.do' + \ | |
| '?apikey=your_api_key' + \ | |
| '&reqtype=default&output=json&trackid=elid:' + lfid | |
| f = urllib.urlopen(url) | |
| js = f.read() | |
| f.close() | |
| dict = json.loads(js) | |
| try: | |
| lyrics = dict['track']['lyrics'] | |
| for line in lyrics.split('\r\n'): | |
| print line | |
| except: | |
| print '(no lyrics)' | |
| if __name__ == '__main__': | |
| if len(sys.argv) > 1: | |
| show_playlist(' '.join(sys.argv[1:])) | |
| else: | |
| print 'usage: %s artist name' % (sys.argv[0],) |
Life is good! Thanks WordPress. All the details are here in this blog post.
Rethink Music Hackers’ Weekend
This weekend was Rethink Music Hacker’s Weekend where 100 or so music hackers gathered at the Microsoft NERD to not just rethink music, but to rebuild it. There were about two dozen hacks built, showing a wide range of creativity. Some of my favorites are:
Kinect Bomba -As in the latin style of music called “Bomba”, the dancer is in control of the band and music. The virtual band is the kinect — the dancer(s) can create sweet, live beat-locked music over any mp3 (using echonest-remix), remixes, and even control a virtual looper pedal.
Hiptapes – HipTapes is a music marketing APP enables artists to create custom QR codes and push dynamic content to fans via posters, flyers, CDs, etc. HipTapes mobile app scans the QR code & enables users to instantly stream, bookmark or buy music tracks, purchase concerts tickets, discounted merchandise or leave a message on artist’s Facebook page.
Hipsterer – Figures out how hipster you are? (I knew about this site before it was cool).
Jam Page – Hi-resolution listener analytics for artists.
Texture Learning – A simple genetic algorithm learns the short-time fourier transform of a target static texture. The approximation gradually acquires information about the target sound via repeated semi-random modifications to the spectrogram. Phase and magnitude are learned separately. The learning process is sonified and visualized such that the gradual evolution of the sound from silence to target can be seen and heard. Experimentation with several control parameters results in varied output.
Byrds and the Bee Gees – finds the playlist that your parents could of have used on the night you were conceived. Totally fun app. Toughest part is trying to decide if my dad was ‘smooth back then’.
Lyrical Sonnet Awesome – My favorite hack. Totally origina. Uses lyricfind.com’s API to make a sonnet generator! In Iambic pentameter! The sonnets are in the rhyme scheme of Shakespeare. ABABCDCDEFEFGG, and you can choose key words to populate the themes. Here’s an example:
- Too long values we let them blend and fade
- And with the awesome power they struck
- You’re like a long, cool glass of lemonade
- It’s Knoc-turn’al with a capital K
- Something cool, set one up for me
- If you turn away, oh, honey, please stay
- The center of attention, cool Moe Dee
- I want to take you cool places tonight
- Are you still mad I kicked you out of bed?
- What befalls us in the heat of the night?
- I keep a cool head, I keep a cool head
- That I was mad if they were sane, you see
- The blues my naughty sweetie gives to me.
Map of Music styles – this is my hack – an interactive map of 1000s of music styles, allowing you to explore through the world of music.
See the full list of hacks on hacker league. It was a really fun weekend, with lots of very creative hacking!
Map of Music Styles
Posted by Paul in code, data, events, fun, tags, The Echo Nest, visualization on April 22, 2012
I spent this weekend at Rethink Music Hackers’ Weekend building a music hack called Map of Music Styles (aka MOMS). This hack presents a visualization of over 1000 music styles. You can pan and zoom through the music space just like you can with Google maps. When you see an interesting style of music you can click on it to hear some samples of music of that style.
It is fun to explore all the different neighborhoods of music styles. Here’s the Asian corner:
Here’s the Hip-Hop neighborhood:
And a mega-cluster of ambient/chill-out music:
To build the app, I collected the top 2,000 or so terms via The Echo Nest API. For each term I calculated the most similar terms based upon artist overlap (for instance, the term ‘metal’ and ‘heavy metal’ are often applied to the same artists and so can be considered similar, where as ‘metal’ and ‘new age’ are rarely applied to the same artist and are, therefore, not similar). To layout the graph I used Gephi (Its like Photoshop for graphs) and exported the graph to SVG. After that it was just a bit of Javascript, HTML, and CSS to create the web page that will let you pan and zoom. When you click on a term, I fetch audio that matches the style via the Echo Nest and 7Digital APIs.
There are a few non-styles that snuck through – the occasional band name, or mood, but they don’t hurt anything so I let them hang out with the real styles. The app works best in Chrome. There’s a bug in the Firefox version that I need to work out.
Give it a try and let me know how you like it: Map of Music Styles
Why streaming recommendations are different than DVD recommendations at Netflix
From Why Netflix Never Implemented The Algorithm That Won The Netflix $1 Million Challenge
An interesting insight:
when people rent a movie that won’t arrive for a few days, they’re making a bet on what they want at some future point. And, people tend to have a more… optimistic viewpoint of their future selves. That is, they may be willing to rent, say, an “artsy” movie that won’t show up for a few days, feeling that they’ll be in the mood to watch it a few days (weeks?) in the future, knowing they’re not in the mood immediately. But when the choice is immediate, they deal with their present selves, and that choice can be quite different.
When I was a Netflix DVD subscriber the Seven Samurai sat on top of my TV for months. My present self never matched the optimistic view I had of my future self.
Xavier’s blog post on Netfix recommendation is worth the read. Dealing with a household with widely different tastes, the importance of the order of presentation of recommendations













