Sourcecode for a sketch built with processing (in eclipse). The user can add frames from a video input source to a loop by pressing the mousebutton.

/*
 * 	~~~FrameLooper!~~~
 * 	|||henderson888|||
 *
 *	Loops frames from video input
 *	~ Mousebutton adds a new frame to the loop
 *	~ 'r' key refreshes the loop
 *	~ alter the number of frames in the loop with the 'maxFrames' variable
 *	
 */

import processing.core.*;
import codeanticode.gsvideo.*;

public class multiplication extends PApplet {

	private static final long serialVersionUID = 1L;

	GSCapture video;

	// canvas size
	int w = 320;
	int h = 240;
	// resolution of video input
	int vresx = w;
	int vresy = h;
	int numPixels = 0;

	int maxFrames = 20; // max frames in loop - change this to make loop longer

	int frameIndex = 0; // position within the loop
	int loopLength = 0; // number of frames currently in the loop
	int playIndex = 0; // current frame number in the loop

	// array of color values at frameIndex
	int[][] loop = new int[maxFrames][vresx * vresy];

//#########################################
	// setup
	public void setup() {
		size(w, h);
		frameRate(25);

		video = new GSCapture(this, vresx, vresy);
		video.start();
		// fill array
		for (int i = 0; i < maxFrames; i++) {
			for (int j = 0; j < vresx * vresy; j++) {
				loop[i][j] = 0;
			}
		}
		
		background(0);
		noStroke();

		numPixels = vresx * vresy;
	}
	
//##########################################
	//called every frame
	
	// read video input
	public void captureEvent(GSCapture c) {
		c.read();
	}

	// draw
	public void draw() {
		
		//keep the playIndex within the length of the loop
		if (playIndex < loopLength) {
			playIndex++;
		} else {
			playIndex = 0;
		}
		
		//load pixels and draw each frame in the loop to the screen
		loadPixels();
		for (int i = 0; i < numPixels; i++) {
			pixels[i] = loop[playIndex][i];
		}
		updatePixels();
	}
//##########################################
	//input
	
	// calls the addFrame method: adds new frames to the loop
	public void mousePressed() {
		System.out.println("Adding a frame!");
		addFrame();
	}

	// refresh loop
	public void keyPressed() {
		if (key == 'r') {
			loopLength = 0;
		}
	}

//##########################################
	// method to add new frames to the loop
	public void addFrame() {

		// stop loopLength from exceeding maxFrames
		if (loopLength < maxFrames - 1) {
			loopLength++;
		} else {
			loopLength = maxFrames - 1;
		}

		if (frameIndex < maxFrames - 1) {
			frameIndex++;
		} else {
			frameIndex = 0;
		}
		
		//print the position of the new frame in the loop
		System.out.println("Frame Index: " + frameIndex);
		
		//load and add pixels to the loop
		video.loadPixels();
		// fill array with pixel[] vals
		for (int i = 0; i < numPixels; i++) {
			loop[frameIndex][i] = video.pixels[i];
		}
		video.updatePixels();
	}
}

#/bin/sh
#Make a Gif from 3 frames from a movie
#Usage gifmaker.sh /path/to/movie.bla n  n /outputfile.bla
#ARGS $1=INPUT FILENAME $2=NUM FRAMES $3=START POS $4=OUTPUT FILENAME

#extract 3 .PNG files from source video
ffmpeg -i $1 -r 25 -vframes $2 -ss $3 $1-%03d.png

#convert .PNGs into single .GIFs
for FRAME in $(seq -f %03g $2)
do
   convert $1-$FRAME.png $1-$FRAME.gif
done

FWD=$(/bin/ls $1-*.gif)
BWD=$(echo "${FWD}" | sed 1d | sort -r | sed 1d)

#combine in gifsicle
gifsicle  --delay 4 --loopcount=0 --colors 256 $FWD $BWD > $4.gif

Networked Media – Piet Zwart Terminal Sessions

Sh script that enables you to output n number of frames as a gif from a timecoded position on a video file.


Images taken from comedy-horror classic Horror Express.


Inspired by Carsten Nicolai’s Grid Index and Moire Index, and the ambient dynamic screens of Brian Eno, I have been working on creating some generative animations based on simple sinewave manipulations. In this case, a sinewave algorithm manipulates the greyscale value of each pixel in the animation. A secondary sinewave algorithm manipulates the phase position of the first sinewave, as a result producing these very intricate repeat-patterns.

