I am designing an interactive sound and video art piece using processing. I have designed classes for audio and video. The piece itself is portrait video of people cut into 6 pieces, we have 6 subjects therefore 36 videos. We also have 6 pieces of audio which will be randomly attached to the 36 faces. My problem lies in a lack of understanding of arrays, both creating and managing them. I want the user to "cycle" through videos when they click in a certain area but i do not want the other video to stop....i effectively want the videos to play and loop right from the time the program is started...the code for cycling through video is here with draw ellipse placeholders:
void mouseClicked() {
//forehead-left
if (mouseX < cLineX && mouseY < tLineY) {
fill(255,155,0);
ellipse(mouseX, mouseY, 10, 10);
}
//forehead-right
else if (mouseX > cLineX && mouseY < tLineY) {
fill(0);
ellipse(mouseX, mouseY, 10, 10);
}
//eyes-left
else if (mouseX < cLineX && mouseY > tLineY && mouseY < bLineY) {
fill(200, 0, 0);
ellipse(mouseX, mouseY, 10, 10);
}
//eye-right
else if (mouseX > cLineX && mouseY > tLineY && mouseY < bLineY) {
fill(0, 155, 0);
ellipse(mouseX, mouseY, 10, 10);
}
//chin-left
else if (mouseX < cLineX && mouseY > bLineY) {
fill(0, 50, 155);
ellipse(mouseX, mouseY, 10, 10);
}
//chin-right
else if (mouseX > cLineX && mouseY > bLineY) {
fill(255, 255, 0);
ellipse(mouseX, mouseY, 10, 10);
}
}
The Movies are created outside the class and initiated in the properties.
//Top
Movie[] pForeheadLeft = new Movie[pPieces];
Movie[] pForeheadRight = new Movie[pPieces];
//Middle
Movie[] pEyesLeft = new Movie[pPieces];
Movie[] pEyesRight = new Movie[pPieces];
//Bottom
Movie[] pMouthLeft = new Movie[pPieces];
Movie[] pMouthRight = new Movie[pPieces];
pPieces is 6.
So my questions are, how do i load the videos into the array? How do i cycle through the videos while still keeping them playing? Would that over load the system?(the videos are 50MB each) Lastly, how do i attach the audio, which is in a separate class, to the video?
Thanks for your help in advance!:)
void mouseClicked() {
//forehead-left
if (mouseX < cLineX && mouseY < tLineY) {
fill(255,155,0);
ellipse(mouseX, mouseY, 10, 10);
}
//forehead-right
else if (mouseX > cLineX && mouseY < tLineY) {
fill(0);
ellipse(mouseX, mouseY, 10, 10);
}
//eyes-left
else if (mouseX < cLineX && mouseY > tLineY && mouseY < bLineY) {
fill(200, 0, 0);
ellipse(mouseX, mouseY, 10, 10);
}
//eye-right
else if (mouseX > cLineX && mouseY > tLineY && mouseY < bLineY) {
fill(0, 155, 0);
ellipse(mouseX, mouseY, 10, 10);
}
//chin-left
else if (mouseX < cLineX && mouseY > bLineY) {
fill(0, 50, 155);
ellipse(mouseX, mouseY, 10, 10);
}
//chin-right
else if (mouseX > cLineX && mouseY > bLineY) {
fill(255, 255, 0);
ellipse(mouseX, mouseY, 10, 10);
}
}
The Movies are created outside the class and initiated in the properties.
//Top
Movie[] pForeheadLeft = new Movie[pPieces];
Movie[] pForeheadRight = new Movie[pPieces];
//Middle
Movie[] pEyesLeft = new Movie[pPieces];
Movie[] pEyesRight = new Movie[pPieces];
//Bottom
Movie[] pMouthLeft = new Movie[pPieces];
Movie[] pMouthRight = new Movie[pPieces];
pPieces is 6.
So my questions are, how do i load the videos into the array? How do i cycle through the videos while still keeping them playing? Would that over load the system?(the videos are 50MB each) Lastly, how do i attach the audio, which is in a separate class, to the video?
Thanks for your help in advance!:)