Person Project Idea

First of all, I really want to use the sounds recorded in Luzhi and initially I was thinking of creating something similar to Hildegard Westerkamp’s work, Into the Labyrinth. Ashley and I have recorded a lots of great individual sounds, rain, water, birds, bells and a bunch of things I could use for that.

Then I realized it would not really be about a person but I would like to work with these sounds because I find them amazing. I don’t want to create a project including Chinese conversation that we have, since due to my very limited Chinese knowledge I  do not find that interesting. So I was thinking I could create an audio work of “what a person can feel when arriving to Luzhi” . Since lot of sounds that we recorded sound really sad I was also thinking what a person feels like when having depression or other sorts of mental problem but I find that a little bit risky since it would require a lot of research as well.

IxLab: Lab6-Serial Communication(Dan)

Date: March 17, 2017

Instructor: Dan

Partner: Junyao(June) Wu

 

Aim: The aim of today’s lab is around serial communication. We are instructed to write codes that enables input on one side (Processing or Arduino) to create output on the other side (Arduino or Processing).

 

Processing To Arduino: To control an Arduino output from the computer through the Processing language, we used the keyPressed variable and the key variable to generate the effect that when a key is pressed, buzzer will play a respective pre-set tone.

To start with, we tried to create a program that make the buzzer to generate a tone when a key is pressed, yet we mistook the boolean variable keyPressed for a char. After closer reading of the textbook, we fixed the problem by introducing the key variable into the program.

Then we started to try two keys, which, if succeed, will make multiple keys possible. We used the if conditional to let Arduino understand that different keys are pressed. Yet we didn’t succeed on our first try, which results in play the same tone whichever key is pressed.

Then, when checking the code, we realized that it’s because we misused a ; in the if condition. And then the problem is fixed.

屏幕快照 2017-03-17 下午2.19.14

The codes are as follows:

//Arduino
const int buzzer = 13;
int val;
void setup() {
Serial.begin(9600);
pinMode(buzzer,OUTPUT);
}

void loop() {

// receive a value from processing
while (Serial.available()) {

val = Serial.read();
}
// test the value
if (val == ‘b’) {
tone(buzzer,1000);
} else if (val == ‘q’) {

noTone(buzzer);
} else if (val==’c’) {
tone(buzzer,500);
}

delay(10); // wait for Processing
Serial.println(val);

}

//Processing
import processing.serial.*;
Serial myPort;
int val;
void setup() {
printArray(Serial.list());
// this prints out the list of all
// available serial ports on your computer.

myPort = new Serial(this, Serial.list()[1], 9600);
// Change the Serial.list()[0] to your port
}
void draw() {
// to send a value to the Arduino
if (keyPressed) {
if(key==’b’){
myPort.write(‘b’);
}if(key==’c’){
myPort.write(‘c’);
}
} else {
myPort.write(‘q’);
}
}

 

Arduino To Processing: We started late on doing this part of the lab, for that we spent too much time on debugging the first part, so we decided to use a potentiometer to control the size of a circle on the computer. Yet the process isn’t easy, either, for that we got confused with the kind of variable that can be transferred between Arduino and Processing, and keep getting error. But thankfully we made it just on time.

The codes are as follows:

//Arduino
int potpin=0;
void setup() {
Serial.begin(9600);
}

void loop() {
int val=analogRead(potpin);
int valu=map(val,0,1023,0,200);
Serial.write(valu);
delay(20);
Serial.println(valu);

}

//Processing
import processing.serial.*;
int val = 0; // To store data from serial port
Serial myPort;// The serial port object
void setup() {
size(500,500);
printArray(Serial.list());
myPort = new Serial(this, Serial.list()[1], 9600);

}
void draw(){
background(0);
while ( myPort.available() > 0) { // If data is available,
val = myPort.read(); // read it and store it in val
}
fill(255);
ellipse(250,250,val,val);
}

UXUI // Mk1 Story Curve:

IMG_1964

This is the original story curve for my interactive installation, currently, this installation has completely put on the backburner completely in favor of an entire interactive exhibition.


