TWscape was the project I worked on for Boston's 2011 Music Hack Day. Simply put, it's an in-browser soundscape generator that is driven by the number of Twitter tweets that match a specific search string.

Development Process

Music Hack Day opens with presentations on different technologies the event sponsors offer for use. At the same time, attendees talk on IRC or Twitter, and can post requests for assistance on the Hack Day wiki. Someone posted an idea for a Twitter-generated weather soundscape, and I offered my assistance. We gathered three more volunteers and discussed our technical approach. We eventually decided to do all the audio synthesis in-browser with the experimental Web Audio API. I hacked apart Google's example drum machine code to figure out the API, while two of our volunteers worked created rain, thunderclap, and wind sounds; one worked on the Twitter search interface; and one put together a nice Twitter Bootstrap interface.

Technical Overview

The Web Audio API is similar to writing code for ChucK or SuperCollider or CoreAudio. The developer creates a number of nodes (similar to synths in SC or AudioUnits in CoreAudio) that are attached to a graph. The TWScape code periodically asks Twitter for tweets that match the user-specified search string. The audio component counts up the tweets that arrived in the last interval and increases or decreases the amount of weather noise based on the current level of traffic compared to the historical level. @-replies and hashtags trigger thunderclaps, and there's an Easter egg hidden in there as well.

This project is still live, and the source code is available at Github if you wish to hack on it.

Log in or registerto write something here or to contact authors.