<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Archana&#039;s Circuit Bored</title>
	<atom:link href="http://itp.nyu.edu/~apk284/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://itp.nyu.edu/~apk284/blog</link>
	<description>The only blog that is circuitous and gratuitous. How fortuitous!</description>
	<lastBuildDate>Wed, 03 Apr 2013 11:23:02 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>test post</title>
		<link>http://itp.nyu.edu/~apk284/blog/uncategorized/2013/03/12/test-post/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=test-post</link>
		<comments>http://itp.nyu.edu/~apk284/blog/uncategorized/2013/03/12/test-post/#comments</comments>
		<pubDate>Tue, 12 Mar 2013 21:36:45 +0000</pubDate>
		<dc:creator>Archana</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~apk284/blog/?p=611</guid>
		<description><![CDATA[something else]]></description>
				<content:encoded><![CDATA[<p>something else</p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~apk284/blog/uncategorized/2013/03/12/test-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fandom Chart</title>
		<link>http://itp.nyu.edu/~apk284/blog/fandom/2013/02/07/fandom-chart/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fandom-chart</link>
		<comments>http://itp.nyu.edu/~apk284/blog/fandom/2013/02/07/fandom-chart/#comments</comments>
		<pubDate>Thu, 07 Feb 2013 18:35:26 +0000</pubDate>
		<dc:creator>Archana</dc:creator>
				<category><![CDATA[Fandom]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~apk284/blog/?p=607</guid>
		<description><![CDATA[]]></description>
				<content:encoded><![CDATA[<p><a href="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2013/02/fandom-chart.png"><img src="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2013/02/fandom-chart-1024x583.png" alt="fandom-chart" width="584" height="332" class="aligncenter size-large wp-image-608" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~apk284/blog/fandom/2013/02/07/fandom-chart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starry Starry Wifi Night</title>
		<link>http://itp.nyu.edu/~apk284/blog/cooking-with-sound/2012/12/19/starry-starry-wifi-night/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=starry-starry-wifi-night</link>
		<comments>http://itp.nyu.edu/~apk284/blog/cooking-with-sound/2012/12/19/starry-starry-wifi-night/#comments</comments>
		<pubDate>Wed, 19 Dec 2012 04:50:39 +0000</pubDate>
		<dc:creator>Archana</dc:creator>
				<category><![CDATA[cooking with sound]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~apk284/blog/?p=597</guid>
		<description><![CDATA[For my final I decided to do a sonification and visualization of wifi packets over the network. I used Processing with the minim library and the Audioplayer library for sound, and Carnivore to detect wifi packets. I have the sound &#8230; <a href="http://itp.nyu.edu/~apk284/blog/cooking-with-sound/2012/12/19/starry-starry-wifi-night/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>For my final I decided to do a sonification and visualization of wifi packets over the network.</p>
<p>I used Processing with the minim library and the Audioplayer library for sound, and Carnivore to detect wifi packets.</p>
<p>I have the sound of crickets playing constantly to set the &#8216;mood&#8217; and an image of a night sky. I&#8217;m mapping the IP addresses of packets received and sent as points that look like stars on the night sky and drawing a Bezier curve between the receiver and sender to both evoke a sense of constellations in the night sky as well as inform the user of the path of incoming and outgoing packets. Using a particle system that generates a circle of fixed size and random yellow/white color for every 10 packets that come in, I&#8217;ve tried to recreate (albeit in a very rudimentary fashion) a star burst.</p>
<p>I kept the midi to just piano notes to keep the sketch from sounding too discordant and to give it a sense of sonic mood suited to the night. The tones are generated from reading the encrypted packets and the loudness by the size of the packet. <a href="https://github.com/archanks/Starry-Starry-Wifi-Night">See full code here</a></p>
<p>&nbsp;<br />
<iframe src="http://player.vimeo.com/video/55915012?title=0&amp;byline=0&amp;portrait=0&amp;badge=0&amp;color=ffffff" width="960" height="721" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<p>The encrypted packets itself yielded some very interesting visuals which I chose not to use cause I thought it wouldn&#8217;t fit with the theming of the entire sketch, but perhaps I could find a more subtle way to include it in.</p>
<p><img class="aligncenter size-large wp-image-603" title="Screen Shot 2012-12-19 at 12.03.17 AM" src="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/12/Screen-Shot-2012-12-19-at-12.03.17-AM-1024x324.png" alt="" width="584" height="184" /></p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~apk284/blog/cooking-with-sound/2012/12/19/starry-starry-wifi-night/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starry Starry Night</title>
		<link>http://itp.nyu.edu/~apk284/blog/art-of-graphic-programming/2012/12/13/starry-starry-night/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=starry-starry-night</link>
		<comments>http://itp.nyu.edu/~apk284/blog/art-of-graphic-programming/2012/12/13/starry-starry-night/#comments</comments>
		<pubDate>Thu, 13 Dec 2012 17:34:37 +0000</pubDate>
		<dc:creator>Archana</dc:creator>
				<category><![CDATA[Art of Graphic Programming]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~apk284/blog/?p=593</guid>
		<description><![CDATA[I really wanted to try and recreate Vincent Van Gogh&#8217;s Starry Starry Night in at least one of my projects before I graduated from ITP. I decided this would be the best time to use it. For my final for &#8230; <a href="http://itp.nyu.edu/~apk284/blog/art-of-graphic-programming/2012/12/13/starry-starry-night/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I really wanted to try and recreate Vincent Van Gogh&#8217;s Starry Starry Night in at least one of my projects before I graduated from ITP. I decided this would be the best time to use it.</p>
<p>For my final for Art of Graphics Programming and Cooking with Sound I sonified and visualized wifi packets over the network. My first iteration of it for cooking with sound was rather simple and just used a background image and particle system. See: <a href="http://itp.nyu.edu/~apk284/blog/cooking-with-sound/2012/12/19/starry-starry-wifi-night/ ‎">Starry Starry Wifi Night</a></p>
<p>Since the focus was primarily on sound in that class, I didn&#8217;t push the visuals enough for fear of exhausting the memory.</p>
<p>For Art of Graphics Programming however, I decided to remove the sound altogether and push the graphics further. I used a painter effect and a simplex Noise filter on this image</p>
<p><a href="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/12/background.png"><img class="aligncenter size-full wp-image-594" title="background" src="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/12/background.png" alt="" width="640" height="480" /></a></p>
<p>and generated particles using webGL to create this effect:</p>
<p><iframe src="http://player.vimeo.com/video/55519642?title=0&amp;byline=0&amp;portrait=0&amp;badge=0&amp;color=ffffff" frameborder="0" width="650" height="488"></iframe></p>
<p>&nbsp;</p>
<h3>main.pde</h3>
<p>&nbsp;</p>
<pre class="brush: java; title: ; notranslate">

import java.util.Iterator;
import org.rsg.carnivore.*;
import org.rsg.carnivore.net.*;

import processing.opengl.*;
import codeanticode.glgraphics.*;
import java.nio.FloatBuffer;


int SYSTEM_SIZE = 100000;
int CANVAS_WIDTH = 640;
int CANVAS_HEIGHT = 480;

GLModel sys;
GLTexture tex;

int npartTotal = 1000;
int npartPerFrame = 10;
float speed = 1.0;
float gravity = 0;

int partLifetime;

PVector velocities[];
int lifetimes[];


boolean clearImg = false;
boolean changeImg = true;
float changeTime = 2.0;
float destTexTransparency = 1.0;

GLTexture srcTex, destTex, brushTex;

PainterEffect painter;

int sec0;

HashMap nodes = new HashMap();
HashMap links = new HashMap();
float currentDiameter = 10.0;
float currentHalo = 3.0;
int min_diameter = 3;
float startBrightness = 255.0;
float shrinkSpeed = 0.97;
float dimSpeed_link = 0.9;
float dimSpeed_ripple = 0;
String packets[];

int xPos, yPos;



void setup(){
  size(640,480, GLConstants.GLGRAPHICS);
  colorMode(RGB, 1.0);
    
    srcTex = new GLTexture(this, &quot;background.png&quot;);
    brushTex = new GLTexture(this, &quot;brush2.png&quot;);    
    
    destTex = new GLTexture(this, width, height);
    destTex.loadPixels();
    for (int i = 0; i &lt; destTex.width * destTex.height; i++) destTex.pixels[i] = 0xff000000;
    destTex.loadTexture();    

    painter = new PainterEffect(this, SYSTEM_SIZE, CANVAS_WIDTH, CANVAS_HEIGHT);
  partLifetime = npartTotal / npartPerFrame;
    
  sys = new GLModel(this, npartTotal, GLModel.POINT_SPRITES, GLModel.DYNAMIC);
  initColors();
  initPositions();
  initSprites();

  initVelocities();
  initLifetimes();  
  
  frameRate(10);
  ellipseMode(CENTER);
  CarnivoreP5 c = new CarnivoreP5(this);
  smooth();
}

void draw() {
  
  GLGraphics renderer = (GLGraphics)g;
  renderer.beginGL();  
  
  background(0);
  
  painter.apply(srcTex, brushTex, destTex, clearImg, changeImg, changeTime);
    if (changeImg) changeImg = false;

    tint(1.0, 1.0 - destTexTransparency);     
    image(srcTex, 0, 0, width*2, height*2); 
    tint(1.0, destTexTransparency);
    image(destTex, 0, 0, width*2, height*2);

    int sec = second();
    sec0 = sec;
  
   updatePositions();
  updateColors();
  updateLifetimes();
  
   renderer.setDepthMask(false);
  sys.render();
  renderer.setDepthMask(true);
    
  renderer.endGL();
  
  //println(&quot;nodes:&quot;+nodes.size() + &quot; links:&quot;+links.size());
}

void initSprites() {
       tex = new GLTexture(this, &quot;particlebrush.png&quot;);    
   float pmax = sys.getMaxPointSize();
   println(&quot;Maximum sprite size supported by the video card: &quot; + pmax + &quot; pixels.&quot;);   
   sys.initTextures(1);
   sys.setTexture(0, tex);  
   // Setting the maximum sprite to the 90% of the maximum point size.
   sys.setMaxSpriteSize(0.9 * pmax);
   // Setting the distance attenuation function so that the sprite size
   // is 20 when the distance to the camera is 400.
   sys.setSpriteSize(20, 400);
   sys.setBlendMode(BLEND);  
}

void initColors() {
  sys.initColors();
  sys.setColors(0, 0);
}

void initPositions() {
  sys.beginUpdateVertices();
  FloatBuffer vbuf = sys.vertices;
  float pos[] = { 0, 0, 0, 0 };
  for (int n = 0; n &lt; sys.getSize(); n++) {
    vbuf.position(4 * n);
    vbuf.get(pos, 0, 3);  
    
    pos[0] = 0;
    pos[1] = 0;
    pos[2] = 0;
    pos[3] = 1; // The W coordinate must be 1.
    
    vbuf.position(4 * n);
    vbuf.put(pos, 0, 4);
  }  
  sys.endUpdateVertices();  
}

void initVelocities() {
  velocities = new PVector[npartTotal];
  for (int n = 0; n &lt; velocities.length; n++) {
    velocities[n] = new PVector();
  }  
}

void initLifetimes() {
  // Initialzing particles with negative lifetimes so they are added
  // progresively into the scene during the first frames of the program  
  lifetimes = new int[npartTotal];
  int t = -1;
  for (int n = 0; n &lt; lifetimes.length; n++) {    
    if (n % npartPerFrame == 0) {
      t++;
    }
    lifetimes[n] = -t; 
  }  
}

void updatePositions() {
  sys.beginUpdateVertices();
  FloatBuffer vbuf = sys.vertices;
  float pos[] = { 0, 0, 0 };
  for (int n = 0; n &lt; sys.getSize(); n++) {
    vbuf.position(4 * n);
    vbuf.get(pos, 0, 3);  
  
    if (lifetimes[n] == 0) {
      // Respawn dead particle:
      pos[0] = xPos*1.5; 
      pos[1] = yPos;
      pos[2] = 0;
      float a = random(0, TWO_PI);
      float s = random(0.5 * speed, speed);
      velocities[n].x = s * cos(a);
      velocities[n].y = s * sin(a);
      velocities[n].z = 0;  
    } else {
      // Update moving particle.
      pos[0] += velocities[n].x; 
      pos[1] += velocities[n].y;
      pos[2] += velocities[n].z;
      // Updating velocity.
      velocities[n].y += gravity;      
    }
  
    vbuf.position(4 * n);
    vbuf.put(pos, 0, 3);
  }
  vbuf.rewind();
  sys.endUpdateVertices();  
}

void updateColors() {
  sys.beginUpdateColors();
  FloatBuffer cbuf = sys.colors;
  float col[] = { 0, 0, 0, 0 };
  for (int n = 0; n &lt; sys.getSize(); n++) {
    if (0 &lt;= lifetimes[n]) {
      // Interpolating between alpha 1 to 0:
      float a = 1.0 - float(lifetimes[n]) / partLifetime;
    
      col[0] = 1.0;
      col[1] = 1.0;
      col[2] = 1.0;
      col[3] = a;
      
      cbuf.position(4 * n);
      cbuf.put(col, 0, 4);
    }
  }
  cbuf.rewind();
  sys.endUpdateColors();
}

void updateLifetimes() {
  for (int n = 0; n &lt; sys.getSize(); n++) {
    lifetimes[n]++;
    if (lifetimes[n] == partLifetime) {
      lifetimes[n] = 0;
    }    
  }
}  

synchronized void packetEvent(CarnivorePacket packet){
    //println           (&quot;[PDE] packetEvent: &quot; + packet);
    
    xPos=getXfromIP(packet.senderAddress.toString());
    yPos=getYfromIP(packet.senderAddress.toString());
    
    
    nodes.put(packet.senderAddress.toString(), new Node(packet.senderAddress.toString(), packet.senderPort));
    nodes.put(packet.receiverAddress.toString(), new Node(packet.receiverAddress.toString(), packet.receiverPort));
    String from_and_to = packet.senderSocket() + &quot; &gt; &quot; + packet.receiverSocket();
    links.put(from_and_to, new Link(from_and_to));
    
}

synchronized void drawNodes() {
  
  Iterator it = nodes.keySet().iterator();
  while(it.hasNext()){
    String ip = (String)it.next();
    Node n = (Node) nodes.get(ip);
    n.display();
    n.shrink();
  }  
}

synchronized void drawRipples() {
  Iterator it = nodes.keySet().iterator();
  while(it.hasNext()){
    String ip = (String)it.next();
    Node n = (Node) nodes.get(ip);
    n.displayRipple();
  }  
}

synchronized void drawLinks() {
  Iterator it = links.keySet().iterator();
  while(it.hasNext()){
    String from_and_to = (String)it.next();
    Link l = (Link) links.get(from_and_to);

    if(l.greyscale &gt; 25) {
      l.display();
      l.dim();
    }
  }    
}

////////////////////////////////////////////////////////////////////////////

int getXfromIP(String ip) {
  int splitter = ip.lastIndexOf(&quot;.&quot;);
  int y = int(ip.substring(splitter+1)) * height / 255; // Scale to applet size
  String tmp = ip.substring(0,splitter);
  splitter = tmp.lastIndexOf(&quot;.&quot;);
  int x = int(tmp.substring(splitter+1)) * width / 255; // Scale to applet size
  if(x&lt;50){x=50;}
   if(x&gt;height-50){x=height-50;}
  return x;
}

int getYfromIP(String ip) {
  int splitter = ip.lastIndexOf(&quot;.&quot;);
  int y = int(ip.substring(splitter+1)) * height / 255; // Scale to applet size
  if(y&lt;50){y=50;}
  if(y&gt;height-50){y=height-50;}
  return y;
}


String fromIPfromFromTo(String from_and_to) {
  String from         = from_and_to.substring(0, from_and_to.indexOf(&quot; &gt; &quot;));
  String to           = from_and_to.substring(from_and_to.indexOf(&quot; &gt; &quot;)+3);
  String from_ip      = from.substring(0, from.indexOf(&quot;:&quot;));
  return from_ip;
}

int fromPortfromFromTo(String from_and_to) {
  String from         = from_and_to.substring(0, from_and_to.indexOf(&quot; &gt; &quot;));
  String to           = from_and_to.substring(from_and_to.indexOf(&quot; &gt; &quot;)+3);
  String from_ip      = from.substring(0, from.indexOf(&quot;:&quot;));
  String from_port    = from.substring(from.indexOf(&quot;:&quot;)+1);
  return int(from_port);
}

String toIPfromFromTo(String from_and_to) {
  String from         = from_and_to.substring(0, from_and_to.indexOf(&quot; &gt; &quot;));
  String to           = from_and_to.substring(from_and_to.indexOf(&quot; &gt; &quot;)+3);
  String from_ip      = from.substring(0, from.indexOf(&quot;:&quot;));
  String from_port    = from.substring(from.indexOf(&quot;:&quot;)+1);
  String to_ip        = to.substring(0, to.indexOf(&quot;:&quot;));
  return to_ip;
}

int toPortfromFromTo(String from_and_to) {
  String from         = from_and_to.substring(0, from_and_to.indexOf(&quot; &gt; &quot;));
  String to           = from_and_to.substring(from_and_to.indexOf(&quot; &gt; &quot;)+3);
  String from_ip      = from.substring(0, from.indexOf(&quot;:&quot;));
  String from_port    = from.substring(from.indexOf(&quot;:&quot;)+1);
  String to_ip        = to.substring(0, to.indexOf(&quot;:&quot;));
  String to_port      = to.substring(to.indexOf(&quot;:&quot;)+1);  
  return int(to_port);
}

boolean eitherPortMatches(String from_and_to, int p) {
  int from_port = fromPortfromFromTo(from_and_to);
  int to_port   = toPortfromFromTo(from_and_to);
  if((from_port == p) || (to_port == p)) {
    return true;
  }
  return false;
}


</pre>
<h3>Link.pde</h3>
<pre class="brush: java; title: ; notranslate">
class Link {
  String from_ip;
  String to_ip;
  float greyscale;
  int from_x, from_y, bez1_x, bez1_y, bez2_x, bez2_y, to_x, to_y;

  Link(String from_and_to) {
    this.from_ip = fromIPfromFromTo(from_and_to);
    this.to_ip = toIPfromFromTo(from_and_to);
    this.from_x = getXfromIP(from_ip);
    this.from_y = getYfromIP(from_ip);
    this.to_x = getXfromIP(to_ip);
    this.to_y = getYfromIP(to_ip);
    this.bez1_x = int((from_x + to_x)/2);
    this.bez1_y = from_y;   
    this.bez2_x = to_x;
    this.bez2_y = int((from_y + to_y)/2);   
    this.greyscale = startBrightness;
  }

  void dim() {
    greyscale = greyscale * dimSpeed_link;
  }

  void display() {
    stroke(int(255 - greyscale));
    noFill();
    bezier(from_x, from_y, bez1_x, bez1_y, bez2_x, bez2_y, to_x, to_y);
    
  }
}

</pre>
<h3>Node.pde</h3>
<pre class="brush: java; title: ; notranslate">
class Node  {
  String ip;
  int port;
  float x, y, diameter; 
  color c;
  float ripple_color;
  int ripple_diameter;
  float halo;
  
  Node(String ip, int port) {
    this.port = port;
    this.ip = ip;
    this.x = getXfromIP(ip);
    this.y = getYfromIP(ip);
    this.diameter = currentDiameter;
    this.c = color(255,255,255);
    this.halo = currentHalo;
    this.ripple_color = 100;
    this.ripple_diameter = int(currentDiameter + currentHalo);
  }

  void shrink() {
    if(diameter &gt; min_diameter) { 
      diameter = diameter * shrinkSpeed; 
      halo = halo * shrinkSpeed;
    }
    ripple_color = ripple_color * dimSpeed_ripple;
    ripple_diameter += 30;
  }

  void displayRipple() {
    if((ripple_diameter &lt; (height*2)) &amp;&amp; (ripple_color &gt; 2)) { 
      noStroke();
      noFill();
      ellipse(x, y, ripple_diameter, ripple_diameter);  
    }
  }

  void display() {
    
    noStroke();
    fill(c); 
    ellipse(x, y, diameter, diameter);
    noStroke();
    fill(color(100, 100, 100, 50)); 
    ellipse(x, y, diameter + halo, diameter + halo);
    

  }
}
</pre>
<h3>PainterEffect.pde</h3>
<pre class="brush: java; title: ; notranslate">
// Class that encapsulates the painterly effect.
class PainterEffect
{
    PainterEffect(PApplet parent, int n, int w, int h)
    {
        this.parent = parent;
        numParticles = n;
        canvasWidth = w;
        canvasHeight = h;
          
        initParameters();
        createTextures();
        initTextures();    
        createFilters();          
    }
    
    void apply(GLTexture srcTex, GLTexture brushTex, GLTexture destTex, boolean clear, boolean change, float changeTime)
    {
        if (clear) destTex.clear(0, 0, 0, 255);
        updateBrushes(srcTex, change, changeTime);
        drawBrushes(brushTex, destTex);      
    }
    
    void updateBrushes(GLTexture srcTex, boolean change, float changeTime)
    {
        moveFilterSrcTex[0] = posTex.getReadTex();
        moveFilterSrcTex[1] = gradTex.getReadTex();
        moveFilterSrcTex[2] = texfpVel;
        moveFilterSrcTex[3] = texfpNoise;
    
        moveFilter.setParameterValue(0, new float[]{canvasWidth, canvasHeight});
        if (followGrad) moveFilter.setParameterValue(1, 1);
        else moveFilter.setParameterValue(1, 0); 
        moveFilter.setParameterValue(2, velMean);
        moveFilter.setParameterValue(3, noiseMag);         
        moveFilter.apply(moveFilterSrcTex, posTex.getWriteTex());
        posTex.swap();
        
        currentTime = float(millis()) / float(1000);
        
        if ((updateNoiseTime != 0) &amp;&amp; (currentTime - lastNoiseUpdateTime &gt;= updateNoiseTime))
        {
            noiseFilter.apply(posTex.getReadTex(), texfpNoise, canvasWidth, canvasHeight, currentTime);
         
            lastNoiseUpdateTime = currentTime;
        }
        
        if (updateColor) 
        {
            colorFilterSrcTex[0] = imageTex.getOldTex();
            colorFilterSrcTex[1] = imageTex.getNewTex();
            colorFilterSrcTex[2] = colorTex.getReadTex();
            colorFilterSrcTex[3] = colorAuxTex.getReadTex();
            colorFilterSrcTex[4] = posTex.getReadTex();
            colorFilterSrcTex[5] = colorCountTex.getReadTex();

            colorFilterDestTex[0] = colorTex.getWriteTex();
            colorFilterDestTex[1] = colorAuxTex.getWriteTex();
            colorFilterDestTex[2] = colorCountTex.getWriteTex();
        
            colorFilter.setParameterValue(0, brushMaxLength);
            colorFilter.setParameterValue(1, changeCoeff);
            colorFilter.setParameterValue(2, brushChangeFrac);            
            colorFilter.setParameterValue(3, brushChangePow);
            colorFilter.apply(colorFilterSrcTex, colorFilterDestTex);
            colorTex.swap();
            colorAuxTex.swap();
            colorCountTex.swap();        
        }   
         
        if (change)
        {
            println(&quot;Start changing image...&quot;);

            // Preprocessing filter is applied to the source image to generate the new image.
            imgFilter.apply(srcTex, imageTex.getNewTex());

            // The gradient of the new image is calculated and stored in first texture of newGradTex.
            newGradTex.setWriteTex(0);
            gradFilterSrcTex[0] = imageTex.getNewTex();
            gradFilterSrcTex[1] = texfpRand;
            gradFilter.apply(gradFilterSrcTex, newGradTex.getWriteTex());

            // Initializing variables to control transition between old and new image/gradient.
            changeCoeff = 0.0;       // Linear interpolation coefficient.
            swapedImageTex = false;

            // Used to control the averaging of the gradient of the new image during the transition
            // period.
            newGradTex.init();
        
            lastChangeTime = currentTime;
        }

        if ((0.0 &lt;= changeCoeff) &amp;&amp; (changeCoeff &lt; 1.0))
        {
            // Updating linear interpolation coefficient.
            changeCoeff = (currentTime - lastChangeTime) / changeTime;
            if (1.0 &lt; changeCoeff) changeCoeff = 1.0;
        }
        else if (!swapedImageTex)
        {
            // Transition period is finished.
            println(&quot;...done changing image.&quot;);
            imageTex.swap();
            swapedImageTex = true;
            changeCoeff = -1.0; // With this value, the shaders don't enter into the transition mode.
        }

        aveCount++;
        if (aveCount == aveInterval)
        {
            // Gradient average.
            aveCount = 0;
            for (int n = 0; n &lt; numAveIter; n++)
            {
                aveGradFilterSrcTex[0] = gradTex.getReadTex();
                aveGradFilterSrcTex[1] = texfpRand; 
                aveGradFilterSrcTex[2] = newGradTex.getReadTex();
            
                aveGradFilter.setParameterValue(0, changeCoeff);
            
                if (changeCoeff == -1) 
                {
                    aveGradFilter.apply(aveGradFilterSrcTex, gradTex.getWriteTex());
                }
                else 
                {
                    aveGradFilterDestTex[0] = gradTex.getWriteTex();
                    aveGradFilterDestTex[1] = newGradTex.getWriteTex();
                    aveGradFilter.apply(aveGradFilterSrcTex, aveGradFilterDestTex);
                }
            
                gradTex.swap();
                newGradTex.swap();
            }
        }
    }
    
    void drawBrushes(GLTexture brushTex, GLTexture destTex)
    {
        brushesFilterSrcTex[0] = gradTex.getReadTex();
        brushesFilterSrcTex[1] = brushTex;
        brushesFilterSrcTex[2] = colorTex.getReadTex();
        brushesFilterSrcTex[3] = posTex.getReadTex();
        
        if (blendBrushes) brushesFilter.setBlendMode(blendMode);
        else brushesFilter.noBlend();
        brushesFilter.setParameterValue(0, brushSize);
        brushesFilter.apply(brushesFilterSrcTex, destTex);    
    }

    void initParameters()
    {
        setDefParameters();
 
        aveCount = 0;
        lastChangeTime = -1;
        changeCoeff = -1.0;
        lastNoiseUpdateTime = -1;

        startClock = millis();    
    }
    
    void createTextures()
    {
        GLTextureParameters floatTexParams = new GLTextureParameters();
        floatTexParams.minFilter = GLTexture.NEAREST_SAMPLING;
        floatTexParams.magFilter = GLTexture.NEAREST_SAMPLING;        
        floatTexParams.format = GLTexture.FLOAT;
    
        imageTex = new GLTexturePingPong(new GLTexture(parent, canvasWidth, canvasHeight), 
                                         new GLTexture(parent, canvasWidth, canvasHeight));    
    
        posTex = new GLTexturePingPong(new GLTexture(parent, numParticles, floatTexParams), 
                                       new GLTexture(parent, numParticles, floatTexParams));        
    
        gradTex = new GLTexturePingPong(new GLTexture(parent, canvasWidth, canvasHeight, floatTexParams), 
                                        new GLTexture(parent, canvasWidth, canvasHeight, floatTexParams));         
    
        newGradTex = new GLTexturePingPong(new GLTexture(parent, canvasWidth, canvasHeight, floatTexParams), 
                                           new GLTexture(parent, canvasWidth, canvasHeight, floatTexParams));     
    
        colorTex = new GLTexturePingPong(new GLTexture(parent, numParticles, floatTexParams), 
                                         new GLTexture(parent, numParticles, floatTexParams));

        colorAuxTex = new GLTexturePingPong(new GLTexture(parent, numParticles, floatTexParams), 
                                            new GLTexture(parent, numParticles, floatTexParams));
    
        colorCountTex = new GLTexturePingPong(new GLTexture(parent, numParticles, floatTexParams), 
                                              new GLTexture(parent, numParticles, floatTexParams));

        int w = posTex.getReadTex().width;
        int h = posTex.getReadTex().height;

        texfpVel = new GLTexture(parent, w, h, floatTexParams);
        texfpRand = new GLTexture(parent, canvasWidth, canvasHeight, floatTexParams);
        texfpNoise = new GLTexture(parent, w, h, floatTexParams);
    
        moveFilterSrcTex = new GLTexture[4];
        colorFilterSrcTex = new GLTexture[6];
        colorFilterDestTex = new GLTexture[3];
        gradFilterSrcTex = new GLTexture[2];
        aveGradFilterSrcTex = new GLTexture[3];
        aveGradFilterDestTex = new GLTexture[2];
        brushesFilterSrcTex = new GLTexture[4];
    
        println(&quot;Size of particles box: &quot; + w + &quot;x&quot; + h);
        println(&quot;Number of particles: &quot; + w * h);    
    }

    void initTextures()
    {
        int pix[] = new int[canvasWidth * canvasHeight];
        for (int k = 0; k &lt; canvasWidth * canvasHeight; k++) pix[k] = 0xff000000;

        imageTex.getOldTex().putBuffer(pix);
        imageTex.getNewTex().putBuffer(pix);
    
        posTex.getReadTex().setRandom(0, canvasWidth, 0, canvasHeight, 0, 0, 0, 0);
        posTex.getWriteTex().setRandom(0, canvasWidth, 0, canvasHeight, 0, 0, 0, 0);  
    
        texfpVel.setRandom(velCoeffMin, velCoeffMax, 0, 0, 0, 0, 0, 0);
    
        texfpRand.setRandomDir2D(1.0, 1.0, 0.0, TWO_PI);
    
        texfpNoise.setRandomDir2D(0.0, 1.0, 0.0, TWO_PI);

        colorTex.getReadTex().setZero();
        colorTex.getWriteTex().setZero();
    
        colorAuxTex.getReadTex().setZero();
        colorAuxTex.getWriteTex().setZero();
    
        colorCountTex.getReadTex().setRandom(0, 0, brushMinLengthCoeff, brushMaxLengthCoeff, 0, 0, 0, 0);
        colorCountTex.getWriteTex().setRandom(0, 0, brushMinLengthCoeff, brushMaxLengthCoeff, 0, 0, 0, 0); 
    
        gradTex.getReadTex().setZero();
        gradTex.getWriteTex().setZero();
        newGradTex.getReadTex().setZero();
        newGradTex.getWriteTex().setZero();
    }

    void createFilters()
    {
        moveFilter = new GLTextureFilter(parent, &quot;MovePart.xml&quot;);      // Compatible with NVidia GeForce 8x00 and newer.
        //moveFilter = new GLTextureFilter(parent, &quot;MovePart-preGF8.xml&quot;); // Compatible with NVidia video cards previous to GeForce 8x00.
    
        colorFilter = new GLTextureFilter(parent, &quot;ColorPart.xml&quot;);      // Compatible with NVidia GeForce 8x00 and newer.
        //colorFilter = new GLTextureFilter(parent, &quot;ColorPart-preGF8.xml&quot;); // Compatible with NVidia video cards previous to GeForce 8x00.
    
        imgFilter = new GLTextureFilter(parent, &quot;Blur.xml&quot;);
    
        gradFilter = new GLTextureFilter(parent, &quot;RenderGrad2fp.xml&quot;);
    
        aveGradFilter = new GLTextureFilter(parent, &quot;RenderAveGrad.xml&quot;);

        noiseFilter = new SimplexNoiseFilter(parent, &quot;SimplexNoise.xml&quot;);

        brushesFilter = new GLTextureFilter(parent, &quot;RenderBrushes.xml&quot;);
    }
        
    void setDefParameters()
    {
        brushSize = 5.0;
        
        brushMaxLength = 10;
        brushMinLengthCoeff = 0.8;
        brushMaxLengthCoeff = 1.2;
        brushChangeFrac = 3.0;
        brushChangePow = 1.0;
        
        velMean = 1.0;
        velCoeffMin = 0.8;
        velCoeffMax = 1.2;
        updateNoiseTime = 0.1;
        numAveIter = 1;
        aveInterval = 2;
        followGrad = true;
        updateColor = true;
        noiseMag = 1.0;
        blendBrushes = true;
        blendMode = BLEND;  
    }    
    
    PApplet parent;
    int numParticles;
    int canvasWidth, canvasHeight;
    float brushSize;
    int brushMaxLength;
    float brushMinLengthCoeff;
    float brushMaxLengthCoeff;
    float brushChangeFrac;
    float brushChangePow;
    float velMean;
    float velCoeffMin;
    float velCoeffMax;
    float updateNoiseTime;
    int numAveIter;
    int aveInterval;
    boolean followGrad;
    boolean updateColor;
    float noiseMag;
    boolean blendBrushes;
    int blendMode;
    
    float currentTime, lastChangeTime, changeCoeff, lastNoiseUpdateTime;
    boolean swapedImageTex;
    int aveCount;
    int startClock;
    
    GLTexturePingPong imageTex, posTex, gradTex, newGradTex, colorTex, colorAuxTex, colorCountTex;
    GLTexture texfpVel, texfpRand, texfpNoise; 

    GLTexture[] moveFilterSrcTex;
    GLTexture[] colorFilterSrcTex;
    GLTexture[] colorFilterDestTex;
    GLTexture[] gradFilterSrcTex;
    GLTexture[] aveGradFilterSrcTex;
    GLTexture[] aveGradFilterDestTex;
    GLTexture[] brushesFilterSrcTex;

    GLTextureFilter moveFilter, colorFilter, imgFilter, gradFilter, aveGradFilter, brushesFilter;
    SimplexNoiseFilter noiseFilter;    
}

</pre>
<h3>SimplexNoiseFilter.pde</h3>
<pre class="brush: java; title: ; notranslate">
// This filter generates Perlin noise on the GPU.
class SimplexNoiseFilter extends GLTextureFilter
{
    public SimplexNoiseFilter(PApplet parent, String filename)
    {
        this.parent = parent;

        super.initFilter(filename);

        createPermTex();
        createSimplexTex();        
        createGradTex();
        
        srcTexArray = new GLTexture[4];
        srcTexArray[0] = permTex;
        srcTexArray[1] = simplexTex;
        srcTexArray[2] = gradTex;
    }
    
    public void apply(GLTexture srcTex, GLTexture destTex, int w, int h, float time)
    {
        srcTexArray[3] = srcTex;
        setParameterValue(0, time);
        setParameterValue(1, 1.0 / (w * h));
        super.apply(srcTexArray, destTex);
    }

    protected void createPermTex()
    {    
        permTex = new GLTexture(parent, 256, 256);
        
        int buffer[] = new int[256 * 256 * 4];
        for (int i = 0; i &lt; 256; i++)
            for (int j = 0; j &lt; 256; j++) 
            {
                int offset = (i * 256 + j) * 4;
                int value = perm[(j + perm[i]) &amp; 0xFF];
                buffer[offset] = grad3[value &amp; 0x0F][0] * 64 + 64;   // Gradient x
                buffer[offset+1] = grad3[value &amp; 0x0F][1] * 64 + 64; // Gradient y
                buffer[offset+2] = grad3[value &amp; 0x0F][2] * 64 + 64; // Gradient z
                buffer[offset+3] = value;                            // Permuted index
            }        
        permTex.putIntBuffer(buffer, ARGB);
    }
    
    protected void createSimplexTex()
    {
        GLTextureParameters simplexTexParams = new GLTextureParameters();
        simplexTexParams.target = GLTexture.TEX_ONEDIM;
        simplexTex = new GLTexture(parent, 64, 1, simplexTexParams);      
        
        int buffer[] = new int[64 * 4];
        for (int i = 0; i &lt; 64; i++)
        {
            int offset = i * 4;
            buffer[offset] = simplex4[i][0];
            buffer[offset+1] = simplex4[i][1];
            buffer[offset+2] = simplex4[i][2];
            buffer[offset+3] = simplex4[i][3];
        }
        simplexTex.putIntBuffer(buffer, ARGB);
    }    
      
    protected void createGradTex()
    {
        gradTex = new GLTexture(parent, 256, 256);
        
        int buffer[] = new int[256 * 256 * 4];
        for (int i = 0; i &lt; 256; i++)
            for (int j = 0; j &lt; 256; j++) 
            {
                int offset = (i * 256 + j) * 4;
                int value = perm[(j + perm[i]) &amp; 0xFF];
                buffer[offset] = grad4[value &amp; 0x1F][0] * 64 + 64;   // Gradient x
                buffer[offset+1] = grad4[value &amp; 0x1F][1] * 64 + 64; // Gradient y
                buffer[offset+2] = grad4[value &amp; 0x1F][2] * 64 + 64; // Gradient z
                buffer[offset+3] = grad4[value &amp; 0x1F][3] * 64 + 64; // Gradient z
            }
        gradTex.putIntBuffer(buffer, ARGB);
    }
    
    GLTexture[] srcTexArray;
    GLTexture permTex, simplexTex, gradTex;
    GLTextureParameters simplexTexParams;
    
    int perm[]= {151,160,137,91,90,15,
                 131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,
                 190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,
                 88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166,
                 77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,
                 102,143,54, 65,25,63,161, 1,216,80,73,209,76,132,187,208, 89,18,169,200,196,
                 135,130,116,188,159,86,164,100,109,198,173,186, 3,64,52,217,226,250,124,123,
                 5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,
                 223,183,170,213,119,248,152, 2,44,154,163, 70,221,153,101,155,167, 43,172,9,
                 129,22,39,253, 19,98,108,110,79,113,224,232,178,185, 112,104,218,246,97,228,
                 251,34,242,193,238,210,144,12,191,179,162,241, 81,51,145,235,249,14,239,107,
                 49,192,214, 31,181,199,106,157,184, 84,204,176,115,121,50,45,127, 4,150,254,
                 138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180};  

    /* These are Ken Perlin's proposed gradients for 3D noise. I kept them for
       better consistency with the reference implementation, but there is really
       no need to pad this to 16 gradients for this particular implementation.
       If only the &quot;proper&quot; first 12 gradients are used, they can be extracted
       from the grad4[][] array: grad3[i][j] == grad4[i*2][j], 0&lt;=i&lt;=11, j=0,1,2
    */
    int grad3[][] = {{0,1,1},{0,1,-1},{0,-1,1},{0,-1,-1},
                     {1,0,1},{1,0,-1},{-1,0,1},{-1,0,-1},
                     {1,1,0},{1,-1,0},{-1,1,0},{-1,-1,0}, // 12 cube edges
                     {1,0,-1},{-1,0,-1},{0,-1,1},{0,1,1}}; // 4 more to make 16

    /* These are my own proposed gradients for 4D noise. They are the coordinates
       of the midpoints of each of the 32 edges of a tesseract, just like the 3D
       noise gradients are the midpoints of the 12 edges of a cube.
    */
    int grad4[][]= {{0,1,1,1}, {0,1,1,-1}, {0,1,-1,1}, {0,1,-1,-1}, // 32 tesseract edges
                    {0,-1,1,1}, {0,-1,1,-1}, {0,-1,-1,1}, {0,-1,-1,-1},
                    {1,0,1,1}, {1,0,1,-1}, {1,0,-1,1}, {1,0,-1,-1},
                    {-1,0,1,1}, {-1,0,1,-1}, {-1,0,-1,1}, {-1,0,-1,-1},
                    {1,1,0,1}, {1,1,0,-1}, {1,-1,0,1}, {1,-1,0,-1},
                    {-1,1,0,1}, {-1,1,0,-1}, {-1,-1,0,1}, {-1,-1,0,-1},
                    {1,1,1,0}, {1,1,-1,0}, {1,-1,1,0}, {1,-1,-1,0},
                    {-1,1,1,0}, {-1,1,-1,0}, {-1,-1,1,0}, {-1,-1,-1,0}};

    /* This is a look-up table to speed up the decision on which simplex we
       are in inside a cube or hypercube &quot;cell&quot; for 3D and 4D simplex noise.
       It is used to avoid complicated nested conditionals in the GLSL code.
       The table is indexed in GLSL with the results of six pair-wise
       comparisons beween the components of the P=(x,y,z,w) coordinates
       within a hypercube cell.
       c1 = x&gt;=y ? 32 : 0;
       c2 = x&gt;=z ? 16 : 0;
       c3 = y&gt;=z ? 8 : 0;
       c4 = x&gt;=w ? 4 : 0;
       c5 = y&gt;=w ? 2 : 0;
       c6 = z&gt;=w ? 1 : 0;
       offsets = simplex[c1+c2+c3+c4+c5+c6];
       o1 = step(160,offsets);
       o2 = step(96,offsets);
       o3 = step(32,offsets);
      (For the 3D case, c4, c5, c6 and o3 are not needed.)
    */
    int simplex4[][] = {{0,64,128,192},{0,64,192,128},{0,0,0,0},
                        {0,128,192,64},{0,0,0,0},{0,0,0,0},{0,0,0,0},{64,128,192,0},
                        {0,128,64,192},{0,0,0,0},{0,192,64,128},{0,192,128,64},
                        {0,0,0,0},{0,0,0,0},{0,0,0,0},{64,192,128,0},
                        {0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},
                        {0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},
                        {64,128,0,192},{0,0,0,0},{64,192,0,128},{0,0,0,0},
                        {0,0,0,0},{0,0,0,0},{128,192,0,64},{128,192,64,0},
                        {64,0,128,192},{64,0,192,128},{0,0,0,0},{0,0,0,0},
                        {0,0,0,0},{128,0,192,64},{0,0,0,0},{128,64,192,0},
                        {0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},
                        {0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},
                        {128,0,64,192},{0,0,0,0},{0,0,0,0},{0,0,0,0},
                        {192,0,64,128},{192,0,128,64},{0,0,0,0},{192,64,128,0},
                        {128,64,0,192},{0,0,0,0},{0,0,0,0},{0,0,0,0},
                        {192,64,0,128},{0,0,0,0},{192,128,0,64},{192,128,64,0}};    
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~apk284/blog/art-of-graphic-programming/2012/12/13/starry-starry-night/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mixdown</title>
		<link>http://itp.nyu.edu/~apk284/blog/cooking-with-sound/2012/11/27/mixdown/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mixdown</link>
		<comments>http://itp.nyu.edu/~apk284/blog/cooking-with-sound/2012/11/27/mixdown/#comments</comments>
		<pubDate>Tue, 27 Nov 2012 15:22:38 +0000</pubDate>
		<dc:creator>Archana</dc:creator>
				<category><![CDATA[cooking with sound]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~apk284/blog/?p=587</guid>
		<description><![CDATA[listening back to the previous recordings, and realizing how random the things we recorded were, I decided to re record a few things using the logitech mic and my husband&#8217;s rode podecaster mic. Final set of sounds used 1. James &#8230; <a href="http://itp.nyu.edu/~apk284/blog/cooking-with-sound/2012/11/27/mixdown/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>listening back to the previous recordings, and realizing how random the things we recorded were, I decided to re record a few things using the logitech mic and my husband&#8217;s rode podecaster mic.</p>
<p>Final set of sounds used</p>
<p>1. James speaking as dog scratches himself and his collar jiggles<br />
2. James beatboxing<br />
3. Jacki talking<br />
4. paper crackling<br />
5. drink gatorade parody from tv<br />
6. rubber band being plucked</p>
<p>There&#8217;s a lot of amplification, reverb, compression echo, modulation and pitch changes on each of these to get the final result</p>
	<audio id="wp_mep_1" src="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/mixdown.mp3"     controls="controls" preload="none"  >
		
		
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/mixdown.mp3" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_1').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>

]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~apk284/blog/cooking-with-sound/2012/11/27/mixdown/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/mixdown.mp3" length="525552" type="audio/mpeg" />
		</item>
		<item>
		<title>Microphone Recordings</title>
		<link>http://itp.nyu.edu/~apk284/blog/cooking-with-sound/2012/11/13/microphone-recordings/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=microphone-recordings</link>
		<comments>http://itp.nyu.edu/~apk284/blog/cooking-with-sound/2012/11/13/microphone-recordings/#comments</comments>
		<pubDate>Tue, 13 Nov 2012 12:15:29 +0000</pubDate>
		<dc:creator>Archana</dc:creator>
				<category><![CDATA[cooking with sound]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~apk284/blog/?p=561</guid>
		<description><![CDATA[Matt London and I worked together to record sound samples using three different Microphones. Namely, the shotgun microphone connected to a field recorder,Logitech USB Microphone and the Yeti Microphone. Here are a few samples of our recordings Archana &#8211; extract from &#8230; <a href="http://itp.nyu.edu/~apk284/blog/cooking-with-sound/2012/11/13/microphone-recordings/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Matt London and I worked together to record sound samples using three different Microphones. Namely, the shotgun microphone connected to a field recorder,Logitech USB Microphone and the Yeti Microphone.</p>
<p><img src="http://www.buyfromchucks.com/images/products/small/RODENTG2.jpg"  height="200"><img title="Logitech USB Microphone" src="http://www.logitech.com/assets/16065/16065.png" alt="" height="200" /><img title="Yeti Microphone" src="http://redanglespanish.files.wordpress.com/2012/05/500x_yeti_mic.jpg" alt="" height="200" /></p>
<p>Here are a few samples of our recordings</p>
<h2>Archana &#8211; extract from &#8216;Alice in Wonderland&#8217; by Lewis Carroll</h2>
<p>Shotgun Microphone:<br />
	<audio id="wp_mep_2" src="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/suddenly-stereo_01.mp3"     controls="controls" preload="none"  >
		
		
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/suddenly-stereo_01.mp3" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_2').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>
</p>
<p>Logitech USB Microphone:<br />
	<audio id="wp_mep_3" src="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/suddenly-logitech.wav"     controls="controls" preload="none"  >
		
		
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/suddenly-logitech.wav" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_3').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>
</p>
<p>Yeti Microphone:<br />
	<audio id="wp_mep_4" src="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/suddenly-yeti_01.mp3"     controls="controls" preload="none"  >
		
		
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/suddenly-yeti_01.mp3" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_4').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>
</p>
<h2>Matt &#8211; extract from the poem &#8216;This is Just to Say&#8217; by William Carlos William</h2>
<p>Shotgun Microphone:<br />
	<audio id="wp_mep_5" src="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/forgive-stereo_01.mp3"     controls="controls" preload="none"  >
		
		
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/forgive-stereo_01.mp3" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_5').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>
</p>
<p>Logitech USB Microphone:<br />
	<audio id="wp_mep_6" src="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/forgive-logitech.wav"     controls="controls" preload="none"  >
		
		
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/forgive-logitech.wav" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_6').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>
</p>
<p>Yeti Microphone:<br />
	<audio id="wp_mep_7" src="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/forgive-yeti_01.mp3"     controls="controls" preload="none"  >
		
		
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/forgive-yeti_01.mp3" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_7').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>
</p>
<h2>Fingers snapping</h2>
<p>Shotgun Microphone:<br />
	<audio id="wp_mep_8" src="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/snapping-stereo_01.mp3"     controls="controls" preload="none"  >
		
		
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/snapping-stereo_01.mp3" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_8').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>
</p>
<p>Logitech USB Microphone:<br />
	<audio id="wp_mep_9" src="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/snapping-logitech.wav"     controls="controls" preload="none"  >
		
		
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/snapping-logitech.wav" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_9').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>
</p>
<p>Yeti Microphone:<br />
	<audio id="wp_mep_10" src="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/snapping-yeti_01.mp3"     controls="controls" preload="none"  >
		
		
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/snapping-yeti_01.mp3" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_10').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>
</p>
<h2>Music played from a phone speaker that is moved around space</h2>
<p>Shotgun Microphone:<br />
	<audio id="wp_mep_11" src="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/music-stereo_01.mp3"     controls="controls" preload="none"  >
		
		
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/music-stereo_01.mp3" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_11').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>
</p>
<p>Logitech USB Microphone:<br />
	<audio id="wp_mep_12" src="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/music-logitech.wav"     controls="controls" preload="none"  >
		
		
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/music-logitech.wav" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_12').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>
</p>
<p>Yeti Microphone:<br />
	<audio id="wp_mep_13" src="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/music-yeti_01.mp3"     controls="controls" preload="none"  >
		
		
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://itp.nyu.edu/~apk284/blog/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/music-yeti_01.mp3" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_13').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~apk284/blog/cooking-with-sound/2012/11/13/microphone-recordings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/suddenly-stereo_01.mp3" length="93467" type="audio/mpeg" />
<enclosure url="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/suddenly-logitech.wav" length="606910" type="audio/wav" />
<enclosure url="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/suddenly-yeti_01.mp3" length="113172" type="audio/mpeg" />
<enclosure url="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/forgive-stereo_01.mp3" length="0" type="audio/mpeg" />
<enclosure url="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/forgive-logitech.wav" length="465784" type="audio/wav" />
<enclosure url="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/forgive-yeti_01.mp3" length="75605" type="audio/mpeg" />
<enclosure url="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/snapping-stereo_01.mp3" length="290887" type="audio/mpeg" />
<enclosure url="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/snapping-logitech.wav" length="0" type="audio/wav" />
<enclosure url="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/snapping-yeti_01.mp3" length="287827" type="audio/mpeg" />
<enclosure url="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/music-stereo_01.mp3" length="1482631" type="audio/mpeg" />
<enclosure url="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/music-logitech.wav" length="0" type="audio/wav" />
<enclosure url="http://itp.nyu.edu/~apk284/blog/wp-content/uploads/2012/11/music-yeti_01.mp3" length="1566119" type="audio/mpeg" />
		</item>
		<item>
		<title>Addressing Secondhand Smoke Through New Technologies</title>
		<link>http://itp.nyu.edu/~apk284/blog/citizen-cyberscience/2012/10/22/addressing-secondhand-smoke-through-new-technologies/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=addressing-secondhand-smoke-through-new-technologies</link>
		<comments>http://itp.nyu.edu/~apk284/blog/citizen-cyberscience/2012/10/22/addressing-secondhand-smoke-through-new-technologies/#comments</comments>
		<pubDate>Mon, 22 Oct 2012 06:47:42 +0000</pubDate>
		<dc:creator>Archana</dc:creator>
				<category><![CDATA[Citizen Cyberscience]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~apk284/blog/?p=546</guid>
		<description><![CDATA[Goal Christie and I are working on developing a smoke detector that identifies a change in cigarette smoke in the atmosphere. This concept was originally developed for the purposes of detecting secondhand smoke in the Philippines, Malaysia and more recently, &#8230; <a href="http://itp.nyu.edu/~apk284/blog/citizen-cyberscience/2012/10/22/addressing-secondhand-smoke-through-new-technologies/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<h1>Goal</h1>
<p>Christie and I are working on developing a smoke detector that identifies a change in cigarette smoke in the atmosphere. This concept was originally developed for the purposes of detecting secondhand smoke in the Philippines, Malaysia and more recently, the UAE. Since this is ultimately about changing behavior in users, we see this project being deployed on mobile applications.</p>
<p>We are in the process of developing functioning circuits with various IR sensors to figure out functionality, sensitivity and calibration, but we have identified two other major phases of development:</p>
<p>1) Transmitting the data received by the IR sensor through the microphone port in a mobile phone and developing a basic interface for this information to be displayed/accessed.</p>
<p>2) Gathering all the data and making it more accessible to citizens as well as other agencies.</p>
<p>Our goals for this class are to get the detector, wireframe and barebones application functioning to open the product up to developers here and abroad.</p>
<h1>Research</h1>
<h2>The Human Nose</h2>
<p>While the human nose&#8217;s sense of smell is feeble compared to that of many animals, it is still very acute, sensitive and complex organic sensor that can tell the difference between 4000-10,000 smells. Smell is detected when odors molecules touch receptors on the olfactory nerves that then transmit the electrical impulses to the brain.</p>
<h2>Existing Technologies to detect smoke</h2>
<p>A number of technologies do already exist to detect smoke that employ a variety of principles.</p>
<h2>1. Air Quality Monitor</h2>
<p>Air Quality Monitors use a tin dioxide semiconductor sensor to detect oxidizable gases. They are designed to have high sensitivity to gaseous organic materials like cigarette smoke.</p>
<p>A heated element inside a porous semiconductive tube that has a large surface area freely absorbs gas molecules on the semiconductor surface. Electron transfer occurs between the gas molecules and the already absorbed oxygen molecules causing a relatively large increase in conductivity for a small change in gas concentration.</p>
<p><strong>Example:  Ambient Volatile Organic Compound (VOC) Monitor</strong></p>
<p>The VOC Monitor monitors ambient air quality by detecting the VOC content in the air. It is  compact, accurate, and retails at about $35. It requires a computer, USB port for power and specific Microsoft Windows software for detailed measurements of air quality. On a computer, the user can see a graph of changes in air quality over time.</p>
<p><img src="http://www.dwyer-inst.com/images/Medium/AQS-1_pic.jpg" alt="" class="aligncenter"/></p>
<p>Specs:</p>
<pre>VOC’s Detected: Alcohols, aldehydes, ketones, organic acids, aliphatic and aromatic hydrocarbons.
Sensor: MEMS metal oxide semiconductor.
Power: Powered from PC USB port.
Temperature Limits: 32 to 122°F (0 to 50°C).</pre>
<h2>2. Optical Smoke Detectors</h2>
<p>Photoelectric light scattering smoke detectors, utilize a light source in order to detect obscuration<br />
require a chamber, a photodiode, and an infrared light-emitting diode. In clean air, light passes in front of the detector in a straight line. When smoke enters the optical chamber across the path of the light beam, some light is scattered by the smoke particles, directing it at the sensor.</p>
<p><a href="http://www.apollo-fire.com/media/753726/optical.jpg"><img class="aligncenter" title="Optical Smoke Detecto" src="http://www.apollo-fire.com/media/753726/optical.jpg" alt="" width="472" height="322" /></a></p>
<h2>3. Infrared Photo Detector and Emitter</h2>
<p>IR sensors work by producing a small beam of light between the emitter and detector across a gap exposed to the air. When small particulates cross the light beam, such as those present in cigarette smoke, the sensor detects the fluctuation in light and can send a signal to a mobile application.They are very inexpensive &#8211; usually under $5.00 and are unrestricted in terms of their circuitry as well as free of proprietary concerns. We are currently testing prototypes for sensitivity compared to the AQStick. Provided we can maintain a high degree of accuracy, this would be a superior source for a mobile application</p>
<p><strong>Example: Sharp Infrared sensor</strong></p>
<p>Similar to an infrared photo detector and emitter, the Sharp Infrared sensor relies on triangulation of light rather than a direct beam to give a reading. A beam of light has a certain angle of refraction in a non-smoky environment. When VOC particulates are encountered, the angle of refraction changes and the sensor reads that change.</p>
<p><img src="http://www.robotshop.com/Images/big/fr/capteur-distance-gp2d120-ir-sharp.jpg" alt=""  class="aligncenter"/></p>
<h1>Our Next Steps</h1>
<p>Test out infrared sensor circuits and to get a reading which we are able to send out through serial communication using a microprocessor.</p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~apk284/blog/citizen-cyberscience/2012/10/22/addressing-secondhand-smoke-through-new-technologies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rest Scheme for basic rice cooker + water dispenser</title>
		<link>http://itp.nyu.edu/~apk284/blog/understanding-networks/2012/10/19/rest-scheme-for-basic-rice-cooker-water-dispenser/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rest-scheme-for-basic-rice-cooker-water-dispenser</link>
		<comments>http://itp.nyu.edu/~apk284/blog/understanding-networks/2012/10/19/rest-scheme-for-basic-rice-cooker-water-dispenser/#comments</comments>
		<pubDate>Fri, 19 Oct 2012 20:21:29 +0000</pubDate>
		<dc:creator>Archana</dc:creator>
				<category><![CDATA[Understanding Networks]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~apk284/blog/?p=536</guid>
		<description><![CDATA[rice cooker  [the rice cooker] ricecooker/on [power to the rice cooker] ricecooker/off [no power] ricecooker/waterdispenser/add [the rice cooker has a water dispenser unit. Add water when power off] ricecooker/on/waterdispenser/add [add water to unit when power is on] ricecooker/on/waterdispencer/amountofwater [when power &#8230; <a href="http://itp.nyu.edu/~apk284/blog/understanding-networks/2012/10/19/rest-scheme-for-basic-rice-cooker-water-dispenser/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><img class="aligncenter" title="Rice COoker" src="http://www.tigerchef.com/itempics/Aroma-ARC-2000--20-Cup-Sensor-Logic-Rice-Cooker-27520_xlarge.jpg" alt="" width="350" height="350" /></p>
<p>rice cooker  <span style="color: #c0c0c0;">[the rice cooker]</span></p>
<p>ricecooker/on <span style="color: #c0c0c0;">[power to the rice cooker]</span><br />
ricecooker/off <span style="color: #c0c0c0;">[no power]</span></p>
<p>ricecooker/waterdispenser/add <span style="color: #c0c0c0;">[the rice cooker has a water dispenser unit. Add water when power off]</span><br />
ricecooker/on/waterdispenser/add <span style="color: #c0c0c0;">[add water to unit when power is on]</span></p>
<p>ricecooker/on/waterdispencer/amountofwater <span style="color: #c0c0c0;">[when power is on, displays the amount of water in the dispenser]</span></p>
<p>ricecooker/off/openlid<span style="color: #888888;"> [opens the rice cooker lid when power is off]</span><br />
ricecooker/on/openlid<span style="color: #888888;"> [opens the rice cooker lid when power is on]</span></p>
<p>ricecooker/off/closelid<span style="color: #888888;"> [closes the rice cooker lid when power is off]</span><br />
ricecooker/on/closelid<span style="color: #888888;"> [closes the rice cooker lid when power is on]</span></p>
<p>if ricecooker/on/cook/(anything), then ricecooker/on/closelid CANNOT function. i.e. openlid can only function when the power is just on/off and no other state is being called</p>
<p>ricecooker/on/closelid/cook <span style="color: #888888;">[when power is on and the lid is closed, display cook options]</span></p>
<p>ricecooker/on/closelid/cook/keepwarm <span style="color: #888888;">[when power is on and the lid is closed, keep warm at fixed temperature]</span></p>
<p>ricecooker/off/openlid/addrice <span style="color: #888888;">[when power is off and lid is open, add rice]</span><br />
ricecooker/on/openlid/addrice<span style="color: #888888;"> [when power is on and lid is open, add rice]</span></p>
<p>ricecooker/on/closelid/cook/brownrice <span style="color: #888888;">[ power is on, lid is closed, cook brown rice is selected]</span><br />
ricecooker/on/closelid/cook/brownrice/amount<span style="color: #888888;"> [ power is on, lid is closed, cook brown rice is selected, amount of cups present is displayed]</span><br />
ricecooker/on/closelid/cook/brownrice/dispenseWater<br />
<span style="color: #888888;">[ power is on, lid is closed, cook brown rice is selected, dispenses water based on the number of cups]</span></p>
<p>ricecooker/on/closelid/cook/brownrice/error/not-enough-water-in-dispencer<br />
<span style="color: #888888;">[displays an error if there is not enough water to cook rice]</span></p>
<p><span style="color: #000000;">ricecooker/on/closelid/cook/brownrice/error/insufficient-rice</span><br />
<span style="color: #888888;"> [displays an error if there is less than 1 cup of rice]</span></p>
<p>ricecooker/on/closelid/cook/brownrice/error/too-much-rice<br />
<span style="color: #888888;">[displays an error if there is more than 4 cups of rice]</span></p>
<div></div>
<p>ricecooker/on/closelid/cook/brownrice/ricecooking/<br />
<span style="color: #c0c0c0;">[start cooking brown rice]</span></p>
<p>ricecooker/on/closelid/cook/brownrice/ricecooking/timetoCompletion<br />
<span style="color: #c0c0c0;">[time till brown rice is finished cooking]</span></p>
<p>ricecooker/on/closelid/cook/brownrice/ricecooking/complete<br />
<span style="color: #c0c0c0;">[brownrice is cooked]</span></p>
<p><span style="color: #c0c0c0;">[similarly for white rice]</span><br />
ricecooker/on/closelid/cook/whiterice<br />
ricecooker/on/closelid/cook/whiterice/amount<br />
ricecooker/on/closelid/cook/whiterice/dispenseWater<br />
ricecooker/on/closelid/cook/whiterice/error/notenoughwater<br />
ricecooker/on/closelid/cook/whiterice/error/notenoughrice<br />
ricecooker/on/closelid/cook/whiterice/error/toomuchrice<br />
ricecooker/on/closelid/cook/whiterice/ricecooking/timetoCompletion<br />
ricecooker/on/closelid/cook/whiterice/ricecooking/complete</p>
<p><span style="color: #c0c0c0;">[similarly for steaming]</span><br />
ricecooker/off/openlid/steamtray/add<br />
ricecooker/off/openlid/steamtray/addvegetables</p>
<p>ricecooker/on/closelid/cook/steam/error/no-steamtray-present</p>
<p>ricecooker/on/closelid/cook/steam<br />
ricecooker/on/closelid/cook/steam/dispenseWater</p>
<p>ricecooker/on/closelid/cook/steam/error/notenoughwater</p>
<p>ricecooker/on/closelid/cook/steam/countdowntosteamstart<br />
<span style="color: #c0c0c0;">[displays the time it takes for the water to come to boil and start steaming]</span></p>
<p>ricecooker/on/closelid/cook/steam/time<br />
<span style="color: #c0c0c0;">[displays the time the contents have been steaming for]</span></p>
<p>ricecooker/on/closelid/cook/steam/end<br />
<span style="color: #c0c0c0;">[stop steaming]</span></p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~apk284/blog/understanding-networks/2012/10/19/rest-scheme-for-basic-rice-cooker-water-dispenser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MidTerm: Beer, Wine and not quite spirits</title>
		<link>http://itp.nyu.edu/~apk284/blog/cooking-with-sound/2012/10/09/midterm-beer-wine-and-not-quite-spirits/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=midterm-beer-wine-and-not-quite-spirits</link>
		<comments>http://itp.nyu.edu/~apk284/blog/cooking-with-sound/2012/10/09/midterm-beer-wine-and-not-quite-spirits/#comments</comments>
		<pubDate>Tue, 09 Oct 2012 05:16:29 +0000</pubDate>
		<dc:creator>Archana</dc:creator>
				<category><![CDATA[cooking with sound]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~apk284/blog/?p=532</guid>
		<description><![CDATA[Using a hydrophone, a tone generator app and a speaker, Elena and I tested the refraction of sound and the quality of sound in water, beer, wine, milk and honey. We bought this amazing underwater mic for $25 called the &#8230; <a href="http://itp.nyu.edu/~apk284/blog/cooking-with-sound/2012/10/09/midterm-beer-wine-and-not-quite-spirits/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Using a hydrophone, a tone generator app and a speaker, Elena and I tested the refraction of sound and the quality of sound in water, beer, wine, milk and honey.</p>
<p>We bought this amazing underwater mic for $25 called the Super Spy Phone.</p>
<p><a href="http://itp.nyu.edu/~ep1243/blog/wp-content/uploads/2012/10/IMG_1954.jpg"><img title="IMG_1954" src="http://itp.nyu.edu/~ep1243/blog/wp-content/uploads/2012/10/IMG_1954-1024x768.jpg" alt="" width="640" height="480" /></a></p>
<p><a href="http://itp.nyu.edu/~ep1243/blog/wp-content/uploads/2012/10/IMG_1950.jpg"><img title="IMG_1950" src="http://itp.nyu.edu/~ep1243/blog/wp-content/uploads/2012/10/IMG_1950-1024x768.jpg" alt="" width="640" height="480" /></a></p>
<h2>Refraction of Sound</h2>
<p><iframe src="http://player.vimeo.com/video/50951406?title=0&amp;byline=0&amp;portrait=0&amp;color=ffffff" frameborder="0" width="650" height="366"></iframe><br />
<iframe src="http://player.vimeo.com/video/51030519?title=0&amp;byline=0&amp;portrait=0&amp;color=ffffff" frameborder="0" width="650" height="317"></iframe></p>
<p>We found that with no liquid, the sound was pretty consistent at around 20hz, with some variation because of the mic and the plastic.</p>
<p>In water, we saw both more higher and lower tones in the wave, but the tones were relatively adjacent to the original 20hz.</p>
<p>The wine was very similar to the water, with slightly higher level of higher tones.<br />
Then, with the beer, we suddenly saw a tone appear in the spectrum analysis that was around 250hz. This had never appeared before. All of the other tones had been between 20 and 100. Additionally there appeared a very slight increase in the tones above 500.</p>
<p>The milk was actually the cleanest tone, with almost all of the sound right around 20hz.<br />
The honey showed an even split between three tones all around 20hz.</p>
<p>We would suggest that the carbonation in the beer, which was lacking in all of the other liquid, was what caused the dramatic difference in tones.</p>
<h2>Visualization</h2>
<p>To see the waves in the various liquids, we placed a small amount of the liquid in a plastic cup measure and placed it on the speaker.<br />
<iframe src="http://player.vimeo.com/video/50954042" width="650" height="366" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<p><iframe src="http://player.vimeo.com/video/51030357" width="650" height="366" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~apk284/blog/cooking-with-sound/2012/10/09/midterm-beer-wine-and-not-quite-spirits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Traceroutes</title>
		<link>http://itp.nyu.edu/~apk284/blog/understanding-networks/2012/10/02/traceroutes/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=traceroutes</link>
		<comments>http://itp.nyu.edu/~apk284/blog/understanding-networks/2012/10/02/traceroutes/#comments</comments>
		<pubDate>Tue, 02 Oct 2012 04:28:52 +0000</pubDate>
		<dc:creator>Archana</dc:creator>
				<category><![CDATA[Understanding Networks]]></category>

		<guid isPermaLink="false">http://itp.nyu.edu/~apk284/blog/?p=529</guid>
		<description><![CDATA[Reddit.com facebook.com paypal  overview: New York City, NY-&#62; Kansas -&#62; Scarsdale Park, New York -&#62; Sacramento, California overview: New York City -&#62;Kansas -&#62; Scarsdale Park, New York -&#62; San Mateo, California -&#62; White Plains, New York -&#62; Oshawa, Canada -&#62; &#8230; <a href="http://itp.nyu.edu/~apk284/blog/understanding-networks/2012/10/02/traceroutes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="middle"><strong>Reddit.com</strong></td>
<td valign="middle"><strong>facebook.com</strong></td>
<td valign="middle"><strong>paypal</strong></td>
</tr>
<tr>
<td valign="middle"> overview: New York City, NY-&gt; Kansas -&gt; Scarsdale Park, New York -&gt; Sacramento, California</td>
<td valign="middle">overview: New York City -&gt;Kansas -&gt; Scarsdale Park, New York -&gt; San Mateo, California -&gt; White Plains, New York -&gt; Oshawa, Canada -&gt; Kansas</td>
<td valign="middle"> overview: New York City -&gt; Kansas -&gt; Scarsdale Park, New York</td>
</tr>
<tr>
<td valign="middle">bdl1.nyw-ubr2.nyr-nyw.ny.cable.rcn.net (10.19.112.1)</td>
<td valign="middle">bdl1.nyw-ubr2.nyr-nyw.ny.cable.rcn.net (10.19.112.1)</td>
<td valign="middle">bdl1.nyw-ubr2.nyr-nyw.ny.cable.rcn.net (10.19.112.1)</td>
</tr>
<tr>
<td valign="middle">bvi4.aggr1.nyw.ny.rcn.net (208.59.246.1)</td>
<td valign="middle">bvi4.aggr1.nyw.ny.rcn.net (208.59.246.1)</td>
<td valign="middle">bvi4.aggr1.nyw.ny.rcn.net (208.59.246.1)</td>
</tr>
<tr>
<td valign="middle">tge0-1-0-0.core1.nyw.ny.rcn.net (207.172.15.84)</p>
<p>&nbsp;</td>
<td valign="middle">tge0-1-0-0.core1.nyw.ny.rcn.net (207.172.15.84)</p>
<p>&nbsp;</td>
<td valign="middle">tge0-0-0-0.core1.nyw.ny.rcn.net (207.172.15.75)</td>
</tr>
<tr>
<td valign="middle">tge0-1-0-2.core2.phdl.pa.rcn.net (207.172.19.20)</td>
<td valign="middle">tge0-0-0-2.core2.phdl.pa.rcn.net (207.172.19.228)</td>
<td valign="middle">tge0-1-0-2.core1.phdl.pa.rcn.net (207.172.19.216)</td>
</tr>
<tr>
<td valign="middle">tge0-0-0-2.core2.lnh.md.rcn.net (207.172.19.11)</td>
<td valign="middle">tge0-1-0-3.core2.lnh.md.rcn.net (207.172.19.225)</td>
<td valign="middle">tge0-1-0-3.core2.lnh.md.rcn.net (207.172.19.225)</td>
</tr>
<tr>
<td valign="middle">tge1-4.border1.eqnx.va.rcn.net (207.172.19.179)</td>
<td valign="middle">tge2-3.border1.eqnx.va.rcn.net (207.172.19.7)</td>
<td valign="middle">tge2-4.border1.eqnx.va.rcn.net (207.172.19.205)</td>
</tr>
<tr>
<td valign="middle">equinix-iad11.netarch.akamai.com (206.223.115.102)</td>
<td valign="middle">ge-4-1-0.mpr1.iad10.us.mfnx.net (206.223.115.86)</td>
<td valign="middle"></td>
</tr>
<tr>
<td valign="middle">a72-247-242-50.deploy.akamaitechnologies.com (72.247.242.50)</td>
<td valign="middle">209.66.92.238.t00817-32.above.net (209.66.92.238)</td>
<td valign="middle"></td>
</tr>
<tr>
<td valign="middle"></td>
<td valign="middle">ae11.bb01.iad1.tfbnw.net (74.119.78.68)</td>
<td valign="middle"></td>
</tr>
<tr>
<td valign="middle"></td>
<td valign="middle">ae8.bb02.frc1.tfbnw.net (31.13.24.46)</td>
<td valign="middle"></td>
</tr>
<tr>
<td valign="middle"></td>
<td valign="middle">ae2.dr04.frc1.tfbnw.net (31.13.27.82)</td>
<td valign="middle"></td>
</tr>
<tr>
<td valign="middle"></td>
<td valign="middle">po1022.csw03a.frc1.tfbnw.net (31.13.25.203)</td>
<td valign="middle"></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://itp.nyu.edu/~apk284/blog/understanding-networks/2012/10/02/traceroutes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
