Week 3: Project 2 – Scaring your computer

Partner: Angelica

This project’s purpose was to use arduino with serial communication to Max, to incite fear response from your computer. We decided to use the ultrasonic ranger to measure a range of values and output more than one response from the computer. We used the ping example from arduino to send the input values to max. We had many ideas in the beginning, but as this was a new program for both of us, we decided to stick with a simple concept and trigger videos of different “reactions” of the computer.

We wanted to use short videos on loop to keep the feelings consistent, rather than watching a long video. From this idea, we decided to use vines to represent the different reactions. The idea was that the computer disliked anybody coming near it. In the beginning we made the computer happy, with somebody being far from it. But as you get closer, the computer starts getting more scared, until you are right up to the computer at which point, the computer is freaking out.

 */

// this constant won't change.  It's the pin number
// of the sensor's output:
const int pingPin = 7;

void setup() {
  // initialize serial communication:
  Serial.begin(9600);
}

void loop() {
  // establish variables for duration of the ping,
  // and the distance result in inches and centimeters:
  long duration, inches, cm;

  // The PING))) is triggered by a HIGH pulse of 2 or more microseconds.
  // Give a short LOW pulse beforehand to ensure a clean HIGH pulse:
  pinMode(pingPin, OUTPUT);
  digitalWrite(pingPin, LOW);
  delayMicroseconds(2);
  digitalWrite(pingPin, HIGH);
  delayMicroseconds(5);
  digitalWrite(pingPin, LOW);

  // The same pin is used to read the signal from the PING))): a HIGH
  // pulse whose duration is the time (in microseconds) from the sending
  // of the ping to the reception of its echo off of an object.
  pinMode(pingPin, INPUT);
  duration = pulseIn(pingPin, HIGH);

  // convert the time into a distance
  inches = microsecondsToInches(duration);
  cm = microsecondsToCentimeters(duration);

  //Serial.write(inches);
  //Serial.print("in, ");
  Serial.write(cm);
  //Serial.print("cm");
  //Serial.println();

  delay(100);
}

long microsecondsToInches(long microseconds) {
  // According to Parallax's datasheet for the PING))), there are
  // 73.746 microseconds per inch (i.e. sound travels at 1130 feet per
  // second).  This gives the distance travelled by the ping, outbound
  // and return, so we divide by 2 to get the distance of the obstacle.
  // See: http://www.parallax.com/dl/docs/prod/acc/28015-PING-v1.3.pdf
  return microseconds / 74 / 2;
}