View the animation online here.

Read on for sourcecode
Continue reading ‘Generative Visuals’


Back in May, a realtime version of my audio/visual software Soundscape[Topology] was installed at In Flux Festival in Limerick, Ireland, hosted by Occupy Space. A disused new development in Limerick’s city centre became a makeshift gallery space, with various exhibitions curated by studios and gallery spaces from around Ireland and Europe taking place over six floors.

Project Statement:
Soundscape[Topology] is an interactive audio/visual artwork built in Processing. The piece makes use of a microphone, which records the ambient sounds of the room into the computer. The custom Processing sketch draws the waveforms of these sounds onto the screen as a three dimensional topology, in an attempt to draw attention to their physicality. Along with this, we see a direct relationship between the macro and the micro: the virtual sonic landscape has an uncanny resemblance to the forms and undulations of the physical topologies around us. From viewing this work, we can see sound as the characteristics of our environment: sinewaves produce low, rolling hill-like forms, while electronic man-made sounds produce more architectural and inorganic shapes.

Statement from Occupy Space:

Occupy Space are proud to present in_flux, a large scale alternative art fair exhibition which brings together ten artist-led project spaces from Ireland, UK and Europe. This temporary hub invites the public and art practitioners to engaging in a weekend of performances, screenings, exhibitions, art viewing and dialogue.

This project considers the model of artist-led spaces, which provide alternative frameworks for art practices and represent communities where ‘doing-it-yourself’ and experimentation are key activities. Artist-led spaces are vital, energetic elements of the visual art fabric of many cities. This exhibition, consisting of pop-up galleries from each artist-led space, makes reference to an non-traditional art-fair format in which non-profit artist-led spaces present exhibitions rather than commercial galleries striving to sell work.

Artist-led spaces participating in in_flux include:

126, Galway
Block T, Dublin
Transmission, Glasgow
Basement Project Space, Cork
Transition, London
Monster Truck, Dublin
Wolfart, Rotterdam
Catalyst, Belfast
SOMA, Waterford
1646, The Hague


Play with the sketch on openprocessing.

This project attempts to visualise the influence Facebook has on Europe’s population of internet users. The data is shown per country – the larger blue circle represents the percentage of the population with internet access, the inner white circle represents the Facebook penetration rate. If the two circles are almost the same size, this indicates that a large proportion of a country’s “online” population also use the social networking site – for example, Iceland, with a fraction under 95% of its population being connected to the internet, has Europe’s highest Facebook penetration rate of almost 61%. In the Netherlands, Poland, and others, Facebook loses out to popular national social networks (such as Hyves in the Netherlands).

There are no figures currently available for the number of Facebook users in The Vatican City (along with some of Europe’s other smallest nations), so questions about the existence of the personal Facebook accounts of Pope Benedict and his aides will have to remain unanswered for now.

The processing sketch makes use of Karsten Schmidt’s ToxicLibs.

Read on for the source code:
Continue reading ‘Data Visualisation: Facebook Users as a Proportion of Internet Users, Europe (2010)’


In the exhibition Cloudbusters the two artists search the boundaries of our beliefs, whether the practice is artistic or scientific, evidence of ‘the search’ is what we have for the moment.

For the last three weeks I have been working with curator John De Weerd and the rest of the team at TAG in Den Haag on the production of this show. I was delighted to be able to assist in the realisation of an ambitious and – in my opinion – very successful exhibition. Agnes Meyer-Brandis’ Cloud Core Scanner, Fluid Matter, and their associated documentation, along with Edwin Deen’s piece Liquid Rainbow and one of his collections of flourescent objects are on display until April 24th. Meyer-Brandis will perform her piece Making Clouds, or On the Absence of Weight on Sunday the 20th March at 19.00 at TAG.

For more information, please visit:
TAG
Agnes Meyer-Brandis website
Edwin Deen website
Review of the show on PeoplesForeignExchange blog


Realtime color manipulation from a webcam input using the Nes Colorizer Processing sketch. The footage is of the Stille Verkade in Den Haag.




Follow

Get every new post delivered to your Inbox.