This past week, SableRaph (Raphaël De Courville) posted a prompt of 📜 text adventure 💾 for his Weekly Creative Coding Challenge. I chose to interpret the prompt of text adventure as adventuring through the text of Edgar Allen Poe’s “The Raven”.

Description

With An Adventure Through The Text Of Edgar Allen Poe’s “The Raven”, a watcher-listener watches the most frequently used words in the raven appear on the canvas sequentially. The words are placed randomly across the canvas, around the outline of the raven. More frequently occurring words are displayed with larger font sizes. The code read’s the poem’s text aloud while words are placed. This exploratory work is meant to be viewed in full screen with sound on.

Thoughts on this Sketch

Intention and execution did not match! Instead of waxing poetic about intention, note what happens. The random placement of words visually disrupts the flow of the story, as does the censure of common words (and, a, the, etc.). The computer generated AI delivers each word so sporadically that the rhythmic qualities of a recitation of “The Raven” are also lost. In my eyes, there is more to do to capture the essence of “The Raven” and explore it in a manner that honors this poem.

Ideas for Future Improvements

  • Use the JavaScript Array forEach() (description below).
  • Use a smaller subset of words, perhaps the 50 most prevalent, so that the words can all be legible
  • Tighter & more efficient circle / rectangle packing. Look into packing algorithms, determine placement before draw loop. (This seems like it could use Operations Research!!!)
  • Time the placement of the next word with the spoken words, although perhaps not, because there are many more spoken words than written
  • Grow each word in size after it is placed, to it’s full size.
  • Figure word placement that highlights the drawn shape more precisely - perhaps a WordCloud Raven?

New Knowledge

Techniques

Libraries

  • p5.speech is a library that synthesizes as well as recognizes speech in p5js. It was used with An Adventure Through The Text Of Edgar Allen Poe’s “The Raven”
  • RiTa tools for natural language and generative writing yields impressive interaction.
  • Ink provides an easy way to make text adventures with nicely formatted output.