« December 2006 | Main | February 2007 »

January 28, 2007

Nature of Code: Week 1

squeaky the mouse

Click on the image above to check out Squeaky, the lovable virtual mouse! This was my homework for week one of The Nature of Code. "Torus mode" means that when Squeaky reaches one side of the applet, he'll reappear on the opposite side (this gives him a little more leeway when he starts to sprint).

The assignment was to "find an example of real-world 'natural' motion" and mimic it using "controlled randomness." Squeaky uses two Perlin noise values to control direction and another Perlin noise value to control speed. The speed, however, is separated into three tiers: virtually still, slow, and lightning quick. I was hoping to replicate the way that rodents will stay motionless for a while, maybe wander around a bit, and then break into a run. Sort of a nervous movement.

My real-life examples of "real-world motion" were taken from Google Video and YouTube:

I'm happy with the way Squeaky moves, and I think the animation works well when he breaks into a run. Two future improvements: first, I need more frames of animation for when Squeaky is moving slowly or standing still. Second, Squeaky needs to learn how to turn when he reaches the wall, instead of trying to run through it.

January 25, 2007

Listen Far, Listen Close

Assignment 1: Listen Far

Adam is cold

Hudson Park is a little patch of green and beach around the corner from my apartment building. It overlooks Long Island Sound. Earlier today I walked down there, clambered up a big ice-age era boulder, picked a spot where there were no dessicated Canadian goose leavings, and listened. Above is a photograph of me listening, and being cold.

There was a lot to listen to. Gentle waves were breaking on the beach. A woman walked past with her dog on a leash; her footfalls were surprisingly loud and click-clacky. As she exited the park, her dog barked at something. Occasionally, a gull called, and there were a few chirps from smaller birds that really should be south for the winter by now. There were some people working on the roof of a nearby house (you can see it in the panorama below in the right-most frame); I could hear their hammering and jabbering loud and clear.

Hudson Park panorama
Crappy cell phone panorama of Hudson Park: Click to get a bigger version

Then I tried to listen further. The wind was whistling through the trees all around me. There was a distant rumble, which I think probably came from I-95, maybe a mile and a half north. Even further: the sound of the wind moving between my beard and my coat. The resonance of the cavity created by my ear, partially covered by the edge of my hat.

(More after the jump, including Assignment #2)

Pauline Oliveros talks of "quantum listening," which I understand as meaning that we're part of what we're listening to. The entire process of listening, in fact, is just an analysis of what we hear: it's an observation not just of the environment, but also of ourselves. (Linguists call this same phenomenon the observer's paradox. It all goes back to Schrodinger's Cat.)

Oliveros seems to want to use this insight as a means of gaining some kind of enlightenment (or, at least, sell a bunch of new age albums). I don't know about that, but there was a moment when I kind of "listened past" my logical expectations of what I was hearing: everything seemed to be one note. Which is to say: all the noises, briefly, seemed to be the same noise.

Assignment 2: Listen Close

Hello, Coffee

I made some coffee. (This is my girlfriend's coffee machine, by the way.) I guess my schematic idea of the sound of a coffee machine is that it blurps and blurbles, squirts and squishes, all in a fairly rhythmic way. What surprised me, upon the close listen, was that there was a strongly compositional quality to the brewing process. It starts out kind of quiet, but regularly rhythmic, presumably as the water begins to boil and push up and over into the filter chamber. Then the steam starts to escape in big gulps and breaths, joined by the trickle of the coffee. A minute or two passes like this, until finally all you hear is the squishy sound of the last of the water passing through the grounds, which gradually fades to silence.

It was kind of entrancing. I'm being serious. I'm beginning to wonder if there's an engineer at Sanyo that specializes in "composing" the sound of brewing process. (Or if I'm just given to apophenia.)