PoemBox

PoemBox is a large-scale projection piece I created, employing the Asterisk phone capability, Node.js/sockets, Ruby and Max/Jitter and Syphon. Actors move as silhouettes, inspired by the poems they have read and recorded, which can be heard by calling the Poetry! number and pressing a key from 1-6. Their video silhouettes appear in the grid of six windows and turn on and off according to users’ keypress selections. (Max/Jitter patch to play videos was contributed by my project partner, but all connectivity programming from phone to asterisk to Max/Jitter, conception, direction, and video was my work.)

Eventually, I would like this project to evolve into a kind of poem jukebox, but this would probably involve moving the project out of Asterisk and into a standalone phone app.

PoemBox turned out to be a substantial connections exercise.


As the project reached a midpoint, (after I had completed recording the acting and video work and had begun assembling the pieces), my Asterisk server was compromised, which required a revamped server and Asterisk instance, resulting in 4 installations, to get back to an Asterisk that worked (even using disk images). I also needed a new free-calling number (post-hack, the old one did not work), and had rewrite the Asterisk dialplan, which I may have had to do anyway.


For the networking piece of this project, I had investigated numerous solutions offered to me: Processing, OSC, shell to Tinyphone, shell to …. etc..

However, in this project, several elements brought particular challenges:

(1) Asterisk–could not stream video at the time of this project’s creation. It sat on a Linux server, so I could not use with Max/Jitter on my Linux server; I wanted to be able to play the poems through the phone;

(2) I needed a persistent connection on a port from and to the node server, but the objects I researched were not available in Max.

Most prominently the tcpClient object, although it could initiate a persistent connection, the receive data function necessary for the two-way communication was not implemented. (When I contacted the developer about this, he told me he had stopped working on it a year ago, and that he did “not really know java”; the net.tcp.recv object does maintain a persistent connection, however, it cannot initiate a connection (to any kind of server, remote or local). The “proxy” server role played by maxruby.rb enabled this connection to be established, and data/keypresses forwarded successfully to the net.tcp.recv object, sitting, as it does, on the same machine as Max on the same network.

I proceeded with a series of tests at various points, adding and subtracting items as necessary. I will more fully describe this in a later post along with a diagram of the messaging flow and a link to the code in github. There are small revisions needed to two of the recordings. To expand this project, eventually, we would like to create a database of poems and videos.

The poems in this initial version include: “Eastern”, excerpt-David Bowman, “Uptick,” John Ashbery, “Thanks,” W.S. Merwin, “We Grow Accustomed to the Dark,” Emily Dickinson, “Legacy,” Amiri Baraka, and “The Hydra,” W.S. Merwin.

STARTUP

(1) Run Asterisk


(2) Run the Maxruby.rb file on the local computer where the Max/Jitter PoemBox patch resides.


(3) Run Node.js

(4) Call the Poetry! number: 206-456-1794

The messaging flow once the call has been made is as follows:

(1) The call activates the Asterisk Dialplan, which contains a a Ruby script that takes a keypress from the phone to a simple node server (poemnode.js–a simplified version of Chris Kairalla’s Tinyphone server) on a cloud server where Asterisk also lives.

(2) The Maxruby.rb file on the local machine where Max/Jitter patch lives connects to the node server on Rackspace through a persistent connection and takes the keypress.

(3) Maxruby.rb sends the keypress to the Max/Jitter patch, which receives it via the net.tcp.recv object. The recieved keypress activates a bang from a select object and plays the poem’s associated video.

Here is a clip of the bang which activates an associated video, resulting from a keypress (the yellowed circle n the static graphic on the right shows a successful connection: