Audio input trouble

Hey guys, I;am new to processing and Ive been searching how to use the minum library that would allow me to visualise the input in real time on my animation in my code! Ive been searching how to do this for the past two weeks but to no avail. Here is a copy of my code. I'd Greatly appreciate if someone could show me where to make this fit into my code!:)

here is a copy of my code :

float x =0; // varibable that declares x to 0 float x2=500;

float linespeed = 1; //The speed of which the line is moving void setup() {

size (1200, 500); //Size of canvas }

void draw() { background (255); //Background colour

stroke (0,0,0); //line strokeWeight(3); //beastly

line(150, 250, 1050, 250); //correct X axis line(150, 400, 150, 100); // Y axis

stroke (10,0,0); //line

line(150, 250, 250, x); //line

line(250, x, 250, x2); line(250, x2, 450, x); line(450, x, 450, x2); line(450, x2, 650, x); line(650, x, 650, x2); line(650, x2, 850, x); line(850, x2, 850, x); line(1050, x, 850, x2);

if (x < 150) { // Animates the line (loop) x += linespeed; //line speed

if (x < 150) {   // Animates the line (loop)
x2 -=linespeed;



}

}

fill(127, 200, 0); //text colour Green textSize(52); //Text size text("Saw Tooth Wave", 400, 50); //text

 fill(15, 200, 150); //text colour blue
 textSize(26); //text size
 text("X axis", 60, 250); //text

 textSize(26); // text size
 text("Y axis", 110, 80); // text

fill(127, 200, 150); //text colour dark red textSize(20); // size text("1 cycle",315,135); //text

fill(227, 200, 150); //text colour Beige textSize(20); // size text("Time", 70, 270); //text

fill(227, 200, 150); //text colour Beige textSize(20); // size text("Amplitude",100, 50); //text

}

I basically just want an audio file of sawtooth.wav file to play when opened?

MANY THANKS :)

Tagged:
Sign In or Register to comment.