Saturday, January 30, 2016

Poetry and Code: Project Idea

One answer is that it might inspire you to write code.

While I was reading B. H Fairchild's "Hearing Parker for the First Time," for class, I began to absently squiggle lines across a piece of paper as I read. Essentially, there were products of my unconscious. But when I had seen what I had done, that got me to think: "How could you visualize poetry?" I recall the Mina Loy quote I had been familiarized with so many times while consulting the first syllabus: "Poetry is prose bewitched, a music made of visual thoughts, the sound of an idea.”  Is there something about poetry, as opposed to prose, that makes its music, its sound, inherently visual?

Novels are turned into movies all the time, and so are short stories. However, I wouldn't say that these are visualizations of the language, as much as adaptions of the events. In asking "how could you visualize poetry," I wanted to understand visualization in the same context as data visualization: making the some intangible aspect visually accessible, without adding or changing what was already there. The patterns that a graph might illuminate were already present in the data used to make that graph.

The intangible idea in poetry I want to try to get a program to visualize is the feeling of momentum."Hearing Parker for the First Time," for example, has an incredible sense of motion. B. H Faichild very cleverly slows the pacing of the poem through frequent commas and periods right up until "ornithology came winding up..."-- right until the speaker hears Parker for the first time. Then, in the third stanza, Fairchild doesn't use any punctuation, producing a gathering inertia right up until a reflection upon the narrator's own life, "farther from wheat fields and dry creek beds than I would ever travel..." then "being carried away."

So it's clear that punctuation plays a role in charting the course of a poem's pacing. But in order to visualize this, before actually writing any code, somehow a system has to be put into place, that breaks the role of each comma and period numerically. We, the human readers, naturally understand exactly how to pause our breath for individual punctuation marks, but computers won't. This too, is part of the question, how does poetry help programmer write better code. It might challenge you to express ideas in terms a computer can understand.

My initial idea, as illustrated below, was to model each individual word or punctuation mark as a series of lines with fixed length, each one beginning on the last's endpoint. A word would have slope one, a comma zero, and a period -9999, immediately followed by a line of slope zero.



There's a couple of things about this model I didn't like, though. For one thing, it looks blocky and inorganic. Another is that when we read poetry, pacing is more quadratic than linear; for me, it's only when a poet really carries the sentence past a critical mass that a feeling of increasing speed develops. Lastly, it doesn't take into account that some sentences are longer than others because they contain words with more syllables.

The revised idea was, instead of drawing a graph, tracing the motion of an object under a set of "physical" rules. It would go to the right a certain amount every second, and at the start of every second, a syllable would increase its y-axis upwards acceleration, a comma would set it to zero, and a period, line break, or ellipse would decrease it to varying degrees.




I plan to hopefully produce something that may be used as part of a public poetry project, so any program would take the form of a web app. I've seen a couple text parsers out there in Javascript that look promising (primarily for syllable counting) and might be able use a game framework such Phaser, to take advantage of the physics functionality built into those and other features that might extend the project. This blog post addressed the potential design of such a poetry visualization program on the most general level, but there are still a whole lot of things to think through, like, how would such a program accept user input, in what form the data from the poem should be stored in after being parsed for syllables and punctuation (dictionary? array?), making it so any framework used is able to read in the data to affect the motion of a game object, and so on. Stay tuned to see if this goes anywhere.

Some questions: do you think poetry should or can be visualized by programs? If so, any suggestions on improving the model described?

Tuesday, January 19, 2016

In This Box




I can’t fit this poem in this box
I ask an old friend to do it for me


I can’t fit this poem in this box
Though I can do many other things


I can’t fit this poem in this box
I let the edges spill over


I can’t fit this poem in this box
Another poem might work better. Or maybe not.


I can’t fit this poem in this box
But I will fit this song


I can’t fit this poem in this box
I’ll set it on the top


I can’t fit this poem in this box
A bigger box will do


I can’t fit this poem in this box
I will fit it in this urn

Click here for the Audio version