Everyone is doing slit-scan things these days and I decided to apply the effect on something that looks like a slit-scan already. Here is an homage to my favorite horizontals and colors at Bedford Nostrand. The station is often empty and the practically uninterrupted horizontals make for a soothing wait. They also mimic the blur of the train. The saturated industrial yellows next to tempered forest greens remind me of rain boots and camping gear.
Using processing to modulate where the digital slit-scan is sampled in a static image that I turned into a video. So far, I am simulating sound input with the mouse. The next steps is to use actual sound input to modulate the location. Inspired by recent work of @lkkchung, @loquepasa, @sofialuisa_ , and Spike Jonze. A bit of coding guidance from Koji Kanao (@array_ideas). I’m sort of cheating because I’m using the mouse to approximate the sonic changes. The next step is to actually use sonic input to trigger the visual changes. I’ll try to get to it this summer.
code:
/**
* Transform: Slit-Scan
* from Form+Code in Design, Art, and Architecture
* by Casey Reas, Chandler McWilliams, and LUST
* Princeton Architectural Press, 2010
* ISBN 9781568989372
*
* This code was written for Processing 1.2+
* Get Processing at http://www.processing.org/download
*/
import processing.video.*;
int cols;
int rows;
PImage backgroundimage;
Movie myVideo;
int video_width = 210;
int video_height = 280;
int window_width = 1000;
int window_height = video_height;
int draw_position_x = 0;
boolean newFrame = false;
void setup() {
myVideo = new Movie(this, "small_210_280.mp4");
size(1000, 280);
background(#ffffff);
myVideo.loop();
frameRate(260);
backgroundimage = loadImage("bckg3.jpg");
cols = 160;
rows = 100;
if( backgroundimage.width%width > 0){cols++;}
if( backgroundimage.height%height > 0){rows++;}
for (int y=0; y<rows; y++){
for (int x=0; x<cols; x++){
image(backgroundimage,x*backgroundimage.width,y*backgroundimage.height);
}
}
}
void movieEvent(Movie myMovie) {
myMovie.read();
newFrame = true;
}
void draw() {
int r = floor(random(250));
int video_slice_x = (1+(mouseX));
if (newFrame) {
loadPixels();
for (int y=0; y<window_height; y++){
int setPixelIndex = y*window_width + draw_position_x;
int getPixelIndex = y*video_width + video_slice_x;
pixels[setPixelIndex] = myVideo.pixels[getPixelIndex];
}
updatePixels();
draw_position_x++;
if (draw_position_x >= window_width) {
exit();
}
newFrame = false;
}
}