Programming A2Z - Week 9

Markov Chains

Feeling newly invigorated to make strange things happen with code and text after a visit from my friend Annelyse Gelman last week. Annelyse is a poet, and her newest book Vexations won the 2022 James Laughlin Award from the American Academy of Poets. I'm very proud of her and lucky to be her friend!

Annelyse kindly–and excitedly–gave me permission to take the text of Vexations and experiment with it for this class, which I hope to do a few more times in the coming weeks. I figured it'd be a great candidate for experimenting with Markov chains because it's a book-length poem. There are themes that run throughout, and probably just as many unique words in it as there are ones that appear and then reappear, again and again.

Annelyse conceived of Vexations as an accompaniment to the Erik Satie piece of the same name–more on that later. Turn on the song (meant to be played very slowly, 840 times in a row) to have it in the background.

At first, with the example p5 Markov sketch set up to take an ngram length of 4 and return 280 characters, all I was getting back were complete lines from the poem. While randomly surfacing lines from a poem is interesting in its own right, I wanted to start seeing results that felt as though Annelyse could have written them. Tweaking the variables, numbers noted below, got closer to recombining things in a way that felt interesting:

(1, 140)

In front of it in the imprint of a form of the grass, rain came up and failures of the world, after the liquid in blankets at the goggles A pigeon participated in neat rows like a child and inspected it back to things A major adverse event buried the toothpaste was around in alleyways

And lifted her watch was hard to adventure and laughed when I fell absolutely lovely in screens made her prodromes Deploying the side

We punish by rote, it in her watch videos of a fact

A reticular glitch made my expression harsh in the bottom of alterity

—You had preparedness plans Over the dirt like legs like a window in the base Of the wristband—just as, for Hotel

Colonies popped out Daughter crawled under the entire world was squeezing the possum wouldn’t stop going on fire alarm

Chartreuse and hairs and bent To throw you touched you couldn’t tell me, I said daughter while a star onto my arms Meals arrived on her instant like fissile material The community

Not otherwise specified, said Hank with a world passed from radiation They made me and scooped up and I sang How I asked for processing, I wanted to orchids

—I want to be another wind burned She languors and a hand on it, groping

She used to do with it go? said daughter put the pipes, I deserved my predecessors, I put sharp and examine them for meetings They killed the high on a rope around her sleep like a skyscraper blotting out of the keepers of his own purpose? said daughter, I said daughter was difficult lesson

(1, 500)

I wrung out attribution to be with cables around in midair, went the shade

Dress shirt sleeves on submission You should have made abstract And I suffered from surplus

Hank pressed our purity and shifted into her bare feet, leaving viscous, odoriferous trails . . . . . . . Sunlight made me think of them into a sunburn in the subway got fat and so the scent of history on metrics across a single thread from radiation They snapped on the highway we used to do with our legs rigid, five or six rounds and signed them on chain and the backs of the remedy could scratch you in clear-cut woods mimicked heavy machinery

We watched a light or the blue paper, I said mane, I just plagiarize, it only origins

It was a woman’s cheeks Creamy as you couldn’t create, you learned to be drilled

There was the situation, trying to thrive on a shoebox full of donated blood Stopped for agency, half Delicate new hospital was a light into her eyeball-to-eyeball, she lipped the corn, it was impossible To obtain pain was like flames in the moon but then moot

Over the pony mask was the saying vowels while I squinted out their heads, that’s what to do you choose between freedom and then the sun and then my body in the liquid in the dirt like mushrooms

Does critique belong to the first I suffered from their faces on the matted mass evacuations

Beings decomposed and set a lemon Shriveled on a basin Swirled like old reality had orgasms

Four thick slug of orbs and wave on a yoga studio People felt naked like legs of death As you feel, daughter, I the numbers concluded, I went the saying Who sings least liked member of alterity

[Closing thought: what about taking Satie's "Vexations" and performing a similar process, randomizing the order of chords while trying to preserve the feel of the original piece of music?]