NaNoGenMo / 2016

National Novel Generation Month, 2016 edition.
https://nanogenmo.github.io
162 stars 7 forks source link

Entry: Live coding a novel #16

Open nhthn opened 7 years ago

nhthn commented 7 years ago

Live coding a novel would be accomplished by having an algorithm spit out words in real time while being continually modified by the novelist.

The word speed is important. If it's too fast, the novel will develop too gradually and the product will be boring. If it's too slow, it will take too much of my time to complete. At a constant rate of 4 words per second (which is pretty fast, honestly), I can produce 57600 words in 4 hours, which seems like a reasonable amount of time especially when broken into sessions.

mewo2 commented 7 years ago

This sounds incredible! I hope you record some of your live coding sessions.

For ideas about MIDI controls and similar, you might want to look at Allison Parrish's work with interfaces for text generation.

danhett commented 7 years ago

As a performing livecoder (with the Algorave movement) and a participant in this contest, I find this SUPER appealing. Watching with interest. :)

nhthn commented 7 years ago

I'd like my coding environment to focus on the creation of conversations between characters. Dialogue is most important, but I hope to get to actions and multiple locations if I have time. I'd be satisfied with a novel that's just four people chatting over lunch, and every so often someome takes a bite out of their hamburger.

The live algorithms control the "brain" of each major character. I'll need to decide upon what kind of conversational algorithms I want to use, and I would much appreciate some suggestions in this direction!

A big step is setting up my coding interface. The popular musical live coding setups (SuperCollider, Sonic Pi, Tidal) generally involve editing a source file and selectively running parts of it. I like this, but I have a different idea — each character is a single Python source file, and a server watches for changes and reloads. Each source file imports a pre-made library that gives me a toolbox for programming character behavior. I'll have a window open for each character so I can jump around and change anyone's personality at any point.

I'm not convinced that live video streams or recordings are worth doing. It works for music and visuals, but watching text scroll by is much more boring by comparison. Instead, it would be cool to save the entire code history along with the novel. A web page containing the final product would allow the reader to see what the code looked like at any point.

mewo2 commented 7 years ago

One option for jazzing up a recording or video stream would be to pipe the generator through a text-to-speech program. That would also give audio feedback on your changes, which might be helpful if your eyes are busy elsewhere.