In order to create a strong emotional impact in a short amount of time, I intend to use shock factors as my main resource. Users will come in without really knowing what to expect, their initial experience will be one filled with exploration. After passing certain parts of the maze pre-recorded whispers will be played literally behind their backs causing them to turn around in caution. The experience will begin to get more and more disorienting, they’re hearing voices yet they believe they’re alone, at the same time visually they’ll be completely surrounded by images of themselves. The effect of this will be both isolating yet suffocating. By combining loud and abrupt voices yelling out vulgarities relating to their identities quickly following whispers and murmurs, users will constantly be in a state of trying to adapt and process. By utilizing these soft to loud transitions and ominous music cues, users will also experience a strong sense of anxiety. We plan to utilize this in repetition with different phrases being subbed in and increasingly anxiety inducing music to make each cycle different.

Ultimately at the end of this shocking/anxiety inducing maze users will be questioning why they just experienced this. Why were they being yelled at? Trying to make sense of the things they just experienced. Why why why?! At the very end, a black light will illuminate their shirts and reveal “the answer” that society answers to. “You were verbally abused because you’re gay, you were yelled at because you were black” etc etc, an answer which is immediately rejected by users who have just experienced these prejudices.

After coming to this realization of unjust the world’s reasoning is for all these actions, they’ll be compelled to learn more, get a new “identity”, try to understand the discriminations that others face. Repeating the experience but going in with a new purpose experiencing similar things in a different way.

We hope that this will encourage users to speak out against discrimination, that it will help them widen their world-views and have more empathy for those who are discriminated against.

NOC-Lab6-The beauty of sine and noise-Xiaohan Yang

Lab6/Assignment6

Date: March 17, 2017

Documented on: March 21, 2017

Documented by: Xiaohan Yang

Instructor: Moon Junghyun

Aim: We were asked to play with sin(), cos() and noise() during this weekend.


This week, I was very excited to learn about oscillation because it could make movements more soft and elegant. Inspired by what we learned in lecture, I decided to use oscillation to change the shape of my object.

To begin with, I thought about using sine value or noise value to be the diameter of ellipse and rotating the ellipse to dram a flower. However, the result was not satisfying because the flower shape is not stable. Sometimes, it turned out to be one ellipse, while sometimes it turned out to be a flower with random number of petals. With Professor Moon’s help, I realised that there was a another way to draw flowers. Instead of using the ellipses to be petals, I could actually use the ellipse as a point of pen to draw the outline of a flower. Here is the demo and my code. flower.demo

flower:

Moreover, inspired by the sample wave we learned in recitation. I created the vine by flipping all the x parameters and y parameters in the sample code. Moreover, in order to change the length of the vine, I used a random() function to replace the original number. Here is the demo and my code. vines

flower:

Serial Communication L

Instructor: Marcela

Class: Interaction Lab

Objective: The purpose of this lab was for use to learn how to use serial communication to create interaction between Arduino and processing. We got to learn how to do this both ways, so inputs from Arduino would create a reaction in processing and vice-versa.

Process: We decided to start with inputs coming from processing and then going to Arduino and then later focus on Arduino inputs going to processing. The idea was that processing would create an image of three circles RYG and when you clicked a circle, the corresponding LED would turn on. Then there would be a light sensor on the Arduino that would change the image of the three circles depending on how much light it detected.

These were our materials:

17440121_968901336577530_1593351041_n

The set up for the lights was easy, simply connect each light to a pin and a resistor and then ground all the lights. The light sensor was a bit harder because we needed to connect it to three things, an analog read, a power source and a ground. This is what the three lights looked like all set up.

17410436_968901313244199_1910479419_n

I decided, however, that if I were to add the light sensor, the wiring would make it difficult to see each light, so I used a small breadboard to separate the lights from the big breadboard and then add in the sensor:

17439614_968901286577535_152248237_n

After the wiring was set up, the rest was up to the coding. For processing, we just drew the three circles with the corresponding colors and according to which circle you clicked it would send a value (R, Y, G) to the Arduino code. The Arduino code then used if statements that were dependent on the value sent through serial communication and the corresponding light on the breadboard would light up according to that:

17409919_968901289910868_162082970_n

Next we had to do serial communication from the light sensor to the processing image. We set up an analog read on the light sensor and a serial write that would send that value to processing. Then we set up if statements that would turn a certain circle black according to different intervals.

After that we were done:

