echonest API wind experiment

Since I had been thinking a lot about how to use data streams to compose music, it seemed like it would be cool to reverse the process. To use music as a data stream to control something.

The Echonest API http://developer.echonest.com analyzes audio content at the sample level. I requested an analysis of ‘Free Bird’ by Lynyrd Skynyrd, thinking this song has dynamic variation so it might sound like a wind event. Segment loudness data was connected to wind speed in the simulation and you could hear, as the song progressed, how the wind matched the song’s dynamic levels. But there wasn’t much variation – mostly a steady build from very low to very high. Tried connecting other analysis data to wind speed and found that the segment confidence values sounded like a ‘gusty’ kind of wind. Not wanting to lose the excitement of the song, the loudness peaks now trigger thunder – using the pd threshold object – with random timing to thin it out a bit. Also there’s no thunder until the loudness values stay above the threshold for several seconds.

API data is being served via OSC from a ruby script. For this first test I ran analysis using curl and saved it to a file. Was thinking of using this ruby GEM for the API calls:

https://github.com/youpy/ruby-echonest

But will first try hooking them up using Patron (curl) because it offers more flexibility to get at all aspects of the API.

This project is not included in internet-sensors repo yet.

Local Files:

  • tkzic/internetsensors/
  • wind-echonest.rb
  • echonest.txt (curl examples)
  • enfb-analysis.json (analysis data)
  • wind-echonest1.rb