A Home, Electric - Max/MSP sonifications of home energy data

My first experiments with data sonification in Max/MSP.

Outside of music, one of my hobbies is IoT tech. Amongst all my fun smart home toys, I have a home energy monitor (I’m going to leave the name out this, as I work for the company). I’ve been working on various ways to up my consumption awareness and I decided to try bridging my IoT and music passions. This is the result. Live wattage and voltage data are fed into Max/MSP where they then modulate a swarm of 18 oscillators. As consumption increases, the swarm becomes increasingly detuned. Voltage serves to amplitude modulate four of the oscillators, adding emergent rhythms and, strangely enough, even melodies. Headphones are strongly recommended.

Check out the album at Bandcamp.

Video is primarily a proof of concept, with 16 oscillators detuning only two tones

12 Likes

Ha! This is so cool. I love when you can combine two (or more) seemingly disconnected things that you’re interested in into a unified “thing”, especially when one of those things is musically-based. Clever

1 Like

Hi there.
This is such a beautiful and thoughtful project, and the sounds you have created are so nice! I came across your work on youtube during a search for data sonification as I am also working on an art project using live feed API data to produce sound for an installation. I am using max and ableton but quite new to programming, and utterly confused by all the options and threads in the forums. So far I just have my max oscilators and data sets, I’m just wondering if you found some good ways to go about getting the data to read/play in max? (If you feel like sharing) If not, no worries. Love the work! Cheers, Emilie

1 Like

Thanks so much, Emilie!

The API I’m working with returns some pretty simple JSON data. Initially, unaware of Max’s ability to interact with APIs, I made a simple Python script that pulled data from that API, extracted just two chunks of it, and deposited those chunks into two separate txt documents. This would then loop every 5 seconds until I quit. Within Max, I used a combo of filewatch and text to pull that data in, line by line, in real time (basically whenever the text docs would get updated).

This was all kinda cludgey and I looked into ways of doing everything within Max or at least getting rid of the dumb txt files. Then I learned about Max’s API function with maxurl. I had a bit of trouble parsing out exactly what I wanted from the returned JSON (it’s far easier with Python). You can use Javascript within Max, but I don’t know much JS. Instead, I was able to use a bunch of zl.slice and some regex to get exactly what I needed. I’d suggest spending some time with the maxurl help docs and that should get you going.

Feel free to shoot me a PM as well and I’m happy to talk in a bit more detail (unless others are interested in my process, then I’m also happy to share publicly). Perhaps a separate thread on data sonification methods would be ideal in the Process subcategory?

1 Like

Thank you so much! I’ll look into those and see how I go… Its a steep learning curve! May get back in touch if thats cool! :smile: