Butterfly ReMix: Processing Code

Published by Constance on

Still from the Lumiere brothers' film, Serpentine Dance, a woman Dancing and swirling her dress like wings

This program is quite simple really, all that is does is randomly scrub through a video, creating a new video by ‘shuffling’ the frames.

The thing about this code is that if you just plug it into processing it won’t work, what you need to do is add sound, and video files into the data folder, and name them appropriatley. 

You can see that I’ve created variables,  my video file ‘ flyMovie’ and my sound file ‘bee’ , then in my ‘void setup’ I call the sound file by the name they have in the the data folder, and attribute them to the variable.  If you’ve named everything correctly it should work! make sure to install the sound and video libraries as well 

 

 

import processing.sound.*;
import processing.video.*;

Movie flyMovie;
SoundFile bee;

void setup() {
background(0);
fullScreen(P2D);
bee = new SoundFile (this, “Flight of the Bumblebee Remix – Brian Burrows.mp3”);
flyMovie = new Movie(this, “fly.mp4”);
flyMovie.play();
frameRate(20);
bee.play();
}

void draw() {

if (flyMovie.available()) {
flyMovie.read();
}

flyMovie.jump(random(flyMovie.duration()));

imageMode(CENTER);
image(flyMovie, width/2, height/2);
}

// credits
// Most of this comes from David Kemp’s video_scrub program
// The rest from the processing reference about the jump. operator
//https://www.youtube.com/watch?v=YNZ4WCFJGPc Loie Fuller – Danse Serpentine
//https://www.youtube.com/watch?v=hmSxNxFwIBQ Flight of the Bumblebee RE-mix by Brian Burrows
//https://www.youtube.com/watch?v=zEto1-ZTbd4 Serpent – BBC Animals
//https://www.youtube.com/watch?v=CoInyfsySD0 Slow motion Butterfly in flight


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

All Rights Reserved Constance Ouchowski 2021