long microsecondsToCentimeters(long microseconds) {
  // The speed of sound is 340 m/s or 29 microseconds per centimeter.
  // The ping travels out and back, so to find the distance of the
  // object we take half of the distance travelled.
  return microseconds / 29 / 2;

Saphya & Teresa Project 2 “Oh the agony!”

In-class Practice with Max/MSP

IMG_6972

For the in-class activity, we decided to combine jitter, kslider, and the Arduino serial command to switch between two videos in Max. In order to do this, we simply had a ‘change’ object connected to two ‘jit movie’ objects that would activate if a number (coming in from the kslider) was greater than or less than some number. In our Arduino we used a potentiometer to control the ‘slider’ object controlling the input of the kslider. It was important to use ‘zmap’ to map the serial feed (which was from 0 to 1053) to a number on the kslider (0 to 127).

Homework

We decided to take our earlier example further, by including the use of a sensor. We used a light sensor to to change a seemingly happy video into something horrifying if it detects that the lights are off. To do this, we simply changed our digital input to the light sensor and changed the integer value attached to our ‘change’ object. We also removed the kslider.

Screen Shot 2017-04-27 at 5.52.03 PM

 

Project 2 Scaring your computer

We decided to use an ultrasonic sensor to scare our computer. We used serial communication to send data from our arduino to max. Our idea was to use values from our sensor to trigger videos. The videos were short, because we want the triggering of them to be fluid. We found three vines and downloaded them. One is kind of happy, the computer is recognizing the presence of a person standing near it. As a person gets closer and closer the computer gets progressively more “scared” so we chose vines to reflect this. Hooking up our Arduino to an ultrasonic sensor was simple enough. We used a ping example code from the Arduino website. it looks like:

/* Ping))) Sensor

This sketch reads a PING))) ultrasonic rangefinder and returns the
distance to the closest object in range. To do this, it sends a pulse
to the sensor to initiate a reading, then listens for a pulse
to return. The length of the returning pulse is proportional to
the distance of the object from the sensor.

The circuit:
* +V connection of the PING))) attached to +5V
* GND connection of the PING))) attached to ground
* SIG connection of the PING))) attached to digital pin 7

http://www.arduino.cc/en/Tutorial/Ping

created 3 Nov 2008
by David A. Mellis
modified 30 Aug 2011
by Tom Igoe

This example code is in the public domain.

*/

// this constant won’t change. It’s the pin number
// of the sensor’s output:
const int pingPin = 7;

void setup() {
// initialize serial communication:
Serial.begin(9600);
}

void loop() {
// establish variables for duration of the ping,
// and the distance result in inches and centimeters:
long duration, inches, cm;

// The PING))) is triggered by a HIGH pulse of 2 or more microseconds.
// Give a short LOW pulse beforehand to ensure a clean HIGH pulse:
pinMode(pingPin, OUTPUT);
digitalWrite(pingPin, LOW);
delayMicroseconds(2);
digitalWrite(pingPin, HIGH);
delayMicroseconds(5);
digitalWrite(pingPin, LOW);

// The same pin is used to read the signal from the PING))): a HIGH
// pulse whose duration is the time (in microseconds) from the sending
// of the ping to the reception of its echo off of an object.
pinMode(pingPin, INPUT);
duration = pulseIn(pingPin, HIGH);

// convert the time into a distance
inches = microsecondsToInches(duration);
cm = microsecondsToCentimeters(duration);

//Serial.write(inches);
//Serial.print(“in, “);
Serial.write(cm);
//Serial.print(“cm”);
//Serial.println();

delay(100);
}

long microsecondsToInches(long microseconds) {
// According to Parallax’s datasheet for the PING))), there are
// 73.746 microseconds per inch (i.e. sound travels at 1130 feet per
// second). This gives the distance travelled by the ping, outbound
// and return, so we divide by 2 to get the distance of the obstacle.
// See: http://www.parallax.com/dl/docs/prod/acc/28015-PING-v1.3.pdf
return microseconds / 74 / 2;
}

long microsecondsToCentimeters(long microseconds) {
// The speed of sound is 340 m/s or 29 microseconds per centimeter.
// The ping travels out and back, so to find the distance of the
// object we take half of the distance travelled.
return microseconds / 29 / 2;

We then scoured the internet for a better understanding of max. It was very complicated, but we eventually found a sample patch that we modified to our projects needs. It didn’t have a start or stop button which we thought was a problem, but it was missing a lot of things. Initially it would only play one of the videos, stop, and keep playing the audio. What we needed to add was a change object to each of our videos. From there, things actually ended up working. We tweaked the values and despite the sensor’s glitchy nature, we managed to make it work. The hardest part was definitely max, but by the end, we had a better sense of using max to program. Our project ended up having a sillier tone to it, but I kind of imagined it to be like a comical response to the computer being frightened, perhaps, if your computer spoke through gifs or short videos.

Here is a video of it:

 

Week 12: Project 2: Scare My Laptop

Student Name: Sam Jianghao Hu. Partner: Tina Jingtian Zong.

The idea of our project is to scare our laptop by touching her from behind when she’s off guard. The scenario is that one person tries to scare the laptop at the front but the laptop responds normally as if she was not scared, and then another person suddenly touches her back and she got freaked out.

In terms of technology, we used a sharp distance sensor and a touch sensor. When we were building our circuit, we ran into a weird problem that our touch sensor doesn’t work after we connected the distance sensor. We replaced all our components and added delay after reading each sensor value, but the problem remained. And the weirdest part was that after we moved to another table in the IMA Studio, the sensor suddenly worked normally. We still couldn’t figure out why it happened. Probably there was some kind of jamming from the environment.

As for the software, we tried to recreate if condition and boolean control in Max. It was a little tricky to convert format and maintain the same logic, but we somehow managed to do that. Here’s the working patcher. (The top structure is the same as the sample code for communicating with Arduino, so I didn’t show the top).

Screen Shot 2017-04-27 at 1.26.39 PM

 

We then attache components to the laptop and performed the scenario.

IMG_0226

Video: IMG_0224

Week12: In-class exercises with Max MSP by Tian (Antonius)

In class3 we did three inclass exercises with Max MSP.

The first one was to create a creepy piano. It generated random notes within a range we set (random number) and played the notes with a virtual piano. It was worth to notice that the up left channel of the keyboard controlled the pitch while the up right channel controlled the dynamics.

exercise1

In the second exercise we tried to play video with Max. I successfully loaded my short animation in the patcher as well as in an independent window. The way that Max play a video is kind of tricky, but there might be a lot of potential with the various functions such as play, end, playbar and looppoints.

exercise2

For exercise 3 we tried to realize serial communication between Arduino and Max, which we adapted later for our project 2.

exercise3 IMG_0668

int distanceSensor = 0;    // first analog sensor
int touchSensor = 0;    // digital sensor
int inByte = 0;         // incoming serial byte

void setup() {
  // start serial port at 9600 bps and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }


  pinMode(2, INPUT);   // digital sensor is on digital pin 2
  establishContact();  // send a byte to establish contact until receiver responds
}

void loop() {
  // if we get a valid byte, read analog ins:
  if (Serial.available() > 0) {
    // get incoming byte:
    //inByte = Serial.read();
    // read first analog input:
    distanceSensor = analogRead(A0);
    // read second analog input:
    touchSensor = map(digitalRead(2), 0, 1, 0, 255);
    // send sensor values:
    Serial.print(distanceSensor);
    Serial.print(",");
    delay(50);
    Serial.print(touchSensor);
    Serial.print(",");
    delay(50);
    Serial.println(0);
    delay(50);
  }
}

void establishContact() {
  while (Serial.available() <= 0) {
    Serial.println("0,0,0");   // send an initial string
    delay(300);
  }
}

/*Max patcher code
{
	"boxes" : [ 		{
			"box" : 			{
				"maxclass" : "message",
				"text" : "0",
				"numinlets" : 2,
				"numoutlets" : 1,
				"patching_rect" : [ 430.0, 825.0, 29.5, 22.0 ],
				"outlettype" : [ "" ],
				"id" : "obj-91",
				"style" : ""
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "button",
				"numinlets" : 1,
				"numoutlets" : 1,
				"patching_rect" : [ 478.0, 867.0, 24.0, 24.0 ],
				"outlettype" : [ "bang" ],
				"id" : "obj-89",
				"style" : ""
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "message",
				"text" : "0",
				"numinlets" : 2,
				"numoutlets" : 1,
				"patching_rect" : [ 222.5, 891.0, 29.5, 22.0 ],
				"outlettype" : [ "" ],
				"id" : "obj-87",
				"style" : ""
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "button",
				"numinlets" : 1,
				"numoutlets" : 1,
				"patching_rect" : [ 184.0, 846.0, 24.0, 24.0 ],
				"outlettype" : [ "bang" ],
				"id" : "obj-85",
				"style" : ""
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "comment",
				"text" : "pre_val2",
				"numinlets" : 1,
				"numoutlets" : 0,
				"patching_rect" : [ 507.0, 702.0, 150.0, 20.0 ],
				"id" : "obj-82",
				"style" : ""
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "number",
				"numinlets" : 1,
				"numoutlets" : 2,
				"patching_rect" : [ 332.0, 779.0, 50.0, 22.0 ],
				"outlettype" : [ "", "bang" ],
				"parameter_enable" : 0,
				"id" : "obj-78",
				"style" : ""
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "if ($i1 == 255) && ($i2 ==0) && ($i3==0) then 1",
				"numinlets" : 3,
				"numoutlets" : 1,
				"patching_rect" : [ 332.0, 740.0, 259.0, 22.0 ],
				"outlettype" : [ "" ],
				"id" : "obj-76",
				"style" : ""
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "if ($i1 == 255) then 0",
				"numinlets" : 1,
				"numoutlets" : 1,
				"patching_rect" : [ 478.0, 650.0, 121.0, 22.0 ],
				"outlettype" : [ "" ],
				"id" : "obj-75",
				"style" : ""
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "if ($i1 == 0) then 255",
				"numinlets" : 1,
				"numoutlets" : 1,
				"patching_rect" : [ 332.0, 650.0, 121.0, 22.0 ],
				"outlettype" : [ "" ],
				"id" : "obj-74",
				"style" : ""
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "number",
				"numinlets" : 1,
				"numoutlets" : 2,
				"patching_rect" : [ 449.0, 702.0, 50.0, 22.0 ],
				"outlettype" : [ "", "bang" ],
				"parameter_enable" : 0,
				"id" : "obj-71",
				"style" : ""
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "ezdac~",
				"numinlets" : 2,
				"numoutlets" : 0,
				"patching_rect" : [ 332.0, 1111.0, 45.0, 45.0 ],
				"id" : "obj-49",
				"style" : ""
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "live.gain~",
				"varname" : "live.gain~[1]",
				"numinlets" : 2,
				"numoutlets" : 5,
				"patching_rect" : [ 332.0, 951.0, 48.0, 136.0 ],
				"outlettype" : [ "signal", "signal", "", "float", "list" ],
				"parameter_enable" : 1,
				"id" : "obj-52",
				"saved_attribute_attributes" : 				{
					"valueof" : 					{
						"parameter_longname" : "live.gain~[1]",
						"parameter_shortname" : "live.gain~",
						"parameter_type" : 0,
						"parameter_mmin" : -70.0,
						"parameter_mmax" : 6.0,
						"parameter_initial_enable" : 1,
						"parameter_initial" : [ -70 ],
						"parameter_unitstyle" : 4
					}

				}

			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "sfplay~",
				"numinlets" : 2,
				"numoutlets" : 2,
				"fontname" : "Arial",
				"patching_rect" : [ 332.0, 914.0, 52.0, 23.0 ],
				"outlettype" : [ "signal", "bang" ],
				"id" : "obj-56",
				"style" : "",
				"fontsize" : 13.0,
				"saved_object_attributes" : 				{
					"basictuning" : 440,
					"followglobaltempo" : 0,
					"formantcorrection" : 0,
					"mode" : "basic",
					"originallength" : [ 1281.73999, "ticks" ],
					"originaltempo" : 120.0,
					"pitchcorrection" : 0,
					"quality" : "basic",
					"timestretch" : [ 0 ]
				}

			}

		}
, 		{
			"box" : 			{
				"maxclass" : "message",
				"text" : "open",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontname" : "Arial",
				"patching_rect" : [ 332.0, 868.0, 40.0, 23.0 ],
				"outlettype" : [ "" ],
				"id" : "obj-58",
				"style" : "",
				"fontsize" : 13.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "toggle",
				"numinlets" : 1,
				"numoutlets" : 1,
				"patching_rect" : [ 332.0, 823.0, 24.0, 24.0 ],
				"outlettype" : [ "int" ],
				"parameter_enable" : 0,
				"id" : "obj-66",
				"style" : ""
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "ezdac~",
				"numinlets" : 2,
				"numoutlets" : 0,
				"patching_rect" : [ 105.0, 994.0, 45.0, 45.0 ],
				"id" : "obj-60",
				"style" : ""
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "live.gain~",
				"varname" : "live.gain~",
				"numinlets" : 2,
				"numoutlets" : 5,
				"patching_rect" : [ 105.0, 834.0, 48.0, 136.0 ],
				"outlettype" : [ "signal", "signal", "", "float", "list" ],
				"parameter_enable" : 1,
				"id" : "obj-61",
				"saved_attribute_attributes" : 				{
					"valueof" : 					{
						"parameter_longname" : "live.gain~",
						"parameter_shortname" : "live.gain~",
						"parameter_type" : 0,
						"parameter_mmin" : -70.0,
						"parameter_mmax" : 6.0,
						"parameter_initial_enable" : 1,
						"parameter_initial" : [ -70 ],
						"parameter_unitstyle" : 4
					}

				}

			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "sfplay~",
				"numinlets" : 2,
				"numoutlets" : 2,
				"fontname" : "Arial",
				"patching_rect" : [ 105.0, 797.0, 52.0, 23.0 ],
				"outlettype" : [ "signal", "bang" ],
				"id" : "obj-43",
				"style" : "",
				"fontsize" : 13.0,
				"saved_object_attributes" : 				{
					"basictuning" : 440,
					"followglobaltempo" : 0,
					"formantcorrection" : 0,
					"mode" : "basic",
					"originallength" : [ 3663.359863, "ticks" ],
					"originaltempo" : 119.999992,
					"pitchcorrection" : 0,
					"quality" : "basic",
					"timestretch" : [ 0 ]
				}

			}

		}
, 		{
			"box" : 			{
				"maxclass" : "message",
				"text" : "open",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontname" : "Arial",
				"patching_rect" : [ 105.0, 740.0, 40.0, 23.0 ],
				"outlettype" : [ "" ],
				"id" : "obj-62",
				"style" : "",
				"fontsize" : 13.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "number",
				"numinlets" : 1,
				"numoutlets" : 2,
				"patching_rect" : [ 157.0, 692.5, 50.0, 22.0 ],
				"outlettype" : [ "", "bang" ],
				"parameter_enable" : 0,
				"id" : "obj-51",
				"style" : ""
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "toggle",
				"numinlets" : 1,
				"numoutlets" : 1,
				"patching_rect" : [ 157.0, 740.0, 24.0, 24.0 ],
				"outlettype" : [ "int" ],
				"parameter_enable" : 0,
				"id" : "obj-45",
				"style" : ""
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "if ($i1 > 120) && ($i2 == 0) then 1.",
				"numinlets" : 2,
				"numoutlets" : 1,
				"patching_rect" : [ 133.0, 641.0, 192.0, 22.0 ],
				"outlettype" : [ "" ],
				"id" : "obj-41",
				"style" : ""
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "comment",
				"text" : "choose a serial port from this menu",
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontname" : "Arial",
				"patching_rect" : [ 743.0, 117.0, 207.0, 20.0 ],
				"id" : "obj-37",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "serial a 9600 @autoopen 0",
				"numinlets" : 1,
				"numoutlets" : 2,
				"fontname" : "Arial",
				"patching_rect" : [ 219.0, 212.0, 155.0, 22.0 ],
				"outlettype" : [ "int", "" ],
				"id" : "obj-14",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "message",
				"text" : "close",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontname" : "Arial",
				"patching_rect" : [ 312.0, 143.0, 39.0, 22.0 ],
				"outlettype" : [ "" ],
				"id" : "obj-21",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "closebang",
				"numinlets" : 1,
				"numoutlets" : 1,
				"fontname" : "Arial",
				"patching_rect" : [ 369.0, 31.0, 65.0, 22.0 ],
				"outlettype" : [ "bang" ],
				"id" : "obj-16",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "loadbang",
				"numinlets" : 1,
				"numoutlets" : 1,
				"fontname" : "Arial",
				"patching_rect" : [ 438.0, 31.0, 60.0, 22.0 ],
				"outlettype" : [ "bang" ],
				"id" : "obj-24",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "prepend port",
				"numinlets" : 1,
				"numoutlets" : 1,
				"fontname" : "Arial",
				"patching_rect" : [ 712.0, 172.0, 79.0, 22.0 ],
				"outlettype" : [ "" ],
				"id" : "obj-28",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "umenu",
				"numinlets" : 1,
				"items" : "Bluetooth-Incoming-Port",
				"numoutlets" : 3,
				"patching_rect" : [ 621.0, 143.0, 200.0, 22.0 ],
				"outlettype" : [ "int", "", "" ],
				"parameter_enable" : 0,
				"id" : "obj-31",
				"style" : "",
				"allowdrag" : 0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "prepend append",
				"numinlets" : 1,
				"numoutlets" : 1,
				"fontname" : "Arial",
				"patching_rect" : [ 621.0, 94.0, 98.0, 22.0 ],
				"outlettype" : [ "" ],
				"id" : "obj-32",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "t clear",
				"numinlets" : 1,
				"numoutlets" : 1,
				"fontname" : "Arial",
				"patching_rect" : [ 692.0, 60.0, 43.0, 22.0 ],
				"outlettype" : [ "clear" ],
				"id" : "obj-33",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "iter",
				"numinlets" : 1,
				"numoutlets" : 1,
				"fontname" : "Arial",
				"patching_rect" : [ 621.0, 60.0, 27.0, 22.0 ],
				"outlettype" : [ "" ],
				"id" : "obj-34",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "route port",
				"numinlets" : 2,
				"numoutlets" : 2,
				"fontname" : "Arial",
				"patching_rect" : [ 621.0, 27.0, 62.0, 22.0 ],
				"outlettype" : [ "", "" ],
				"id" : "obj-36",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "fromsymbol",
				"numinlets" : 1,
				"numoutlets" : 1,
				"fontname" : "Arial",
				"patching_rect" : [ 240.0, 467.0, 74.0, 22.0 ],
				"outlettype" : [ "" ],
				"id" : "obj-7",
				"style" : "",
				"fontsize" : 12.0,
				"color" : [ 1.0, 0.890196, 0.090196, 1.0 ]
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "itoa",
				"numinlets" : 3,
				"numoutlets" : 1,
				"fontname" : "Arial",
				"patching_rect" : [ 240.0, 444.0, 46.0, 22.0 ],
				"outlettype" : [ "int" ],
				"id" : "obj-8",
				"style" : "",
				"fontsize" : 12.0,
				"color" : [ 1.0, 0.890196, 0.090196, 1.0 ]
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "zl group",
				"numinlets" : 2,
				"numoutlets" : 2,
				"fontname" : "Arial",
				"patching_rect" : [ 240.0, 421.0, 53.0, 22.0 ],
				"outlettype" : [ "", "" ],
				"id" : "obj-4",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "select 10 13",
				"numinlets" : 3,
				"numoutlets" : 3,
				"fontname" : "Arial",
				"patching_rect" : [ 184.0, 383.0, 75.0, 22.0 ],
				"outlettype" : [ "bang", "bang", "" ],
				"id" : "obj-10",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "message",
				"text" : "65",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontname" : "Arial",
				"patching_rect" : [ 329.0, 363.0, 32.5, 22.0 ],
				"outlettype" : [ "" ],
				"id" : "obj-9",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "sel 1",
				"numinlets" : 2,
				"numoutlets" : 2,
				"fontname" : "Arial",
				"patching_rect" : [ 329.0, 334.0, 36.0, 22.0 ],
				"outlettype" : [ "bang", "" ],
				"id" : "obj-6",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "comment",
				"text" : "trigger (or [t]) forces right-left conventions.  All the drawing and processing will happen before Max requests new values. When this trigger fires, it sends an ASCII A to ask Arduino for new values.",
				"linecount" : 3,
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontname" : "Arial",
				"patching_rect" : [ 229.0, 507.0, 425.0, 47.0 ],
				"id" : "obj-65",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "comment",
				"text" : "reinitializes the gates when turned on and off",
				"linecount" : 2,
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontname" : "Arial",
				"patching_rect" : [ 162.5, 275.0, 135.0, 33.0 ],
				"id" : "obj-64",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "comment",
				"text" : "checks for the ascii value of newline to begin communication.  After initial communication is made, this block shuts down.  A byte is sent back to the Arduino, indicating the patch is ready to receive information.",
				"linecount" : 5,
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontname" : "Arial",
				"patching_rect" : [ 447.0, 233.0, 254.0, 74.0 ],
				"id" : "obj-63",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "0",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontname" : "Arial",
				"patching_rect" : [ 302.0, 275.0, 32.5, 22.0 ],
				"outlettype" : [ "int" ],
				"id" : "obj-57",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "!- 1",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontname" : "Arial",
				"patching_rect" : [ 375.0, 333.0, 32.5, 22.0 ],
				"outlettype" : [ "int" ],
				"id" : "obj-55",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "gate 1 1",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontname" : "Arial",
				"patching_rect" : [ 375.0, 252.0, 54.0, 22.0 ],
				"outlettype" : [ "" ],
				"id" : "obj-54",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "toggle",
				"numinlets" : 1,
				"numoutlets" : 1,
				"patching_rect" : [ 375.0, 302.0, 20.0, 20.0 ],
				"outlettype" : [ "int" ],
				"parameter_enable" : 0,
				"id" : "obj-53",
				"style" : ""
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "gate 1 0",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontname" : "Arial",
				"patching_rect" : [ 184.0, 352.0, 54.0, 22.0 ],
				"outlettype" : [ "" ],
				"id" : "obj-50",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "sel 10",
				"numinlets" : 2,
				"numoutlets" : 2,
				"fontname" : "Arial",
				"patching_rect" : [ 375.0, 275.0, 43.0, 22.0 ],
				"outlettype" : [ "bang", "" ],
				"id" : "obj-48",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "t 65 l",
				"numinlets" : 1,
				"numoutlets" : 2,
				"fontname" : "Verdana",
				"patching_rect" : [ 184.0, 506.0, 42.0, 23.0 ],
				"outlettype" : [ "int", "" ],
				"id" : "obj-35",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "comment",
				"text" : "val3",
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontname" : "Verdana",
				"patching_rect" : [ 528.0, 598.0, 37.0, 21.0 ],
				"id" : "obj-1",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "number",
				"numinlets" : 1,
				"numoutlets" : 2,
				"fontname" : "Verdana",
				"patching_rect" : [ 457.0, 598.0, 56.0, 23.0 ],
				"outlettype" : [ "", "bang" ],
				"parameter_enable" : 0,
				"id" : "obj-3",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "comment",
				"text" : "val2",
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontname" : "Verdana",
				"patching_rect" : [ 400.0, 598.0, 37.0, 21.0 ],
				"id" : "obj-18",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "comment",
				"text" : "val1",
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontname" : "Verdana",
				"patching_rect" : [ 272.0, 598.0, 37.0, 21.0 ],
				"id" : "obj-20",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "number",
				"numinlets" : 1,
				"numoutlets" : 2,
				"fontname" : "Verdana",
				"patching_rect" : [ 332.0, 598.0, 56.0, 23.0 ],
				"outlettype" : [ "", "bang" ],
				"parameter_enable" : 0,
				"id" : "obj-22",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "number",
				"numinlets" : 1,
				"numoutlets" : 2,
				"fontname" : "Verdana",
				"patching_rect" : [ 207.0, 598.0, 55.0, 23.0 ],
				"outlettype" : [ "", "bang" ],
				"parameter_enable" : 0,
				"id" : "obj-23",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "unpack 0 0 0 0 0",
				"numinlets" : 1,
				"numoutlets" : 5,
				"fontname" : "Verdana",
				"patching_rect" : [ 207.0, 563.0, 269.0, 23.0 ],
				"outlettype" : [ "int", "int", "int", "int", "int" ],
				"id" : "obj-29",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "select 0 1",
				"numinlets" : 3,
				"numoutlets" : 3,
				"fontname" : "Arial",
				"patching_rect" : [ 302.0, 52.0, 62.0, 22.0 ],
				"outlettype" : [ "bang", "bang", "" ],
				"id" : "obj-30",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "comment",
				"text" : "click here to close the serial port",
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontname" : "Arial",
				"patching_rect" : [ 360.0, 143.0, 206.0, 20.0 ],
				"id" : "obj-26",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "comment",
				"text" : "click here to open the serial port",
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontname" : "Arial",
				"patching_rect" : [ 385.0, 117.0, 206.0, 20.0 ],
				"id" : "obj-27",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "message",
				"text" : "open",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontname" : "Arial",
				"patching_rect" : [ 334.0, 117.0, 37.0, 22.0 ],
				"outlettype" : [ "" ],
				"id" : "obj-19",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "comment",
				"text" : "Click here to get a list of serial ports",
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontname" : "Arial",
				"patching_rect" : [ 395.0, 87.0, 207.0, 20.0 ],
				"id" : "obj-2",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "toggle",
				"numinlets" : 1,
				"numoutlets" : 1,
				"patching_rect" : [ 219.0, 7.0, 22.0, 22.0 ],
				"outlettype" : [ "int" ],
				"parameter_enable" : 0,
				"id" : "obj-11",
				"style" : ""
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "newobj",
				"text" : "qmetro 10",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontname" : "Arial",
				"patching_rect" : [ 219.0, 52.0, 65.0, 22.0 ],
				"outlettype" : [ "bang" ],
				"id" : "obj-12",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "message",
				"text" : "print",
				"numinlets" : 2,
				"numoutlets" : 1,
				"fontname" : "Arial",
				"patching_rect" : [ 354.0, 91.0, 36.0, 22.0 ],
				"outlettype" : [ "" ],
				"id" : "obj-13",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "comment",
				"text" : "Read serial input buffer every 10 milliseconds",
				"linecount" : 2,
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontname" : "Arial",
				"patching_rect" : [ 86.0, 52.0, 136.0, 33.0 ],
				"id" : "obj-15",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "comment",
				"text" : "Click to start",
				"numinlets" : 1,
				"numoutlets" : 0,
				"fontname" : "Arial",
				"patching_rect" : [ 246.0, 10.0, 79.0, 20.0 ],
				"id" : "obj-17",
				"style" : "",
				"fontsize" : 12.0
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "textbutton",
				"hint" : "",
				"legacytextcolor" : 1,
				"ignoreclick" : 1,
				"numinlets" : 1,
				"usebgoncolor" : 1,
				"numoutlets" : 3,
				"bgoncolor" : [ 0.55, 0.55, 0.55, 1.0 ],
				"patching_rect" : [ 719.0, 117.0, 20.0, 20.0 ],
				"usetextovercolor" : 1,
				"outlettype" : [ "", "", "int" ],
				"rounded" : 60.0,
				"parameter_enable" : 0,
				"textovercolor" : [ 0.2, 0.2, 0.2, 1.0 ],
				"textcolor" : [ 0.34902, 0.34902, 0.34902, 1.0 ],
				"textoncolor" : [ 1.0, 1.0, 1.0, 1.0 ],
				"text" : "2",
				"id" : "obj-38",
				"style" : "",
				"fontface" : 1,
				"fontsize" : 13.0,
				"background" : 1,
				"bgcolor" : [ 1.0, 0.788235, 0.470588, 1.0 ]
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "textbutton",
				"hint" : "",
				"legacytextcolor" : 1,
				"ignoreclick" : 1,
				"numinlets" : 1,
				"usebgoncolor" : 1,
				"numoutlets" : 3,
				"bgoncolor" : [ 0.55, 0.55, 0.55, 1.0 ],
				"patching_rect" : [ 323.0, 10.0, 20.0, 20.0 ],
				"usetextovercolor" : 1,
				"outlettype" : [ "", "", "int" ],
				"rounded" : 60.0,
				"parameter_enable" : 0,
				"textovercolor" : [ 0.2, 0.2, 0.2, 1.0 ],
				"textcolor" : [ 0.34902, 0.34902, 0.34902, 1.0 ],
				"textoncolor" : [ 1.0, 1.0, 1.0, 1.0 ],
				"text" : "3",
				"id" : "obj-25",
				"style" : "",
				"fontface" : 1,
				"fontsize" : 13.0,
				"background" : 1,
				"bgcolor" : [ 1.0, 0.788235, 0.470588, 1.0 ]
			}

		}
, 		{
			"box" : 			{
				"maxclass" : "textbutton",
				"hint" : "",
				"legacytextcolor" : 1,
				"ignoreclick" : 1,
				"numinlets" : 1,
				"usebgoncolor" : 1,
				"numoutlets" : 3,
				"bgoncolor" : [ 0.55, 0.55, 0.55, 1.0 ],
				"patching_rect" : [ 591.0, 87.0, 20.0, 20.0 ],
				"usetextovercolor" : 1,
				"outlettype" : [ "", "", "int" ],
				"rounded" : 60.0,
				"parameter_enable" : 0,
				"textovercolor" : [ 0.2, 0.2, 0.2, 1.0 ],
				"textcolor" : [ 0.34902, 0.34902, 0.34902, 1.0 ],
				"textoncolor" : [ 1.0, 1.0, 1.0, 1.0 ],
				"text" : "1",
				"id" : "obj-93",
				"style" : "",
				"fontface" : 1,
				"fontsize" : 13.0,
				"background" : 1,
				"bgcolor" : [ 1.0, 0.788235, 0.470588, 1.0 ]
			}

		}
 ],
	"lines" : [ 		{
			"patchline" : 			{
				"source" : [ "obj-91", 0 ],
				"destination" : [ "obj-78", 0 ],
				"hidden" : 0,
				"midpoints" : [ 439.5, 849.0, 393.0, 849.0, 393.0, 774.0, 341.5, 774.0 ],
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-9", 0 ],
				"destination" : [ "obj-14", 0 ],
				"hidden" : 0,
				"color" : [ 0.057615, 0.8, 0.189809, 1.0 ],
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-89", 0 ],
				"destination" : [ "obj-91", 0 ],
				"hidden" : 0,
				"midpoints" : [ 487.5, 894.0, 459.0, 894.0, 459.0, 819.0, 439.5, 819.0 ],
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-87", 0 ],
				"destination" : [ "obj-51", 0 ],
				"hidden" : 0,
				"midpoints" : [ 232.0, 915.0, 219.0, 915.0, 219.0, 678.0, 166.5, 678.0 ],
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-85", 0 ],
				"destination" : [ "obj-87", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-8", 0 ],
				"destination" : [ "obj-7", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-78", 0 ],
				"destination" : [ "obj-76", 2 ],
				"hidden" : 0,
				"midpoints" : [ 341.5, 804.0, 591.0, 804.0, 591.0, 735.0, 581.5, 735.0 ],
				"disabled" : 0,
				"order" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-78", 0 ],
				"destination" : [ "obj-66", 0 ],
				"hidden" : 0,
				"disabled" : 0,
				"order" : 1
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-76", 0 ],
				"destination" : [ "obj-78", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-75", 0 ],
				"destination" : [ "obj-71", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-74", 0 ],
				"destination" : [ "obj-71", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-71", 0 ],
				"destination" : [ "obj-76", 1 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-7", 0 ],
				"destination" : [ "obj-35", 0 ],
				"hidden" : 0,
				"midpoints" : [ 249.5, 496.0, 193.5, 496.0 ],
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-66", 0 ],
				"destination" : [ "obj-56", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-62", 0 ],
				"destination" : [ "obj-43", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-61", 0 ],
				"destination" : [ "obj-60", 0 ],
				"hidden" : 0,
				"disabled" : 0,
				"order" : 1
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-61", 0 ],
				"destination" : [ "obj-60", 1 ],
				"hidden" : 0,
				"disabled" : 0,
				"order" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-6", 0 ],
				"destination" : [ "obj-9", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-58", 0 ],
				"destination" : [ "obj-56", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-57", 0 ],
				"destination" : [ "obj-53", 0 ],
				"hidden" : 0,
				"midpoints" : [ 311.5, 298.0, 384.5, 298.0 ],
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-56", 1 ],
				"destination" : [ "obj-89", 0 ],
				"hidden" : 0,
				"midpoints" : [ 374.5, 939.0, 465.0, 939.0, 465.0, 861.0, 487.5, 861.0 ],
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-56", 0 ],
				"destination" : [ "obj-52", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-55", 0 ],
				"destination" : [ "obj-54", 0 ],
				"hidden" : 0,
				"midpoints" : [ 384.5, 356.0, 443.0, 356.0, 443.0, 248.0, 384.5, 248.0 ],
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-54", 0 ],
				"destination" : [ "obj-48", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-53", 0 ],
				"destination" : [ "obj-6", 0 ],
				"hidden" : 0,
				"midpoints" : [ 384.5, 328.5, 338.5, 328.5 ],
				"disabled" : 0,
				"order" : 1
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-53", 0 ],
				"destination" : [ "obj-55", 0 ],
				"hidden" : 0,
				"disabled" : 0,
				"order" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-53", 0 ],
				"destination" : [ "obj-50", 0 ],
				"hidden" : 0,
				"midpoints" : [ 384.5, 323.0, 193.5, 323.0 ],
				"disabled" : 0,
				"order" : 2
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-52", 0 ],
				"destination" : [ "obj-49", 0 ],
				"hidden" : 0,
				"disabled" : 0,
				"order" : 1
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-52", 0 ],
				"destination" : [ "obj-49", 1 ],
				"hidden" : 0,
				"disabled" : 0,
				"order" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-51", 0 ],
				"destination" : [ "obj-45", 0 ],
				"hidden" : 0,
				"disabled" : 0,
				"order" : 1
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-51", 0 ],
				"destination" : [ "obj-41", 1 ],
				"hidden" : 0,
				"midpoints" : [ 166.5, 726.0, 327.0, 726.0, 327.0, 636.0, 315.5, 636.0 ],
				"disabled" : 0,
				"order" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-50", 0 ],
				"destination" : [ "obj-10", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-48", 0 ],
				"destination" : [ "obj-53", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-45", 0 ],
				"destination" : [ "obj-43", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-43", 1 ],
				"destination" : [ "obj-85", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-43", 0 ],
				"destination" : [ "obj-61", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-41", 0 ],
				"destination" : [ "obj-51", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-4", 0 ],
				"destination" : [ "obj-8", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-36", 0 ],
				"destination" : [ "obj-34", 0 ],
				"hidden" : 0,
				"disabled" : 0,
				"order" : 1
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-36", 0 ],
				"destination" : [ "obj-33", 0 ],
				"hidden" : 0,
				"disabled" : 0,
				"order" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-35", 1 ],
				"destination" : [ "obj-29", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-35", 0 ],
				"destination" : [ "obj-14", 0 ],
				"hidden" : 0,
				"color" : [ 0.057615, 0.8, 0.189809, 1.0 ],
				"midpoints" : [ 193.5, 538.0, 157.0, 538.0, 157.0, 197.0, 228.5, 197.0 ],
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-34", 0 ],
				"destination" : [ "obj-32", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-33", 0 ],
				"destination" : [ "obj-31", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-32", 0 ],
				"destination" : [ "obj-31", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-31", 1 ],
				"destination" : [ "obj-28", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-30", 0 ],
				"destination" : [ "obj-57", 0 ],
				"hidden" : 0,
				"color" : [ 0.0, 0.0, 0.0, 0.9 ],
				"midpoints" : [ 311.5, 173.0, 311.5, 173.0 ],
				"disabled" : 0,
				"order" : 1
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-30", 0 ],
				"destination" : [ "obj-21", 0 ],
				"hidden" : 0,
				"color" : [ 0.0, 0.0, 0.0, 0.9 ],
				"midpoints" : [ 311.5, 128.0, 321.5, 128.0 ],
				"disabled" : 0,
				"order" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-30", 1 ],
				"destination" : [ "obj-19", 0 ],
				"hidden" : 0,
				"color" : [ 0.0, 0.0, 0.0, 0.9 ],
				"midpoints" : [ 333.0, 104.0, 343.5, 104.0 ],
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-29", 4 ],
				"destination" : [ "obj-3", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-29", 0 ],
				"destination" : [ "obj-23", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-29", 2 ],
				"destination" : [ "obj-22", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-28", 0 ],
				"destination" : [ "obj-14", 0 ],
				"hidden" : 0,
				"color" : [ 0.057615, 0.8, 0.189809, 1.0 ],
				"midpoints" : [ 721.5, 194.0, 228.5, 194.0 ],
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-24", 0 ],
				"destination" : [ "obj-13", 0 ],
				"hidden" : 0,
				"color" : [ 0.0, 0.0, 0.0, 0.9 ],
				"midpoints" : [ 447.5, 81.0, 365.0, 81.0, 365.0, 86.0, 363.5, 86.0 ],
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-23", 0 ],
				"destination" : [ "obj-41", 0 ],
				"hidden" : 0,
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-22", 0 ],
				"destination" : [ "obj-76", 0 ],
				"hidden" : 0,
				"disabled" : 0,
				"order" : 1
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-22", 0 ],
				"destination" : [ "obj-75", 0 ],
				"hidden" : 0,
				"disabled" : 0,
				"order" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-22", 0 ],
				"destination" : [ "obj-74", 0 ],
				"hidden" : 0,
				"disabled" : 0,
				"order" : 2
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-21", 0 ],
				"destination" : [ "obj-14", 0 ],
				"hidden" : 0,
				"color" : [ 0.057615, 0.8, 0.189809, 1.0 ],
				"midpoints" : [ 321.5, 161.0, 228.5, 161.0 ],
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-19", 0 ],
				"destination" : [ "obj-14", 0 ],
				"hidden" : 0,
				"color" : [ 0.057615, 0.8, 0.189809, 1.0 ],
				"midpoints" : [ 343.5, 140.5, 228.5, 140.5 ],
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-16", 0 ],
				"destination" : [ "obj-21", 0 ],
				"hidden" : 0,
				"color" : [ 0.0, 0.0, 0.0, 0.9 ],
				"midpoints" : [ 378.5, 78.0, 341.0, 78.0, 341.0, 78.0, 321.5, 78.0 ],
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-14", 0 ],
				"destination" : [ "obj-54", 1 ],
				"hidden" : 0,
				"color" : [ 0.586327, 0.12593, 0.8, 0.9 ],
				"midpoints" : [ 228.5, 239.0, 419.5, 239.0 ],
				"disabled" : 0,
				"order" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-14", 0 ],
				"destination" : [ "obj-50", 1 ],
				"hidden" : 0,
				"color" : [ 0.586327, 0.12593, 0.8, 0.9 ],
				"disabled" : 0,
				"order" : 1
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-14", 1 ],
				"destination" : [ "obj-36", 0 ],
				"hidden" : 0,
				"color" : [ 0.106881, 0.233439, 0.8, 0.9 ],
				"midpoints" : [ 364.5, 233.0, 434.0, 233.0, 434.0, 173.0, 608.0, 173.0, 608.0, 107.0, 617.0, 107.0, 617.0, 23.0, 630.5, 23.0 ],
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-13", 0 ],
				"destination" : [ "obj-14", 0 ],
				"hidden" : 0,
				"color" : [ 0.057615, 0.8, 0.189809, 1.0 ],
				"midpoints" : [ 363.5, 112.5, 228.5, 112.5 ],
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-12", 0 ],
				"destination" : [ "obj-14", 0 ],
				"hidden" : 0,
				"color" : [ 0.057615, 0.8, 0.189809, 1.0 ],
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-11", 0 ],
				"destination" : [ "obj-30", 0 ],
				"hidden" : 0,
				"midpoints" : [ 228.5, 43.0, 311.5, 43.0 ],
				"disabled" : 0,
				"order" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-11", 0 ],
				"destination" : [ "obj-12", 0 ],
				"hidden" : 0,
				"disabled" : 0,
				"order" : 1
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-10", 0 ],
				"destination" : [ "obj-4", 0 ],
				"hidden" : 0,
				"midpoints" : [ 193.5, 411.5, 249.5, 411.5 ],
				"disabled" : 0
			}

		}
, 		{
			"patchline" : 			{
				"source" : [ "obj-10", 2 ],
				"destination" : [ "obj-4", 0 ],
				"hidden" : 0,
				"midpoints" : [ 249.5, 424.0, 249.5, 424.0 ],
				"disabled" : 0
			}

		}
 ],
	"appversion" : 	{
		"major" : 7,
		"minor" : 3,
		"revision" : 3,
		"architecture" : "x86",
		"modernui" : 1
	}
,
	"styles" : [ 		{
			"name" : "AudioStatus_Menu",
			"default" : 			{
				"bgfillcolor" : 				{
					"type" : "color",
					"color" : [ 0.294118, 0.313726, 0.337255, 1 ],
					"color1" : [ 0.454902, 0.462745, 0.482353, 0.0 ],
					"color2" : [ 0.290196, 0.309804, 0.301961, 1.0 ],
					"angle" : 270.0,
					"proportion" : 0.39,
					"autogradient" : 0
				}

			}
,
			"parentstyle" : "",
			"multi" : 0
		}
 ]
}
the end of Max code*/

Week12: Scare Your Computer by Tian (Antonius)

Team: Tian and Sam

For project 2 we were assigned to scare our computer with Arduino and Max MSP. Sam and I made a small installation with one sharp distant sensor and one touch sensor. Our idea is that if we try to scare the computer from the front (where it can see), it will say “I see you, don’t try to scare me.”, but if we tap on it from the behind, it screams.

IMG_0661 IMG_0662

We got the circuit above referring to SerialCommunicationCallResponseASCII in Arduino and then started to build the Max patcher. We wanted to let Max play one of the two audios we prepared according to the result of the serial communication. The most important steps were to write the if conditions in the correct way. Finally, we let each value control a boolean which then controlled a toggle, by detecting the value of the sensor and the value of the boolean (and the previous value of the touch sensor). The toggle controlled an audio file and when the audio file ended, it would turn off the toggle through feedback and the audio would wait for the next turn of playing.

screen1

screen2

(val1 for sharp distance sensor & val2 for touch sensor)

The biggest difficulty we had was that the touch sensor didn’t work with the sharp distance sensor but it worked alone. We found out with the help of Jiwon that a delay between printing the two datas would help solve the problem. However the touch sensor was still trick – in the studio, it worked on the tables away from room 824 and doesn’t work on the tables near room 824.

IMG_0666 IMG_0665

We also arranged our circuit in a box and installed it on my laptop. The videos of testing and performing are below:

It was good to continue exploring Max and I feel like getting used to its structure. Looking forward to the final project!

 

Week 11: In Class: Max MSP Exercise

Student Name: Sam Jianghao Hu.

In this week’s class we had some hand-on experience with Max MSP. The first exercise was to make a creepy piano. I wanted to make the keyboard play pre-set notes instead of randomly generating notes. I essentially thought it could work if I implement pack (as what the flowing picture shows), but it didn’t.

Screen Shot 2017-04-20 at 8.11.34 PM

It turned out that I had to implement gate. After tons of attempts and failures, I eventually made it work. Here’s the working patcher and a demo video.

Screen Shot 2017-04-27 at 12.59.26 PM

Video: IMG_0024

The second task was to load a local video file into Max and play. I didn’t get to explore that much on this part. What I did was simply loaded a video and played it with the most basic mechanism.

Screen Shot 2017-04-20 at 8.26.17 PM

The third task was to build up communications between Arduino and Max MSP. There was already a sample code to transmit data, so I basically just followed the sample and saw if it worked. It was helpful in terms of building our second project which is to scare our laptops.

Screen Shot 2017-04-20 at 8.54.21 PM

 

Scaring the computer (Gabriela Naumnik and Sophia Noel)

In this video we demonstrate how values incoming from the Ultrasonic Ranger change (this was the first step in our process to test that everything was going as planned):

This is was our initial setup and code:

18175661_1451341188243341_80175296_o

Later on, we changed the type of the distance sensor because the 1st one was not accurate enough:

18176227_10154534657927844_2023728032_o

This video shows the end result – a video of a happy singing girl plays, but when someone gets closer to the monitor, the girl gets scared and screams:

Exercises in Class (Gabriela Naumnik and Sophia Noel)

First, we used Max to display a video:

18049572_1442593145784812_782129845_o

Here’s a video documenting our result:

Second, we used Max to play the piano:

18049494_1442593135784813_335780776_o

Here’s a video documenting our result:

Third, we connected a Galvanic sensor to Max and displayed two videos depending on the incoming values:

18052188_1442593152451478_1284126573_o

Here’s a video documenting our result:

Staging Fright| Asiya Gubaydullina| Junji Ito exhibit

To be honest, the exhibit gave me a lot of mixed feelings. However, it’s one of those things I love: sorting out my emotions about certain works of art. I wouldn’t say that Junji Ito creates meaningful work like other classic artists since he’s a horror manga artist. Still, I left with my head full of confusion.

The same feeling I had when I watched the very first episode of American Horror Story. I was sort of disgusted, sort of fascinated, sort of uneasy but still very curious. What would happen? How long can I make myself watch this? How is it going to make me feel? That’s something that crossed my mind at the Junji Ito exhibition.

The exhibition is one of a kind for me because I haven’t had that conjunction with augmented reality experience before. I wasn’t scared, I was rather amazed by the technological aspect behind. I think partly the reason why is because I’m an Interactive Media Arts student and that’s just the way my brain works. I feel like that spoiled my entire experience. I’d much rather go through with the exhibition by myself. All alone. That’s when I will have chills.

Continue reading