• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • about this course
  • syllabus
  • rubric
  • labs
  • blog

HCI | TechX

August 12, 2020

hw day6-王婧怡Nancy

I made use of human vision residue to superimpose several random squares when the volume was high, forming a sense of mess. Also, I varied the color depth along with size of the cycle to create a hazy sense.

import processing.sound.; import processing.video.;
boolean playing = false;
SoundFile xs;
Amplitude analysis;
float tempt;
void setup() {
size(500, 500);
background(0);
xs = new SoundFile(this, “sample.aiff”);
//xs.cue(13.5);
analysis = new Amplitude(this);
//xs.amp(10.5);
analysis.input(xs);
xs.play();
}

void draw() {
background(255);
tempt = analysis.analyze();
tempt = map(tempt,0,1,0,width);
fill(tempt);
stroke(tempt/2);
strokeWeight(map(tempt,0,width,0,15));
ellipse(250, 250, tempt, tempt);
if (tempt>250){
float tempt2 = random(0,tempt/5);
fill(random(0,tempt2),random(0,tempt2),random(0,tempt2));
rect(random(width),random(height),tempt2,tempt2);
}
}

Filed Under: blog

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Recent Posts

  • Homework Day 8 – Simon Hsieh
  • homework day 8 – Michael
  • Homework-day8-Sophie
  • Harry Hao HW DAY8
  • homework day 8 – dora

Copyright © 2025 HCI | TechX on the Brunch Pro Theme