Tuesday, October 9, 2012

Midterm project process

So this is our Processing code so far. We have one video already, now we need to find 7 more videos that relate to our concept and make an array to play them randomly depending on the pressure applied to the bend sensors (4 videos for values of 0 to 50 and the other 4 videos for values of 50 to 100).



import processing.video.*;

// Step 1. Declare Movie object
Movie movie;

void setup() {
  size(480,360,P2D);
 
  // Step 2. Initialize Movie object
  // Movie file should be in data folder
  movie = new Movie(this, "@r8 copy.mp4");
 
  // Step 3. Start movie playing
  movie.loop();
}

// Step 4. Read new frames from movie
void movieEvent(Movie movie) {
  movie.read();
}

void draw() {
  // Step 5. Display movie.
  image(movie,0,0);
}

No comments:

Post a Comment