Hear the Energy Flow: Pachube + SoundCloud Mashup

It’s all very well and good to be able to visualize the energy flow from New Brunswick to Prince Edward Island, but what if we want more “ambient” feedback? What if we want to feel the energy flow?

Enter Pachube, SoundCloud, and a bit of PHP code to stitch them together. The result: iTunes plays songs with a beats-per-minute reflecting the current energy flow. Watch it in action:

What’s happening here is this:

  1. The New Brunswick System Operator page is being scraped and converted into a Pachube feed which exposes the data in XML (code here).
  2. The XML data is grabbed from Pachube and the figure, in megawatts, representing energy flowing from New Brunswick to Prince Edward Island is use to search SoundCloud via its API (code here).
  3. The tracks returned from SoundCloud are played in iTunes.

The result: you can hear how much energy is flowing over the cable from New Brunswick to Prince Edward Island.

Update: I’ve packaged up the code as a Mac OS X app that you can download and install without the need to fuss with code.

Comments

Chris's picture
Chris on April 15, 2012 - 23:39

Intrigued by your project here but after reviewing the code, I’m not sure how the bpm updates as energy flow changes. Am I missing something?

Add new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.

Plain text

  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Typographic refinements will be added.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.