Wednesday, October 30, 2013

Process Project 1

Working on the code for sound in relation to the graph

We are working with Minim on Processing.

The first example we tried was through the Arduino. As you blew to a certain threshold, the serial monitor would say "knock." We were thinking of then within Processing that when the knock threshold was hit, a sound (a file) would play.



We decided this tactic was not completely what we wanted but we actually wanted a constant tone and the frequency be affected by the wind sensor.

We merged two sketches, one being the graph visual being affected by the serial output and the other being an example from the minim library, sin wave signal.

We were not able to successfully get the sound to continue after the sketch was played. After many attempts, we discovered that the problem was that there needed to be a timer because the serial output was being calculated too fast for the sound to follow.

Here is the full code:
For Arduino:

For Processing:





Success!!!
The blowing/breathing on the wind sensor affects the visual graph as well as the frequency of the sound.



Here are pictures of the final built box to place the computer as well as the arduino/windsensor in




No comments:

Post a Comment