17410218_968901256577538_1829545693_n 17409810_968901246577539_1817100506_n

Result: We learned a lot from this lab, the concepts were still relatively simple but the syntax and certain mechanics of the coding were interesting to learn.

 

The processing code is this (I couldn’t figure out how to post both codes in the bottom):

import processing.serial.*;
Serial myPort;
int valA; //value from arduino
int x, y, z;
void setup() {
myPort = new Serial(this, Serial.list()[2], 9600);
// Change the Serial.list()[0] to your port
size(500, 200);

}
void draw() {
ellipse(250, 100, 100, 100); //red
fill(x, 0, 0);
ellipse(100, 100, 100, 100); //green
fill(0, y, 0);
ellipse(400, 100, 100, 100); //yellow
fill(z, z, 0);

// to send a value to the Arduino
if (dist(mouseX, mouseY, 250, 100) < 50){
if (mousePressed) {
myPort.write(‘Y’);
//println(‘Y’);
}
else {
myPort.write(‘y’);
//println(‘y’);
}
}
if (dist(mouseX, mouseY, 100, 100) < 50){
if (mousePressed) {
myPort.write(‘R’);
//println(‘R’);
}
else {
myPort.write(‘r’);
//println(‘r’);
}
}
if (dist(mouseX, mouseY, 400, 100) < 50){
if (mousePressed) {
myPort.write(‘G’);
//println(‘G’);
}
else {
myPort.write(‘g’);
//println(‘g’);
}
}

x = 255;
y = 255;
z = 255;
while(myPort.available() > 0){
valA = myPort.read();
}
println(valA);
if(valA > 220 && valA < 250){
x = 0;
}
else if(valA < 220 && valA > 200){
z = 0;
}
else if(valA < 200){
y = 0;
}
}

int valA, val;

void setup() {
  Serial.begin(9600);
  pinMode(11, OUTPUT); //red
  pinMode(10, OUTPUT); //yellow
  pinMode(9, OUTPUT); //green
}

void loop() {
  // receive a value from processing
  while (Serial.available()) {
    val = Serial.read();
  }
  // test the value
  if (val == 'R') {
    digitalWrite(11, HIGH);
  } else if (val == 'r') {
    digitalWrite(11, LOW);
  }
//  delay(10); // wait for Processing
  if (val == 'Y') {
    digitalWrite(10, HIGH);
  } else if (val == 'y') {
    digitalWrite(10, LOW);
  }
//  delay(10); 
  if (val == 'G') {
    digitalWrite(9, HIGH);
  } else if (val == 'g') {
    digitalWrite(9, LOW);
  }
//  delay(10); 

  
  valA = analogRead(0)/4;         // read voltage value 
//  Serial.println(valA);
  Serial.write(valA);
  delay(10); 
}

Lab 6 – Serial Communication

Lab Date: March 17, 2017

Instructor: Professor Dan

Lab Partner: Kelvin Liu

Aim of Today’s Lab: Connect arduino and processing

Materials: DFRduino breadboard, 1 LED light, 5 jumper cables, 1 10k ohm resistor, 1 220k ohm resistor, 1 switch button

After listening to the instructions, Kelvin and I brainstormed through what we wanted to make. While trying to come up with an idea, we decided to use arduino and build a LED light switch button and then connect processing with the switch button. In other words, the switch button would not only turn the LED light on and off, but it would also switch the image in processing.

With that idea in mind, we first looked up ways to connect the switch button to arduino and found an example that we followed. However, even with the example, Kelvin and I struggled to make the switch button work. When we thought we connected all the wires like the example showed, the lights did not light up. We spend most of the beginning half of the class trying to figure out what was wrong. Sometimes, we would change the cables and the LED lights would light up, but it would only work sometimes, and not constantly.

20170317_140706

At that point, we decided to get some help. The learning assistant looked at our project, changed some of the cables and was soon able to understand what was wrong. First, since we couldn’t get the LED light working, we only connected the switch button to arduino, as we figured out what we had to do, then we added the LED light. As soon as the learning assistant was able to fix and get the project working, Kelvin and I moved to processing.

 

20170317_140919

