Title: Object and Space

 

Description:

The final piece consists of a chair sitting in a sectioned off/isolated space. The chair has switches positioned all around it that activate different soundscapes when pressed – when more than one of the buttons is pressed, there is a heightened experience. The chair in essence operates as a musical instrument. The responsive button combinations are listed below:

Button 1 = Sound 1

Button 2 = Sound 2

Button 3 = Sound 3

Button 4 = Sound 4

Button 5 = Sound 5

Button 2, Button 5 = Sound 6

Button 1, Button 3 = Sound 7

Button 2, Button 4 = Sound 8

Button 1, Button 5 = Sound 9

Button 1, Button 3, Button 4 = Sound 10

Button 2, Button 4, Button 5 = Sound 11

Button 1, Button 2, Button 5 = Sound 12

Button 1, Button 2, Button 4, Button 5 = Sound 13

Button 2, Button 3, Button 4, Button 5 = Sound 14

Button 1, Button 2, Button 3, Button 4, Button 5 = Sound 15

Here are three of the sound pieces that I made:

Documentation:

 

Reflection:

This project was difficult for me in several ways – I had trouble with the initial ideation, and then further executing my idea in a timely manner. I now also understand the importance of accounting for the evolution of an idea; I was not involved with the process long enough to apply the understanding of my object as it relates to a user, until much later in the project timeline. I also recognize that my desire and stress to make everything that I am creating perfect is often times hindering, especially when I’ve taken on a project that is out of scope. In future projects, I want to be better about making maquettes and more detailed sketches, as this will help me visualize my physical product at earlier stages in the making process.

In retrospect, I also wish I would have considered more how I wanted my physical object to be engaged with in a continuous manner. I was initially planning on attaching a series of LED’s activated by buttons, that make a sound once all pressed. After I pursued that idea, I realized it was not my intent for the piece, as it placed a limit on the amount of interaction that can occur with the chair. I have realized that intent and execution should operate in conjunction, this should inform the final product.

 

Process Documentation:

Chair in its initial stages

Chair being spray painted

Chair being reupholstered

Chair being reupholstered

Buttons mechanisms being coded

 

Logic Schematic:

 

Code Submission:

I was assisted/ guided in writing this code with the help of Sidney Church, professor in the School of Art.

Transmission Code: This code is embedded in the Arduino attached to the chair, and it transmits wireless signals to the receiver Arduino when a button is pushed or let go.

<iframe src=https://create.arduino.cc/editor/stuart1999/dbfb46ef-d854-4b04-8636-2f6c55aaca97/preview?embed style=”height:510px;width:100%;margin:10px 0″ frameborder=0></iframe>

 

Receiver Code: This code is embedded in the Arduino plugged into my computer, and it receives wireless signals from the transmitter Arduino when a button is pushed or let go. This information is used by the processing code to determine when/when not to play the sound tracks.

<iframe src=https://create.arduino.cc/editor/stuart1999/d0cf05fe-7680-4ea4-8376-542a8d41c880/preview?embed style=”height:510px;width:100%;margin:10px 0″ frameborder=0></iframe>

 

Processing Code: This code is what plays the audio tracks when there are received signals that the buttons are pushed/not pushed.


//Bring in libraries for additional functionality
import processing.serial.*; //this will allow us to monitor the serial connection
import ddf.minim.*;//this will allow us to play audio files

Minim minim;//this allows us to play audio files
AudioPlayer btn1Audio;//this is the audio player assigned to button 1. each button gets an audio player
AudioPlayer btn2Audio;
AudioPlayer btn3Audio;
AudioPlayer btn4Audio;
AudioPlayer btn5Audio;
AudioPlayer combo25Audio; //this audio player will play will buttons 2 and 5 are pressed at the same time
AudioPlayer combo13Audio; //this audio player will play will buttons 1 and 3 are pressed at the same time
AudioPlayer combo24Audio; //this audio player will play will buttons 2 and 4 are pressed at the same time
AudioPlayer combo15Audio; //this audio player will play will buttons 1 and 5 are pressed at the same time
AudioPlayer combo134Audio; //this audio player will play will buttons 2, 4,and 5 are pressed at the same time
AudioPlayer combo245Audio; //this audio player will play will buttons 1, 3,and 4 are pressed at the same time
AudioPlayer combo345Audio; //this audio player will play will buttons 3, 4,and 5 are pressed at the same time
AudioPlayer combo125Audio; //this audio player will play will buttons 1, 2,and 5 are pressed at the same time
AudioPlayer combo1245Audio; //this audio player will play will buttons 1, 2, 4, and 5 are pressed at the same time
AudioPlayer combo2345Audio; //this audio player will play will buttons 2, 3, 4, and 5 are pressed at the same time
AudioPlayer combo12345Audio; //this audio player will play will buttons 1, 2, 3, 4, and 5 are pressed at the same time

