I want to set my index to a variable rather than a name in my sketch. because further up im doing this:
//random first video at program start
int fL = int(random(0, 5));
int fR = int(random(0, 5));
int eL = int(random(0, 5));
int eR = int(random(0, 5));
int mL = int(random(0, 5));
int mR = int(random(0, 5));
and it is used for this:
//play chosen index
foreheadLeft[fL].play();
foreheadRight[fR].play();
eyesLeft[eL].play();
eyesRight[eR].play();
mouthLeft[mL].play();
mouthRight[mR].play();
then affected by user with mouseclick i want it to increment now but from originally chosen video:
if (mouseX < cLineX && mouseY < tLineY) {
for (int i = fL; i < topLeftVid.length; i++) {
foreheadLeft[i] = new Movie(this, topLeftVid[i]);
foreheadLeft[i-1].pause();
foreheadLeft[i].play();
foreheadLeft[i].loop();
}
fill(255);
ellipse(mouseX, mouseY, 10, 10);
}
the error is "cannot find anything named "fL"
how do i get the program to get that value from somewhere in the sketch?
thanks for you help!
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:
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?
I'm trying to recreate my logo in processing...but I'm having trouble finding all the right coding for it...if anyone can suggest some coding solutions that would be great!...or maybe even external libraries
So i've installed an external library before: Ani and im trying to install another one but for some reason processing is not recognizing the new one that i am trying to install. Ive placed it in the processing/modes/java/libraries folder and restarted the processing program and no dice. Please help me fix this...i want to use this library for a project for school...