We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I've just started a short class for processing, have a simple script for an array of ellipses moving around the screen what I want is for the ellipses to flash when sound exceeds a certain height and to go back to white when input comes below this level. so far Ive not been able to stitch together what I've grasped. please help. Its already 7am and after hours of tutorials I'm no further. Should an if statement go in, or should I be using true/false to switch on or off this reaction
all advice welcome
Answers
import ddf.minim.*; import ddf.minim.analysis.*; import ddf.minim.effects.*; import ddf.minim.signals.*; import ddf.minim.spi.*; import ddf.minim.ugens.*;
Circ[] circs; //we will store our circles inside an array int howMany = 18; boolean ANIMATE = true; color[] cols = {color(255),color(255),color(255)}; color[] strs = {color(255), color(255), color(255)};
void setup() {
size(800, 600); fill(255, 204); noStroke(); smooth(); circs = new Circ[howMany];
for (int i = 0; i < howMany; i++) {
}
void draw() { background(0,0,0); for (int x = 0; x < howMany; x++) {
}
}
class Circ {
float xpos; float ypos ; float d; // diameter color col; color strCol; int strW; float speedX; float speedY;
Circ(float ixp, float iyp, float id, color c, color s, int sW, float sp) {
}
void display() {
}
void update() {
}
}
void mousePressed() { background(255); println(frameRate);
for (int x = 0; x < howMany; x++) { //circs[x].update(); circs[x].xpos = random(0,width); circs[x].ypos = random(0,height); circs[x].display();
} }
void keyPressed() { if (key=='1') ANIMATE= true; if (key=='2') ANIMATE= false; println("Animate?: ", ANIMATE);
}
Please edit your post, select your code and hit ctrl+o to format it properly.
Kf
Cool!
Kf