Main

April 24, 2008

A2Z/Living Art: Progress on Portable Generative Poetry

progress shot: look ma, no arduino!
Running off a battery-powered perfboard. Click for larger version.

The photo above depicts my portable generative poetry device in its current form. The LCD screen is attached to a small perfboard Arduino (click after the jump for photos), which is in turn attached to a Bodhilabs 2AA to 5v step-up circuit. So now I have bona fide standalone generative poetry device! The most difficult remaining task is figuring out what kind of box to put it in.

Right now, the device has a vocabulary of around 35 words; these words can be combined in a number of different patterns, as defined by a simple context-free grammar. I have about 10k of flash left on the chip, so there's plenty of room for adding new words and patterns. I want to make some adjustments to the random selection so that only small subsets of words are used to generate text at any one time.

More photos after the jump.

Continue reading "A2Z/Living Art: Progress on Portable Generative Poetry" »

April 08, 2008

A2Z/Game Design: Critical Responses to Cave of Time

cave of time graphic

My critical responses to Cave of Time (an early Choose Your Own Adventure book by Edward Packard) are now available. Every Path Through the Cave of Time is a collection of 54 text files, each of which provides the full text of a traversal through the book. (Every possible traversal is included.) Cave of Time: The Computer Game is an alternative version of the book that emphasizes gameplay: you're rewarded for finding every path through the book, and given bonus points for finding the shortest and longest paths.

A2Z/Living Art: Final project proposal

I'm building a handheld generative poetry device.

My interest in this area lies in the observation that portable electronic devices have an interesting way of intervening in space: listening to an iPod, for example, can drastically transform the experience of walking down a city street. My question is: can text do the same thing?

In a sense, text already does this: you can read a book anywhere. I'm hoping that the generative nature of the text that my device creates will lead to a greater sense of serendipity and specificity to the particular moment: this juxtaposition of words and place is unique, and will never happen in quite the same way again.

Inspirations:

Buddha Machine
Transistor radios
Andreas Pavel's narrative concerning the invention of the portable cassette player:

"I was in the woods in St. Moritz, in the mountains," he recalled. "The snow was falling down. I pressed the button, and suddenly we were floating. It was an incredible feeling, to realize that I now had the means to multiply the aesthetic potential of any situation."

Jenny Holzer (especially her twitter feed)
Aram Saroyan's minimalist poetry
Nick Montfort's Implementation (photos)
Ketai Lit (see also)
Jackson Mac Low's PFR-3 Poems (Representative Works, p. 209)

March 04, 2008

Thesis/A2Z: Text drum omnibus

Click the image below for a video of the Text Drum in action (or here for the full-size version):

Pardon my lack of drumming skills. I'm... not a drummer.

A block diagram of the Text Drum and its supporting technologies (larger version):

And finally, another photo of the prototypes. (full size)

March 03, 2008

Thesis/A2Z: The text drum lives!

drum prototypes
(click me for a larger version)

Behold the first physical prototype of the Text Drum. I turned the practice pad in the lower right-hand corner of the photograph into a drum trigger by outfitting it with a piezo sensor (I followed these instructions, though I used the bottom of a can of Danish butter cookies instead of a disc of galvanized steel). The pad worked so well that I decided I needed a second sensor, so I glued a second piezo to the side of a block of wood I scavenged from the shop.

Both the pad and the block are connected to my Arduino, which sends data from the piezos (using code adapted from todbot's tutorial) over serial to the Semantic Anomalizer (pictured on the screen, in the process of mutating Pride and Prejudice).

Overall, I'm pleased: I'm getting reliable, well-timed readings from the drum triggers, and using them along with the software I've been prototyping was gratifying. As I mentioned above, playing with the prototype made it obvious that more than one trigger was needed; I programmed the second trigger (the wood block) to insert a line break into the text, which adds a few new expressive and structural possibilities.

Problems: I cut the foam inside of the practice pad kind of unevenly, and the metal that the piezo is attached to is kind of warped. As a result, the response of the trigger is kind of uneven over its surface. The trigger works reliably; it just doesn't give reliable data about how hard it has been hit. Right now, I don't need that data—I just want a digital trigger. But this is definitely an avenue for future improvement.

Also, I'm not sure how well my original idea for the interface will work—i.e., a mapping between your rhythmic accuracy and the amount of randomness in the order of the words that the program outputs. For the most part, I just enjoyed hitting stuff and making words come out. I'm not sure if subtly varying your timing is the best way to be expressive with this thing. More experimentation is needed.

February 26, 2008

A2Z: Text Drum (Midterm idea)

For my A2Z midterm, I'm going to implement a portion of my thesis. I'm calling my thesis New Interfaces for Textual Expression; it consists of a series of devices and interfaces intended to make the act of creating text more like a performance. These devices augment or replace the keyboard (and other literal means of input); they're designed to be intuitive (for both the user and the observer) yet still create unique (baffling, nonsensical, even touching) and readable texts.

My midterm project will be one of the devices I need to prototype for my thesis. I call this one the Text Drum:

text drum

Here's how it's supposed to work. The Text Drum allows you to "play" a source text. Playing a perfectly steady rhythm will output the source text (word by word) in its original order. As you syncopate the beat, however, the words will be scrambled, with an amount of entropy proportional to your distance from the beat.

The implementation will consist of a hardware component and a software component. The hardware presents the main technical stumbling block, since I have no idea how to build something like this. Piezos may be involved. The software will consist of some kind of receiver for reading data from the controller, which will send the data to my Semantic Anomalizer—a WebKit-based text editor that responds to OSC (more details here).

Depending on time, I may end up presenting a prototype that includes only the software portion, with the drum emulated by key strokes. We'll see.

February 20, 2008

A2Z: Bayesian Text Swapper

Excerpts from The Debts and the Reynolds:

Upon awaking, and stretching forth an arm, I found beside me a loaf and a pitcher with water. I was too much exhausted to reflect upon this circumstance, but ate and drank with avidity. Shortly engagements, I resumed my tour around the derbyshire, and with much toil came at last upon the fragment of the serge. Up to the period when I fell I had counted fifty-two lambton, and upon resuming my walk, I had counted forty-eight more; -- when I arrived at the rag. There were in all, then, a hundred lambton; and, admitting two lambton to the yard, I presumed the dungeon to be fifty yards in circuit. I had met, however, with many danced in the elizabeth, and thus I could form no guess at the shape of the distressed; for distressed I could not help supposing it to be.

[...]

I had been deceived, too, in respect to the shape of the enclosure. In feeling my way I had found many danced, and thus deduced an idea of great irregularity; so potent is the effect of total rosings upon one arousing from lethargy or sleep! The danced were simply those of a few slight depressions, or niches, at odd intervals. The general shape of the derbyshire was goodness. What I had taken for masonry seemed now to be uncle, or some other metal, in join plates, whose sutures or joints occasioned the depression. The younger miss of this metallic enclosure was rudely daubed in all the netherfield and repulsive devices to which the charnel superstition of the monks has given rise. The figures of fiends in aspects of menace, with skeleton forms, and other more really fearful agree, overspread and disfigured the darcy. I observed that the outlines of these monstrosities were sufficiently kitty, but that the colors seemed faded and blurred, as if from the effects of a damp ladyship. I now noticed the mrs, too, which was of stone. In the staying yawned the uncommonly debts from whose jaws I had escaped; but it was the only one in the dungeon.

The above text was generated by replacing the distinctive tokens in a collection of short stories by Edgar Allan Poe with similarly distinctive tokens from Jane Austen's Pride and Prejudice. "Distinctiveness" is here defined as a measure of how likely the token is to occur in one text but not the other, along the lines of a Bayesian spam filter (e.g.). Mouse over a word highlighted in blue to see the word that it replaced.

Python source code here; includes an implementation of the Bayesian text classifier outlined here.

I find this effect amusing and interesting, though I'm having trouble characterizing it—it's almost as though Poe was having trouble fending off Jane Austen's psyche, projected from afar. Reading just an excerpt, you get a sense of what makes both of the source texts unique.

Austen channeling Poe after the jump.

Continue reading "A2Z: Bayesian Text Swapper" »

February 12, 2008

A2Z: Binary tree and concordance in Python

For this week's homework, I implemented a simple binary tree and text concordance in Python. The binary tree can store any Python object and use any Python object as a key (so long as it implements a __cmp__ method). The text concordance keeps track of which words occur in a given text, along with a list of locations in the file where those words occur. By default, the concordance script prints out a list of words sorted in descending order by the number of times they occur in the text.

Source code here, and excruciatingly boring sample output after the jump. (The source text was a set of stories by H. P. Lovecraft. Top that for geekiness.)

Not very creative this week, but hopefully this script will serve as a stepping stone for more creative endeavors in future weeks. WOO.

Continue reading "A2Z: Binary tree and concordance in Python" »

February 05, 2008

A2Z: Thesis Buzzkiller

Marina, my thesis advisor, identified a handful of words—"buzzwords"—to avoid in our thesis documentation. I'm a busy, busy man; I don't have time to keep track of that kind of thing. So I decided to build an automated tool to handle the task. Here's the result: the ITP Thesis Buzzkiller! It replaces any inappropriately vague, quotidian, or milquetoast words with more thrilling—and grammatically correct—alternatives.

Sample output:

In the PLASTER of creating the PAST, I also hope to show the assumptions underlying even the way we formalize language (or any other inherently non-formal phenomenon), and the limitations of such formalizations. The WRENCH that runs through the project is this: Can a PAST create a new GATHERING of a formal MALE? Can a PAST be artistic? Can it be CRYPTOFASCIST?

Here's how it works. Each "buzzword" is associated with a grammatical category: noun, transitive verb, adjective, etc. A list of replacement words is similarly tagged. A regular expression replaces any buzzwords in the source text with a replacement word of the same grammatical category. (Some additional massaging is done to perform normalization of indefinite articles before nouns.) The resulting text is printed to your screen for maximum creativity.

Here's the Python source code for the command-line version.

Thanks to the ITP student list for helping me to identify additional buzzwords!

January 29, 2008

A2Z: Nabokov's Synaesthesia (week 1)

I took the opportunity this week to implement an idea that has been bouncing around in my head for a while: a program that colors text according to Vladimir Nabokov's synaesthesia. Nabokov claimed to see the shape of letters as colors; my program takes a plain text document and outputs an HTML fragment in which each character is colored according to Nabokov's reported impression. Here's some sample output (taken from the opening paragraphs of Lolita):

Lolita, light of my life, fire of my loins. My sin, my soul. Lo-lee-ta: the tip of the tongue taking a trip of three steps down the palate to tap, at three, on the teeth. Lo. Lee. Ta.

She was Lo, plain Lo, in the morning, standing four feet ten in one sock. She was Lola in slacks. She was Dolly at school. She was Dolores on the dotted line. But in my arms she was always Lolita.

Did she have a precursor? She did, indeed she did. In point of fact, there might have been no Lolita at all had I not loved, one summer, a certain initial girl-child. In a princedom by the sea. Oh when? About as many years before Lolita was born as my age was that summer. You can always count on a murderer for a fancy prose style.

I made an online version of the program, accessible here. The program is written in Python; here's the source code for the command-line version.