Processing was a lot more simple and faster than arduino. As we looked at examples, Kelvin and I were able to work swiftly. After connecting arduino and processing together, we were able to get some results out of it. Since we had some time, we played around with the different shapes and colors. We randomly input colors and shapes and ended switching between a red circle and a blue square. However, before that we made a black and a white square with a gray background, and then we added colors and then changed shapes.

Conclusion:

Individually, arduino and processing are already challenging. However, now that we have to connect them, we have to add another step into the whole process. Coming up with the structure of the arduino took us a while, because we were not able to connect the cables properly. And once we were done with that, processing was a lot faster, but it also took a while to get to where we needed. Since arduino took us a lot more time than we thought, we were not able to work as much in processing.

Things learned / to share:

  1. Its important to do things step by step. In our case, without the arduino, we couldn’t connect it with processing. Each step is as important or more important than the final result.
ARDUINO

const int  buttonPin = 2;    // the pin that the pushbutton is attached to

// Variables will change:
int buttonState = 0;         // current state of the button
int lastButtonState = 0;     // previous state of the button

void setup() {
  // initialize the button pin as a input:
  pinMode(buttonPin, INPUT);
  // initialize serial communication:
  Serial.begin(9600);
}

void loop() {
  // read the pushbutton input pin:
  buttonState = digitalRead(buttonPin);

  // compare the buttonState to its previous state
  if (buttonState != lastButtonState)
    Serial.write(buttonState);
    // Delay a little bit to avoid bouncing
  delay(50);
  // save the current state as the last state,
  //for next time through the loop
  lastButtonState = buttonState;
}


PROCESSING

import processing.serial.*;
Serial myPort;
int valueFromArduino;

void setup() {
  size(500, 500);
  background (255);
  rectMode (CENTER);
  printArray(Serial.list());
  // this prints out the list of all available serial ports on your computer.
  myPort = new Serial(this, Serial.list()[ 2 ], 9600);
}

void draw() {
  background (255);
  // to read the value from the Arduino
  while ( myPort.available() > 0) {
    valueFromArduino = myPort.read();
  }
  println(valueFromArduino);
  if (valueFromArduino == 0) {
   ellipse(width/2,height/2,200,200);
   fill(10,20,150);
  } else {
   rect(width/2,height/2,200,200);
   fill(150,20,10);
  }
}

Lab 6 Serial Communication – Oliver Ruston

3/19/2017

Lab 6 Documentation

Instructor: Dan

For this lab we had to work in pairs in order to exchange data between processing and arduino with serial communication. The first task was to create a drawing in processing, and then make it tell arduino to do an action. In class we used an example where processing drew a square, and when pressed by the mouse, it would cause arduino to turn on an LED. I basically tried to recall how to do this, since I did not get a full understanding or complete the task in class. With this as a guideline, I was able to complete the first task. I drew a square, and then told processing that when the mouse was pressed, to send the value ‘H’ to arduino. When the mouse was not pressed, it would send the value ‘L’. Arduino was told that when it read the value ‘H’ it should make the current high for pin 13. This would cause the LED which was connected to pin 13 to light up. Otherwise if it read the value ‘L’ then arduino would make the current low and the LED would not light up.

20170317_135053

After getting this to work I went to the next task which was sending data from arduino to processing with serial. For this I connected a temperature probe to the arduino so that there would be an input from the arduino that could create the data which would be sent to processing. I established that arduino should read the values from the sensor and then to send them to processing through serial communication by using “  int sensorValue = analogRead(A0)/4; / Serial.write(sensorValue);”. From there I used processing to establish a variable which would be the values read by the sensor and sent through serial. Processing would print out the value and then depending on if it was above or below the value ‘14’, the color of the square I drew would change from black to red. The problem I ran into at first was that I did not establish that the variable should be based on the readings from the sensor. I fixed this by writing: “inByte = myPort.read();”.

20170317_145258

Processing --> Arduino
Processing:
import processing.serial.*;
Serial myPort;
int val;
void setup() {
  printArray(Serial.list());
  myPort = new Serial(this, Serial.list()[7], 9600);
}
void draw() {
  if (mousePressed) {
    myPort.write('H');
  } else {
    myPort.write('L');
  }
}
Arduino:
int val;
void setup() {
  Serial.begin(9600);
  pinMode(13, OUTPUT);
}

