I’ll be performing my piece John Henry von Neumann at Machine Project from 10-6 on Sunday June 28th. Come watch me compete against a computer to complete a drawing in an eight-hour workday. I will use pen and paper while the computer uses a plotter. More info on the Machine Project site.

simulator

I’m teaching a 4 day intensive workshop on iPhone development at Machine Project. The course is designed to be a good introduction to Xcode, Objective-C and making real-world applications for the AppStore. We won’t cover the basics of programming, so some programming experience is required.

The workshop starts July 5th and meets 4 times. For more info check out the course page.

A few of my students have run into an issue where the right speaker is distorted when playing audio through Minim or Sonia. After much googling we found a somewhat convoluted solution:

1) Go to Applications / Utilities and open Audio MIDI Setup.

audiomidisetupicon

2) In the drop-down labeled “Properties For” choose “Built-in Line Output.”

audiomidisetup1

3) Under “Audio Output,” set the format to “44100.0 Hz.”

audiomidisetup2

4) Quit Audio MIDI Setup and restart Processing.

A student in my Programming Media II class wanted to use some text-to-speech for a project, so I created a processing library that is a light wrapper around Apple’s Java API for accessing the speech engine. The library allows you to set the current voice and speak away. Of course, its mac only.

You can get the library from the project page and you can download the eclipse project for the library from github.

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.