//give our instances names
Serial arduino;
String arduinoData;

float data;

import javax.swing.JOptionPane; // Had to change this which meant showMessageDialog() changes
final boolean debugPort = true;

void setup(){
minim = new Minim(this);
//Create a data folder within this sketch's folder. Place all audio files there.
//the sound can also be a direct path to a file location or a URL to a sound file online
btn1Audio = minim.loadFile("Nature.mp3");
btn2Audio = minim.loadFile("Nature.mp3");
btn3Audio = minim.loadFile("Sunrise.mp3");
btn4Audio = minim.loadFile("Sea Foam.mp3");
btn5Audio = minim.loadFile("Sea Foam.mp3");
combo25Audio = minim.loadFile("Environment.mp3");
combo13Audio = minim.loadFile("Audio for buttons 1 and 3");
combo24Audio = minim.loadFile("Audio for buttons 2 and 4");
combo15Audio = minim.loadFile("Audio for buttons 1 and 5");
combo134Audio = minim.loadFile("Audio for buttons 1, 3, and 4");
combo245Audio = minim.loadFile("Audio for buttons 2, 4, and 5");
combo345Audio = minim.loadFile("Audio for buttons 3, 4, and 5");
combo125Audio = minim.loadFile("Audio for buttons 1, 2, and 5");
combo1245Audio = minim.loadFile("Audio for buttons 1, 2, 4, and 5");
combo2345Audio = minim.loadFile("Audio for buttons 2, 3, 4, and 5");
combo12345Audio = minim.loadFile("Audio for buttons 1, 2, 3, 4, and 5");

String COMx = "";
try {
if(debugPort) printArray(Serial.list());
int numPorts = Serial.list().length;
if (numPorts != 0) {
if (numPorts >= 2) {
COMx = (String) JOptionPane.showInputDialog(null,
"Select COM port",
"Select port",
JOptionPane.QUESTION_MESSAGE,
null,
Serial.list(),
Serial.list()[0]);

if (COMx == null) exit();
if (COMx.isEmpty()) exit();
}
arduino = new Serial(this, COMx, 9600); // change baud rate to your liking
arduino.bufferUntil('\n'); // buffer until CR/LF appears, but not required..
}
else {
JOptionPane.showMessageDialog(frame,"Device is not connected to the PC");
exit();
}
}

catch (Exception e)
{ //Print the type of error
JOptionPane.showMessageDialog(frame,"COM port " + COMx + " is not available (maybe in use by another program)");
println("Error:", e);
exit();
}

}