void loop() {
  while (Serial.available()) {
    val = Serial.read();
  }
  if (val == 'H') {
    digitalWrite(13, HIGH);
  } else if (val == 'L') {
    digitalWrite(13, LOW);
  }
  delay(10); //wait for processing
}

Arduino --> Processing
Arduino:
int val;
void setup() {
  Serial.begin(9600);
}

void loop() {
  int sensorValue = analogRead(A0)/4;
  Serial.write(sensorValue);

}
Processing:
import processing.serial.*;
Serial myPort;

void setup(){
  printArray(Serial.list());
  myPort = new Serial(this, Serial.list()[3], 9600);
  background(255);
}
void draw() {
  int inByte = 0;
 while (myPort.available() > 0) {
   inByte = myPort.read();
   println(inByte);
   if (inByte > 14){
     fill(255,0, 150);
   }
   else{
     fill(0, 0, 0);
   }
   rect(40, 40, 20, 20);
 }
  
}

Week 7: Response to Theft and Artistry and Can’t Stop, Won’t Stop(Vasudevan)

I thought these two readings were really interesting, because although I know a little about cultural appropriation and its nuances, I didn’t know in such specific detail about how Jamaica’s history shaped Hip-Hop. Being aware of these issues,being Mexican-American, I guess I’m little bit of a stickler. But these issues get complicated very easily. What I found super interesting was how the Tate and Hank from Public Enemy agreed that what matters about cultural appropriation is whether or not something is “dope.” Another interesting point made was that people don’t care if its Adele, but they do when it’s Eminem. My guess is that perhaps, some examples are more blatantly disrespectful to other cultures. To be honest, I generally side with whoever feels that their culture is being appropriated. Generally, these times, the adaptation is sparse and the little remix that’s done is not dope by any means. But that is so subjective.

To be honest, I’m not sure where the line is. With things like this, I think the line will always be blurry but, to me, context is most important in evaluating these examples. If you take for instance Iggy Azalea , which *most* people agree has not added anything significant  to the genres of Hip-Hop or Rap, her music just seems like a muddled version of the originals, people who actually practice these things as an art form. Again very subjective, but another example could be as the NPR article mentioned, Katy Perry. She didn’t add anything significant when she took some phrases she thought sounded cool and put them to the tune of a pop song, with little regard for where they came from. Then, in the middle of Perry’s video for that song (“This is How We Do”) she sticks a picture of Aretha Franklin as if the song were an ode to her. I’m not sure everyone would agree with me that this song is appropriation, considering slang from Hip-Hop has always wiggled its way into mainstream culture, but at best, we can call this distasteful. What does Aretha Franklin have to do with it? Just an honest question to which I have no answer.

I’m glad I know more about the history of Hip-Hop, because I know that a lot of slang from America derived from it. There’s a lot to be gained from learning about the history of something that shapes culture in your country so significantly, especially since it’s not something you learn about everyday.

Though this is a reiteration of stuff I already think about a lot, the most important thing I took out of reading these two articles is this: If you’re adapting something from another culture 1) it needs to be actually mindful and 2) it’d better be damn good and very well adapted lest you be ROASTED by three quarters of Twitter and NPR. Not things I’d ever wish upon myself. Being the voyeur I admittedly am, I do, however, enjoy all the celebrity Twitter roasts. Twitter, keep on!

Week 2-NIME-In-class documentation-synthesis instrument

