The works: OSC, Node.js and

Skip this part if you don’t like to see the innards.

We needed a means for the user to communicate with our interactive pieces, and a way for the pieces to chat amongst themselves. We decided to use a common “language” that applications could all speak, and a natural fit for this was the OSC protocol (Open Sound Control.) OSC was an easy learning curve with wide adoption and libraries for several interactive frameworks, like Processing, Actionscript, Arduino and Open Frameworks.

We then needed traffic control for all this communication, so we chose an open-source JavaScript framework called Node.js, in combination with Node modules and Node-OSC. This server cocktail “made things talk”, and allowed us to write applications that receive real time input from smartphone clients, with the ability to sync and broadcast to all clients. The server can then serve/share OSC data with multiple interactive applications as needed.

The important part of this solution was that it allowed us to keep all the client interfaces web-based, allowing interaction from 20ft or 20 miles. And since the entire communication solution is written in JavaScript, it’s powerful and flexible.

code_snippet seo_functional_flow2

It’s worth noting that toward the end of the development cycle we discovered the value of high-level frameworks like Express and Now.js… these probably would have saved us a good deal of time, but we certainly learned a lot in the process anyway. It’s also not clear if the asynchronous nature of Node helped with performance or throughput, but it would be interesting to test in the future.

Next time!