Jonathan-13-9-65

by jonathan @ 1:49 am 24 January 2012

I kind of approached this part of a project in a different way. Instead of trying to come up with an algorithm to derive the art piece, I decided to turn it into one derived from the user through the use of sound. Though it’s obviously not perfect and is missing a few vital components, it more or less kind of resembles the original 13/9/65.

import ddf.minim.*;
import ddf.minim.signals.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;
 
Minim minim;
AudioInput in;
 
int  y, barMic, micIn, count;
float x;
 
ArrayList underLine;
 
void setup() {
 
  size(400, 400);
  // underLine = new ArrayList();
  background(0);
  x = 0;
  y = 40;
  count = 0;
  minim = new Minim(this);
  in = minim.getLineIn(Minim.STEREO, 512);
}
 
void draw() {
 
  noFill();
  strokeWeight(1);
  stroke(255);
  rectMode(CENTER);
  smooth();
  followLine();
  create();
  println(micIn);
  frameRate(60);
}
 
void followLine() {
 
//initialize mic input
 
  for (int i = 0; i  width) {
      x = 0;
      y = y+40;
 
      if (y > height) {
        y = 0;
        x = 0;
      }
    }
  }
}
 
void create() {
 
  //float [] underLine = new float [500];
 
  stroke(0); 
 
  if (micIn > 200) {
 
    ellipse(x, y, micIn/5, micIn/5);
  } 
 
  if (micIn > 15 && micIn  50 && micIn < 90) {
    line(x+random(-20, 20), y-20, x+random(-20, 20), y+20);
  }

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2023 Interactive Art and Computational Design, Spring 2012 | powered by WordPress with Barecity