Massaging Media Processing Workshop

Presentation Slides

[SlideShare embed]

PDF download

Examples Download

I’ve been working on creating a set of stupidly simple examples for Processing — even simpler than the ones that come with Processing itself. The idea is to put as little as humanly possible in them, so that you can demonstrate the basics of programming with code examples, even in very short workshops for people who may not have any programming experience (and I mean really short — what if you want to show something in 5 minutes?)

Download the sample files:

Simple Examples 0.01 [ZIP archive for Processing 0135]

Consider this an early preview, and I welcome feedback. Major thanks to Ben Fry for some of the inspiration about how to go about this.

Must-Have Processing Libraries for Multimedia

To a beginning Processing user, the libraries section of the Processing site can cause a "kid in the candy store" effect. I actually recommend going a little easy, working with one library at a time. But, at the same time, working with libraries really is essential to working with Processing, because Processing "core" is kept as conservative as possible. This is especially true if you’re working with multimedia. Here are the libraries I recommend for specific multimedia applications, as a starting point:

Tablets + Processing: Now on Mac, Too

There’s been a lot of interest in using tablets with Processing, for obvious reasons — it allows Processing to be a real-time graphics tool (or graphics for generating audio, or whatever it is you want). And Wacom tablets are cheap, high-resolution inputs. The superb SuperDraw project works with tablet input.

Unfortunately, the best library for tablets has been Windows-only (works with any Java app and — very nice — with applets in a browser):

JTablet

Now, there’s a Mac alternative, which eventually will wrap JTablet on Windows so you can deploy across platforms:

libTablet 0.1

The wonderful Marcus Wendt put this together — thanks! Let me know how it goes.

New Library: OpenSoundControl with Processing

Jesse Kriss, who built MaxLink for embedding Processing sketches in Max/MSP/Jitter or communicating between Processing and Max, has a new library called EasyOSC. It uses the OpenSoundControl protocol, which is useful for communicating between apps, computers, and some hardware (like the Monome).

What’s great about it is how easy it is to communicate with other software — ideal if you’re using Processing alongside a sound tool like Reaktor or (in Jesse’s case) ChucK, or with multiple computers running.

http://jklabs.net/easyosc/

You use simple syntax like osc.send("values", values) to transmit data.

Audiovisualists, this should help your mayhem across media. If I come up with some examples, I’ll post them to CDM, perhaps with a basic tutorial for those unfamiliar with how OSC works (and there are some tricks to it in other languages).

How to Read Your Email with the JavaMail API, Starring Gmail IMAP

Computer musicians are often accused of looking like they’re checking their email when they’re playing. (Occasionally, I have seen someone doing just that!) But I wanted to experiment with playing music by checking my email. Java is an easy way to do that; with the free JavaMail API (part of the Java platform), you can access just about any IMAP or POP account, even a secure one, like Gmail.

What you need

JavaMail API (part of the enterprise Java platform, but available for free to desktop Java users as well)

Get the download, refer to the JavaDocs for reference (note that if you’re not using Java 6, there’s an extra support download for the "JavaBeans Activation Framework" — don’t actually need to know what it does, but you will need it with earlier Java versions)

jGuru: Fundamentals of the JavaMail API: A decent step-by-step tutorial, though you may want to compare it to some of the sample code (installed to the "demo" folder when you install JavaMail) to see how this fits together in a completed example.

Connecting to your favorite email provider

The JavaMail API FAQ specifically addresses Gmail and Yahoo! Mail.

IMAP is more fun, because it allows access to folders other than the inbox. To connect to Gmail IMAP, you need to use the "imaps" protocol for a secure SSL connection, rather than plain "imap".

Accessing folders is a little wonky in Gmail. Aside from the Inbox, labels and folders are accessed like this: store.getFolder("[Gmail]/Spam").

Examples

It takes just a few lines to connect and retrieve some basic information about messages. I’ll post code examples soon.

It’s helpful to know something about the java.util.Date class. Specifically, if you want to compare sent dates or otherwise manipulate time, first use message.getSentDate(), then take that date information and use getTime() to translate into milliseconds.

Processing Class Outline

I’ll be posting class notes for my Processing intro at New York’s Harvestworks online. Based on student feedback about what interests people, here’s the breakdown for the three classes.

Week One

What’s Processing?

A little bit of history

Processing is Java

How is Processing different from things that aren’t Processing?

Hello, world, Processing style

Install Processing, Java

Draw "hello"

Say "hello"

Processing syntax

Using the IDE

Using help and documentation

Putting stuff on the screen

Coordinates

Drawing

Color

3D coordinates

Textures

Load an image

Load a video

What next

Where to find inspiration

Where to find libraries

Where to find code