We can use the sensors in various ways when building a musical instrument on our phones. Sensors can be assigned to different parameters in music like pitch, volume etc. we can also apply several filters to various sensors and affect our instrument’s timber.

Mapping sensor data to sound aka making the network application work

We started the day downloading SensorLab and Sensor Tracker for Android to explore different features. It has a screen divided into 12 small windows. Like in most sensor apps they describe different sensor on the phone. Accelerometer, Light meter, Gyroscope, Compass, Sound level, Magnetic Field, Proximity meter, Step Counter, Location, CPU Usage, Network Usage.

Touch the screen

The first step of the day was to connect our phones and laptop to the same network. Where we used something called a “Live Server”, which sets up a server on your computer and then people on the same network as the computer can connect to it with their phones.

The exercise started with running sensor data from an accelerometer (x, y and z) in the browser. With numbers going from 0 - 10. The second step was to synchronize the ip-address with the phone and mapp the data it, so we could see the sensor parameters at work. Then we made this number go from 0-1, by applying a function and some other “magic” to the code. Next step was to make the screen show different colors when we moved the phone (making changes to the values of the accelerometer). Last and finally we made the phone make different sounds when we moved the phone (also by making changes to the values of the accelerometer).

For clearance and a good workflow most of the code we got had already been made and was ready to run. So our task was to explore the code and to change things and to see what would happen. The reason for this was to grasp the concept of coding, and not to learn all the syntax etc.

Things are not always going as planned

So yesterday Elias had to go home because of sickness and came late to class today because of the same problem, sickness. But he was soon back on track, since he is most familiar with coding in our group, which was the main theme today. But even that does not promise success. Since his mobile phone (Android) and computer (Apple) didn’t really like each other, It’s not much you can do. So while Elias was working with Guy on his computer, he also tried to figure out the problem with his computer, which he didn’t found a solution for. Some couples are just not meant to be.

Hacking our last blog post