I recently received an email asking about how to pass arguments when launching a processing sketch from the command line. I hadn’t ever done such a thing, but after some poking came up with an easy, though not exactly robust, solution. This example sets the value of the r, g, and b variables and uses them to set the background color.

The main method just clones the array of arguments into a “global” variable of the sketch. That variable needs to be declared static so it can be accessed by the main method, which is also static. Also, make sure that the string in PApplet.main(new String[] { "passing_arguments" }); matches the name of your sketch. Next, just parse the array of arguments like you would anything else inside setup. It’s a good idea to make sure that you have any arguments at all (by checking for != null) and that you’ve got the number of arguments you expect.

Next you export the sketch (File > Export) then you can execute the .jar file from the command line using: java -jar passing_arguments.jar 255 255 1 where passing_arguments.jar is the name of the jar file, and 255 255 1 are the values you want to use for the r, g, and b variables.

If you need something more robust, or need to use named switches, check out this article on using the Apache Commons CLI Library.

Week End (mise-en-scène) is a triptych of images generated using scenes from Godard’s film Week End. Each image was created through an accumulation of colors from frames of the film, where each point in the final image shows the average color value for that point over the course of the set of frames.

The first image was made using frames from the “Analysis” scene, in which one of the main characters, Corinne, wearing only bra and panties, retells a story of a sexual encounter while siting on a desk talking to an unnamed fully clothed man.

The second image combines every frame of title text and the interstitial text used to cut the narrative.

The third image was created from the frames of the famous traffic scene, a single long tracking shot depicting a traffic jam punctuated by a horrible accident.

Once again I’m teaching a 4 day intensive workshop on Processing at Machine Project. The course starts on Feb. 14 and runs for 2 weeks. It will provide a good introduction and covers everything from the basics of the IDE up to libraries and media. No prior programming experience necessary (though it always helps).
For more info check out the course page.

Starting this Saturday, I’m teaching a 4 day intensive workshop on Processing at Machine Project. The course is designed to be a good introduction and covers everything from the basics of the IDE up to libraries and media. No prior programming experience necessary (though it always helps).
For more info check out the course page.

Faces was a short film created as a backdrop for Hecuba’s performance at the screening of dublab’s Vision Version series. Working with Jon and Isabelle (Hecuba), we considered that the performance and screening was being held at the Silent Movie Theater in Los Angeles, so we decided to create a piece to highlight our experience of LA, celebratory but dreamy, filled with chance encounters with friends and acquaintances but soon fading from memory. Memory, we decided, begins to fade with the faces. Faces of people we hardly know, or know so well we think them rather than see them, quickly disappear. We don’t remember the gamut of expressions that moved across our friends’ faces one night. We remember an average, the extremes, how moods changed, and maybe extrapolate from there what the faces must have looked like.

From here it was easy, we needed to remove the faces from the clips of a night out. But just as remembering is faulty and inconsistent, so is forgetting. So using custom software built using face detection algorithms, we blindly processed the video, and replaced all the faces found in the video with the average the color from the surrounding area. The result was imperfect, fractured and unpredictable, somewhat like memory.