Hello, world!
I'm new in Processing, actualy I've only started using it because I have to make something creative with it as a "homework"(long story)
So far I like it, it's very comprehensive
So, the question is:
I have a sequence of actions that I want to correspond with background music, I feel things are going too fast,
I tried using delay(); funcion, but it doesn't work properly:
the cicle starts banyway, as if unaware of delay at all.
Could please someone help me? It´s not finished, btw
import ddf.minim.*;
import ddf.minim.signals.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;
PImage img;
int x = 30;
PFont fontA;
Minim minim;
AudioPlayer song;
void setup(){
size(800, 600);
background(255);
img = loadImage("door.jpg");
minim = new Minim(this);
song = minim.loadFile("rolling_stones_-_paint_it_black.mp3");
fontA = loadFont("Ziggurat-HTF-Black-32.vlw");
smooth();
}
void draw(){
song.play();
fill(0);
textFont(fontA, 32);
text("Rolling Stones", x, 60);
text("Paint", x, 95);
text("it", x, 130);
text("Black", x, 165);
delay(1000);
imageMode(CENTER);
image(img, 400, 300);
tint(0,0);
for ( int i = 0; i < random(600); i++) {
stroke(0);
fill(0);
ellipse(random(800), random(600),20,20);
}
}