void draw(){
///////////////////////////////////////////////////////////////////////////////////////
//////////////////////// READ WHAT'S COMING IN FROM ARDUINO ////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
// ==================================================================================//
/*
The program on the arduino just sends the command Serial.println("1") or whatever number you want
at a baud of 9600, which was setup when we created the serial port for processing
*/

// get message till line break (ASCII > 13)
arduinoData = arduino.readStringUntil(13);

if(arduinoData != null){ //if Arduino is sending somthing
data = float(arduinoData); //set it equal to message this is what let's us know where someone is at
print("Data = ");
println(data);
}

switch (int(data)) {
///////////////////////////////////////////////////////////////////
case 1: //Button 1
println("Playing File 1: ");
btn1Audio.play();
if ( btn1Audio.position() == btn1Audio.length() )
{
btn1Audio.rewind();
btn1Audio.play();
}
break;
case 11: //let's say we send an 11 when btn1 is released. If we get an 11, lets pause the track associated with btn1.
println("Pausing File 1: ");
btn1Audio.pause();
break;

///////////////////////////////////////////////////////////////////
case 2: //Button 2
println("Playing File 2: ");
btn2Audio.play();
if ( btn2Audio.position() == btn2Audio.length() )
{
btn2Audio.rewind();
btn2Audio.play();
}
break;
case 22: //let's say we send an 22 when btn2 is released. If we get an 22, lets pause the track associated with btn2.
println("Pausing File 2: ");
btn2Audio.pause();
break;

///////////////////////////////////////////////////////////////////
case 3: //Button 3
println("Playing File 3: ");
btn3Audio.play();
if ( btn3Audio.position() == btn3Audio.length() )
{
btn3Audio.rewind();
btn3Audio.play();
}
break;
case 33: //let's say we send an 33 when btn3 is released. If we get an 33, lets pause the track associated with btn3.
println("Pausing File 3: ");
btn3Audio.pause();
break;

///////////////////////////////////////////////////////////////////
case 4:
println("Playing File 4: ");
btn4Audio.play();
if ( btn4Audio.position() == btn4Audio.length() )
{
btn4Audio.rewind();
btn4Audio.play();
}
break;
case 44: //let's say we send an 44 when btn4 is released. If we get an 44, lets pause the track associated with btn4.
println("Pausing File 4: ");
btn4Audio.pause();
break;

///////////////////////////////////////////////////////////////////
case 5: //Button 5
println("Playing File 5: ");
btn5Audio.play();
if ( btn5Audio.position() == btn5Audio.length() )
{
btn5Audio.rewind();
btn5Audio.play();
}
break;
case 55: //let's say we send an 55 when btn5 is released. If we get an 55, lets pause the track associated with btn5.
println("Pausing File 5: ");
btn5Audio.pause();
break;

///////////////////////////////////////////////////////////////////
case 25: //example for multiple button presses assuming that tracks 2 and 5 are playing. On the arduino if both btns are pressed, it'll send the number 25
println("Buttons 2 and 5 are pressed. Playing File 25: ");
//first we'll pause the 2 tracks that are playing
btn2Audio.pause();
btn5Audio.pause();
//then let's play the special track that happens when both tacks are pressed at the same time
combo25Audio.play();
if ( combo25Audio.position() == combo25Audio.length() )
{
combo25Audio.rewind();
combo25Audio.play();
}
break;
case 52: //let's say we send an 52 when btns 2 and 5 are released. If we get an 52, lets pause the track associated with btn25.
println("Pausing File 25: ");
combo25Audio.pause();
break;

///////////////////////////////////////////////////////////////////
case 13: //example for multiple button presses assuming that tracks 1 and 3 are playing. On the arduino if both btns are pressed, it'll send the number 13
println("Buttons 1 and 3 are pressed. Playing File 13: ");
//first we'll pause the 2 tracks that are playing
btn1Audio.pause();
btn3Audio.pause();
//then let's play the special track that happens when both tacks are pressed at the same time
combo13Audio.play();
if ( combo13Audio.position() == combo13Audio.length() )
{
combo13Audio.rewind();
combo13Audio.play();
}
break;
case 31: //let's say we send an 31 when btns 1 and 3 are released. If we get an 31, lets pause the track associated with btn13.
println("Pausing File 13: ");
combo13Audio.pause();
break;

///////////////////////////////////////////////////////////////////
case 24: //example for multiple button presses assuming that tracks 2 and 4 are playing. On the arduino if both btns are pressed, it'll send the number 24
println("Buttons 2 and 4 are pressed. Playing File 24: ");
//first we'll pause the 2 tracks that are playing
btn2Audio.pause();
btn4Audio.pause();
//then let's play the special track that happens when both tacks are pressed at the same time
combo24Audio.play();
if ( combo24Audio.position() == combo24Audio.length() )
{
combo24Audio.rewind();
combo24Audio.play();
}
break;
case 42: //let's say we send an 42 when btns 2 and 4 are released. If we get an 42, lets pause the track associated with btn24.
println("Pausing File 24: ");
combo24Audio.pause();
break;

///////////////////////////////////////////////////////////////////
case 15: //example for multiple button presses assuming that tracks 1 and 5 are playing. On the arduino if both btns are pressed, it'll send the number 15
println("Buttons 1 and 5 are pressed. Playing File 15: ");
//first we'll pause the 2 tracks that are playing
btn1Audio.pause();
btn5Audio.pause();
//then let's play the special track that happens when both tacks are pressed at the same time
combo15Audio.play();
if ( combo15Audio.position() == combo15Audio.length() )
{
combo15Audio.rewind();
combo15Audio.play();
}
break;
case 51: //let's say we send an 51 when btns 1 and 5 are released. If we get an 51, lets pause the track associated with btn15.
println("Pausing File 51: ");
combo15Audio.pause();
break;

///////////////////////////////////////////////////////////////////
case 134: //example for multiple button presses assuming that tracks 1, 3 and 4 are playing. On the arduino if all 3 btns are pressed, it'll send the number 134
println("Buttons 1, 3 and 4 are pressed. Playing File 134: ");
//first we'll pause the 3 tracks that are playing
btn1Audio.pause();
btn3Audio.pause();
btn4Audio.pause();
//then let's play the special track that happens when both tacks are pressed at the same time
combo134Audio.play();
if ( combo134Audio.position() == combo134Audio.length() )
{
combo134Audio.rewind();
combo134Audio.play();
}
break;
case 431: //let's say we send an 431 when btns 1, 3 and 4 are released. If we get an 431, lets pause the track associated with btn134.
println("Pausing File 431: ");
combo134Audio.pause();
break;

///////////////////////////////////////////////////////////////////
case 245: //example for multiple button presses assuming that tracks 2, 4 and 5 are playing. On the arduino if all 3 btns are pressed, it'll send the number 245
println("Buttons 2, 4 and 5 are pressed. Playing File 245: ");
//first we'll pause the 3 tracks that are playing
btn2Audio.pause();
btn4Audio.pause();
btn5Audio.pause();
//then let's play the special track that happens when both tacks are pressed at the same time
combo245Audio.play();
if ( combo245Audio.position() == combo245Audio.length() )
{
combo245Audio.rewind();
combo245Audio.play();
}
break;
case 542: //let's say we send an 542 when btns 2, 4 and 5 are released. If we get an 542, lets pause the track associated with btn245.
println("Pausing File 542: ");
combo245Audio.pause();
break;

///////////////////////////////////////////////////////////////////
case 345: //example for multiple button presses assuming that tracks 3, 4 and 5 are playing. On the arduino if all 3 btns are pressed, it'll send the number 345
println("Buttons 3, 4 and 5 are pressed. Playing File 345: ");
//first we'll pause the 3 tracks that are playing
btn3Audio.pause();
btn4Audio.pause();
btn5Audio.pause();
//then let's play the special track that happens when both tacks are pressed at the same time
combo345Audio.play();
if ( combo245Audio.position() == combo345Audio.length() )
{
combo345Audio.rewind();
combo345Audio.play();
}
break;
case 543: //let's say we send an 543 when btns 3, 4 and 5 are released. If we get an 543, lets pause the track associated with btn345.
println("Pausing File 543: ");
combo345Audio.pause();
break;

///////////////////////////////////////////////////////////////////
case 125: //example for multiple button presses assuming that tracks 1, 2 and 5 are playing. On the arduino if all 3 btns are pressed, it'll send the number 125
println("Buttons 1, 2 and 5 are pressed. Playing File 125: ");
//first we'll pause the 3 tracks that are playing
btn3Audio.pause();
btn4Audio.pause();
btn5Audio.pause();
//then let's play the special track that happens when both tacks are pressed at the same time
combo125Audio.play();
if ( combo125Audio.position() == combo125Audio.length() )
{
combo125Audio.rewind();
combo125Audio.play();
}
break;
case 521: //let's say we send an 521 when btns 1, 2 and 5 are released. If we get an 521, lets pause the track associated with btn125.
println("Pausing File 521: ");
combo125Audio.pause();
break;

///////////////////////////////////////////////////////////////////
case 1245: //example for multiple button presses assuming that tracks 1, 2, 4 and 5 are playing. On the arduino if all 4 btns are pressed, it'll send the number 1245
println("Buttons 1, 2, 4 and 5 are pressed. Playing File 1245: ");
//first we'll pause the 4 tracks that are playing
btn1Audio.pause();
btn2Audio.pause();
btn4Audio.pause();
btn5Audio.pause();
//then let's play the special track that happens when both tacks are pressed at the same time
combo1245Audio.play();
if ( combo1245Audio.position() == combo1245Audio.length() )
{
combo1245Audio.rewind();
combo1245Audio.play();
}
break;
case 5421: //let's say we send an 5421 when btns 1, 2, 4 and 5 are released. If we get an 5421, lets pause the track associated with btn1245.
println("Pausing File 5421: ");
combo1245Audio.pause();
break;

///////////////////////////////////////////////////////////////////
case 2345: //example for multiple button presses assuming that tracks 2, 3, 4 and 5 are playing. On the arduino if all 4 btns are pressed, it'll send the number 2345
println("Buttons 2, 3, 4 and 5 are pressed. Playing File 2345: ");
//first we'll pause the 4 tracks that are playing
btn2Audio.pause();
btn3Audio.pause();
btn4Audio.pause();
btn5Audio.pause();
//then let's play the special track that happens when both tacks are pressed at the same time
combo2345Audio.play();
if ( combo2345Audio.position() == combo2345Audio.length() )
{
combo2345Audio.rewind();
combo2345Audio.play();
}
break;
case 5432: //let's say we send an 5432 when btns 2, 3, 4 and 5 are released. If we get an 5432, lets pause the track associated with btn2345.
println("Pausing File 5432: ");
combo2345Audio.pause();
break;

///////////////////////////////////////////////////////////////////
case 12345: //example for multiple button presses assuming that tracks 1, 2, 3, 4 and 5 are playing. On the arduino if all 5 btns are pressed, it'll send the number 12345
println("Buttons 1, 2, 3, 4 and 5 are pressed. Playing File 12345: ");
//first we'll pause the 5 tracks that are playing
btn1Audio.pause();
btn2Audio.pause();
btn3Audio.pause();
btn4Audio.pause();
btn5Audio.pause();
//then let's play the special track that happens when both tacks are pressed at the same time
combo12345Audio.play();
if ( combo12345Audio.position() == combo12345Audio.length() )
{
combo12345Audio.rewind();
combo12345Audio.play();
}
break;
case 54321: //let's say we send an 54321 when btns 1, 2, 3, 4 and 5 are released. If we get an 54321, lets pause the track associated with btn12345.
println("Pausing File 54321: ");
combo12345Audio.pause();
break;
}

}