In week 2`s lecture, we learnt how to assemble 555 or amplifier. I chose to assemble the amplifier in class because I thought this might works together with my piesel disk. It took me a long time to finish this and it took longer than I expected due to the complicated circuit.

Later for this week, I tried to dismantle the toy I brought to the class. The result looks pretty well. I have been able to explore where the speaker is and how the circuit works under the guidance of Antonius. I managed to create the rhythm by the  “barf” of little dogs. However, unfortunately, I burnt the circuit one day before the performance. I have to think about new ideas.

WechatIMG3Thus, I tried to connect the piesel disk I made last class with the amplifier. I thought it might be a good idea to amplify a sound from my iPhone of laptop and combine it with the amplified sound from nature. Therefore, I have connected the piesel disk with amplifier on the same circuit.WechatIMG2

Last time, when we were asked to make instrument that amplified the sound of lipstick painted on the napkin. Whats more, Therefore, I have picked a song from a lipstick“I got you” advertisement and matched with the pound of lipstick on the napkins. I used it as the sound of drums and match with the rhythm of beats of the song. I had also received some suggestions towards my instrument last time. I should works on my performance perspective and improve on how the audience will perceive your performance. Therefore, for this time, I have tried to make the theme of lipstick advertisement as explicit as possible to the audience. Thus, I have designed to paint the lipstick on the napkin and pick up the napkin, cover it on my mouth. I tried to show the normal lipstick advertisement content.

WechatIMG4

WechatIMG1

Below is my performance in class:

After class, from the feedback of our classmates, I knew that audience may perceive different perspective with your theme. It might be a hard thing to let your audience know what you want to express immediately. Also, make the performance attractive all the time is also a thing to consider.

Lab 6: Serial Communication (Marcela)

Date: March, 17th 2017

Instructor: Marcela

Partner: Eric Zhang

Objective: Make a Processing sketch that tells Arduino to do something, and make your Arduino tell Processing to do something

Materials:

  1. Arduino
  2. Potentiometer
  3. Cables
  4. Breadboard

Software:

  1. Arduino
  2. Processing

How to do it

A. Sending information from Arduino to Processing:

  1. Write the code for both Arduino and Processing according to the pictures below :

Arduino:

// IMA NYU Shanghai
// Interaction Lab
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(A0);
Serial.write(sensorValue/4);

// too fast communication might cause some latency in Processing
// this delay resolves the issue.
delay(15);
}

Processing:

/ IMA NYU Shanghai
// Interaction Lab
import processing.serial.*;
Serial myPort;
int valueFromArduino;
void setup() {
size(500, 500);
background(0);

printArray(Serial.list());
// this prints out the list of all available serial ports on your computer.

myPort = new Serial(this, Serial.list()[3], 9600);
// WARNING!
// You will definitely get an error here.
// Change the PORT_INDEX to 0 and try running it again.
// And then, check the list of the ports,
// find the port “/dev/cu.usbmodem—-” or “/dev/tty.usbmodem—-”
// and replace PORT_INDEX above with the index number of the port.
}
void draw() {
// to read the value from the Arduino
while ( myPort.available() > 0) {
valueFromArduino = myPort.read();
}
println(valueFromArduino);

// add your code here
}

Video:

2. Build a simple circuit that includes potentiometer and connect that using Arduino to your computer. After that upload the code you’ve made previously.

B. Sending information from Processing to Arduino:

  1. Write the code for both Arduino and Processing according to the pictures below :

Arduino:

// IMA NYU Shanghai
// Interaction Lab
int valueFromProcessing;
int ledPin = 13;
void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
}
void loop() {
// to receive a value from Processing
while (Serial.available()) {
valueFromProcessing = Serial.read();
}

if (valueFromProcessing == ‘H’) {
digitalWrite(ledPin, HIGH);
} else if (valueFromProcessing == ‘L’) {
digitalWrite(ledPin, LOW);
} else {
// something esle
}

// too fast communication might cause some latency in Processing
// this delay resolves the issue.
delay(10);
}

Processing:

// IMA NYU Shanghai
// Interaction Lab
import processing.serial.*;

Serial myPort;
int valueFromArduino;
void setup() {
size(500, 500);
background(0);

printArray(Serial.list());
// this prints out the list of all available serial ports on your computer.

myPort = new Serial(this, Serial.list()[3], 9600);
// WARNING!
// You will definitely get an error here.
// Change the PORT_INDEX to 0 and try running it again.
// And then, check the list of the ports,
// find the port “/dev/cu.usbmodem—-” or “/dev/tty.usbmodem—-”
// and replace PORT_INDEX above with the index number of the port.
}
void draw() {
// to send a value to the Arduino
if (mousePressed) {
myPort.write(‘H’);
} else {
myPort.write(‘L’);
}
}

2. For this experiment, you don’t need to include any electrical components, you simply just need your Arduino and get it connected to your computer. As you upload the code and run your processing you will notice that whenever you press your mousepad, the L light on your Arduino will turn on.

Video:

 

Reflection:

During this Lab experiment, we learned how to connect Arduino to Processing and vice versa. This lab is really useful as we will be working more on both software in the future.