The Coding Weasel

Tuesday, March 06, 2007

a theatrical open-source story, part one.

In what I laughingly refer to as "my spare time" I do lighting and sound for an amateur theatre company. The current play (plug: come see it - it's really, really good) has some fairly major tech behind it - particularly for a small amateur theatre (i.e. a miniscule budget).

The requirements include:
  • dual projectors behind stage, showing around 150 slides during the course of the show
  • a camera on stage at various points, going to the projectors. These then get news overlays on screen to make it look like a live news conference. The projectors are behind the screens, so the video needs to be flipped left-to-right.
  • a couple of dozen pieces of music to be played at various points - this needs to fade in and out cleanly.


I'm also operating the lighting desk while I do this, so whatever I do has to be incredibly easy to operate. Requiring me to use the mouse is just right out.

Oh, and of course I shouldn't forget that I really only had one or two evenings to put something together. The choice of hardware was pretty easy - clearly I'm going to need a couple of PCs - one backstage with the camera and the projectors, connected by wireless to a laptop in the lighting box running the whole show (and outputting audio to the sound system when needed). I grabbed a cheapo wireless card and a Radeon 9550 (with a DVI-to-VGA convertor, I get the two VGA outs that I need) for a spare desktop I had lying around and dropped a fresh install of Ubuntu Edgy on it.

Software - well, clearly this calls for some one-off custom software. Again, my choices were pretty easy. Python (duh), pygtk for the UI, gstreamer for the audio and video, and twisted to tie things together. Things like callLater and deferreds just make stuff too damn easy.

So how did I do? Well, here's a quick sampler (click the image for a larger version). I'll talk about it in more detail in a subsequent post. This was the result of a single Sunday evening's intense hacking, followed by a few hours over a couple of nights tweaking things after using it. All up, it's under 600 lines of code, plus a few tiny shell scripts.

Labels: , , ,

5 Comments:

Anonymous Anonymous said...

Hm, writing software with a "Kill children" button might raise some eyebrows outside programmer circles. ;-)

1:35 AM  
Blogger Stephen Thorne said...

I saw the "Kill Children" button too, and i was immediately thinking, "Wow, that'd be a great idea for some of the shows i've been to see...."

11:26 AM  
Blogger anthony said...

Maybe (ala WC Fields) it should have said "Kill Children or Animals". The button is actually due to some strange twisted interaction where sub-processes are being left lying around, causing breakage. Given the timeframe I had, diving deep into the reactor wasn't a practical course of action, hence the brutal "hit it with a half-brick" approach.

11:33 AM  
Anonymous Anonymous said...

I'm curious why you've gone with full-on interactivity rather than a script and a "Next" trigger (and maybe a "Whoops, back" button).

12:17 AM  
Anonymous open source developer said...

Great concept! I entirely concur with the perspective. You have augmented my area of information. I like website thanks for the great post!

9:14 PM  

Post a Comment

<< Home