How can I slow down the switch i’m using in draw? I’ve played with framerate and delay but it just makes the video('s) very slow which is not what I want, it still need to run smoothly.
This is the only way i’ve found out to randomize an output. If there’s any other ways in how to randommize please feel free to teach me. I just started working with Processing/Java and I’m eager to find out news ways. Thank you.
int number = (int)(Math.random() * 4); // 0 to 100
switch (number) {
case 1:
copy(video, 330, 170, 40, 40, 0, 0, video.width, video.height);
break;
case 2:
copy(video, 390, 170, 40, 40, 0, 0, video.width, video.height);
break;
case 3:
copy(video, 355, 205, 40, 40, 0, 0, video.width, video.height);
break;
case 4:
copy(video, 345, 230, 60, 40, 0, 0, video.width, video.height);
break;
}
spout1.sendTexture();
}