VIS 147A: Week 6 Midterm Project

To begin this project, my first hints of inspiration came from Robert Morris’ “Box With Sounds of its Own Making” and Meret Oppenheimer’s “Furry Cup”. Morris’ box led me to incorporate sounds associated with objects into my project.

I’ve seen this particular art object in several of my classes. It inspired me to play around with the idea of tension in my project. So now I had two objectives for outputs: sound as a primary output, and tension as a secondary result from the sound.

Now I needed to search for an input: I was searching on Amazon for sensors and I especially liked the idea of distance sensors, by triggering something based on distance from an object. Using an ultrasonic sensor (part #: HC-SRF05) would give me a number output, where I could code in specific boundaries or parameters to trigger at certain distances.

What I needed now was a marriage of all my ideas: my input (distance), my output (sound), and my concept (tension).

Tension in object led me to think about everyday objects as Menet Oppenheimer did: what could I take, and use to make people uneasy or confused? What objects tended to have strong feelings or associations with them already?

I thought of three: a teddy bear, which tended to be comforting; an apple, which had both powerful religious and secular roots in sin and education respectively; and a knife, which was normally thought of as dangerous or harmful. These were associations I wanted to break with my project.

I know that sound is a very powerful sound and trigger for memory, so I decided to associate each object with found sounds that were unexpected and jarring: for example, a knife in a knifeblock, when removed, could trigger a sound clip from the “Sword and the Stone” to give it a more positive and even magical association. In contrast, the teddy bear, with usually positive connotations, I would pair with sounds of war and gunfire and horror, to give the bear a more negative and even repulsive association. The apple would serve as a mediator: with both positive and negative associations, it would be the midpoint between the other two recast objects.


I decided to set up an interactive art exhibit that would be entitled, “The Audible History of Objects”. The objects would be set up in individual boxes with a distance sensor attached into a breadboard; the central box and breadboard would be wired into Arduino and my computer, which would act as the medium for sound output. The audience would be encouraged to pick up objects; when the objects were removed at a certain distance (I wanted to say about 10 centimeters) from the sensor, the code would trigger a random sound from a library.

Unfortunately I lost the pictures I took due to very very human error (I didn’t realize I had no memory card in my camera), but two of my three motion sensors failed to work when wired into the breadboard; these two were the ones that were soddered, and running test code to see if there was a response resulted in 0 distance for both sensors. The one working sensor that was plugged into the breadboard made me consider reducing my project down to only the teddy bear, which had a powerful enough association alone that I thought it could stand by itself as a project.

What ultimately caused this route to fail for me was the lack of an equivalent pulseIn() function in Processing (even prefaced as arduino.pulseIn() ). pulseIn() read HIGH or LOW on a pin; no pulse read means that essentially, a value cannot be returned from the sensor. Another additional problem (I will try and update with a picture) might have been bad soldering on one of the sensors; the other one looked okay, but both refused to return values.

With time running out I decided to return to the potentiometer, which I knew had worked in lab. I made the decision to repurpose the libraries I had started building as an array for the potentiometer, now acting as a dial, to read through an array by equating values inputted from the potentiometer to sounds in the array. With some testing, I could possibly code the potentiometer so that when it was turned to the direction of an object, it would make a random sound from the object’s specific library.


Inside the box would be contained the Arduino itself.


I wired the potentiometer directly into the Arduino, which I kind of regret because I think a resistor would have given me more consistent values, which was one of the first major issues I ran into trying to code this.


At this point I was so frazzled trying to get it to work that I was just happy it was returning values at all, so I decided not to mess with the wiring more than I had to.


I had a friend demonstrate conceptually what I wanted to have happen, though obviously Arduino isn’t hooked up here.

My code was as follows:

// import the libraries for serial and arduino firmata
import cc.arduino.*;
import processing.serial.*;
// object class for board
Arduino arduino;

// import built in processing minim libraries for sound output
import ddf.minim.*;
Minim minim;
AudioPlayer player;
AudioPlayer[] array;

int buttonPin = 13;
int sensorPin = 0;

int index2 = 0;

// set up canvas so i at least know it’s running
void setup(){
size(500, 500, P3D);

//minim object
  minim = new Minim(this);
  array = new AudioPlayer[10];
  array[0] = minim.loadFile(“7DemonBird.mp3”);
  array[1] = minim.loadFile(“9Screams.mp3”);
  array[2] = minim.loadFile(“5SwordStone.mp3”);
  array[3] = minim.loadFile(“3DisneyTheme.mp3”);
//  array[4] = minim.loadFile(“5SwordStone.mp3”);
//  array[5] = minim.loadFile(“6WWIBattle.mp3”);
//  array[6] = minim.loadFile(“7DemonBird.mp3”);
//  array[7] = minim.loadFile(“8KillYou.mp3”);
//  array[8] = minim.loadFile(“9Screams.mp3”);
//  array[9] = minim.loadFile(“10Sirens.mp3”);

// player = minim.loadFile(“2BestBird.mp3”);

// arduino object
arduino = new Arduino(this, Arduino.list()[1], 57600);

// set pin modes
arduino.pinMode(buttonPin, Arduino.INPUT);
arduino.pinMode(sensorPin, Arduino.INPUT);

void draw (){
  // read analog value from sensor pin
  int analogValue = 140;
  analogValue = arduino.analogRead(sensorPin);
  println(analogValue); //print to test
//  float index = random(0,1);
//  float index2 = random(0,2);
  if (analogValue <= 136){
  } else if (analogValue >= 143) {

// array[(int)random(1,2)].play();
// }  else {
// array[1].play();
// delay(200);
// array[1].pause();


As you can probably see, there was a lot of test code edited out from various problems; I couldn’t quite get the random sound to work, and the values I was getting returned on the potentiometer varied heavily; the parameters I set above were after about an hour of tweaking and reading values from the serial output monitor until I roughly got the dial to work. In the end, my project was stripped down to two objects and sounds. The excessively long delay in microseconds at the bottom between each reading, 4500, was because shorter readings resulted in a really awkward repeat of the mp3 file over and over. 4500 ms was enough time to play part of the file without being completely unresponsive. I did, however, eventually get it working to a certain extent.

I really wish I could have gotten the array working.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s