A Raspberry Pi based intermission/announce device for theater



A few times a year I volunteer to an arts organization and serve as their “house sound and light guy”.  When they bring in shows for their yearly concert series, I’m the guy that helps the artists set up and get situated.  I usually run sound and do the lights for them if they don’t have a tech that travels with them.   The auditorium is in Staples Minnesota – a very rural area, but even so, we try to host a “professional quality” event for the concert goers and the artists.  That means for me, lots of small details that need to be attended to.  Details such as pre-show and intermission music in the lobby area as people are waiting for the show to start make a big difference.  I usually toss a CD of royalty-free light jazz music into my ‘go bag’ before I leave home – to play through the house and lobby speaker systems.  Sometimes I dust off my radio voice and get on the mic to do the lobby announcements.  I say something like this at the end of intermission:  “Ladies and Gentlemen – the show is about to begin – please take your seats.”  It sounds simple, but getting the right blend with the background music and a pleasing overall level can be VERY tricky.   There is an existing “Intermission Signal Bell” built into the lobby amplifier system…. but no ones uses it because it sounds like something out of the stone age.

Most nights I’m kind of a “one man crew”, so sometimes those little professional details get tossed out at the expense of more important tasks.  I’d often thought: “how could I automate the task of playing lobby music and announcing the end of intermission to make it stupid crazy simple?”  In addition, wouldn’t it be cool to make it so easy and available so that ANYONE could do it and get consistently good results?    It would be very useful if any teacher, or student at the school auditorium could just press a button and have professional sounding prelude or intermission music start up in the lobby for their concert, play or program.

So that was the beginning and the need – what follows is the beginning of the solution.


When I heard about the Raspberry Pi (rPi) and began experimenting with one, I realized quickly that an rPi would be perfect little device to automate my theater music/announce task.  Perhaps I could have figured out a way to make it work using a less expensive Arduino, but for the cost difference, I’m not sure that the technical “hoops” I would have had to jump through would have been worth using the Arduino.  Some of the inspiration for the device I had in mind came from the Richardson and Wallace article “Simple Soundboard” in issue 33 of Make magazine.   There are some key differences however.

The Raspberry Pi lent itself very well to all of the requirements I had in mind of a device:  1) I could store the playback audio files on the SD Card file system of the rPi,  2) I could use the GPIO pins for both the trigger switches and the a front panel “ready” LED light, and 3) the rPi could easily play back audio files through a built in audio out jack.  All I had to do was put the pieces together in a case and “presto!” an instant automated music and announcement device.


There are five main components that comprise my rPi intermission/announcement unit:

1 – A Raspberry Pi  (DUH!)  – $40

2 – An Audio Distribution Amp that will feed the audio to multiple audio output destinations. (IE: main house board and lobby PA amp)  This piece was not strictly necessary – but it will make it much more easy to wire the unit into the existing system.  – around $40

3 – Power supply for the rPi unit (5v 2A) –  $14

4 – Power supply for the Audio D/A  (24v 2A) – $16

5 –  Momentary contact push buttons to trigger the sounds – $7

(and other misc components – resistors – capacitors – etc) – $20

The total investment is probably in the $130 range.  Although many of the parts were dug up and found rattling around in my parts/junk bins.


I wanted the device to mount unassumingly into the rack that all the other auditorium hardware was in – so that meant I needed a rack mount case.  I was REALLY shocked to find that rack mount project enclosures were really expensive no matter where I looked.  Even my favorite bargain shopping hangout Ebay could not produce a reasonably priced rack case.  So I decided that it was far more economical to just buy some sort of rack mount JUNK that didn’t work any more,  rip the guts out, and then recycle the rack case.  For this project I used the case from on old “Alesis MIDIVerb II”.  After removing all of the original buttons and switches – I glued a bit of aluminum sheet metal over the front to cover up the existing holes.



I also REALLY didn’t want a “wall wart” or any sort of external power supply box.  Being a school district technology coordinator, I’ve come to love the standard NEMA C13 power connector.   So I decided to look for power supply options that would allow me to mount a standard C14 power socket into the back of the rack case and feed the AC mains from that into switching power supply modules which would then feed the end devices.  I found the AC power supply modules on ebay.  They are pretty simple: 120V input and 5 and 24V outputs each.


I picked up a few RDL Audio Distribution Amp modules on an ebay auction for next to nothing.   I see now that they are rather expensive if purchased retail.  (around $130 each)  So sadly – all I can suggest is to keep your eyes open for ebay bargains on those!  You can still snag them for around $30 each used on ebay.


I just strapped the audio d/a into the case:


I bought the momentary contact switches on ebay:


Here are the switches mounted in the case:


Of course the rPi units you can buy from any number of places.  My favorite is MCM electronics:


I did 3d print the holder/mount for my rPi unit – but you can buy them almost anywhere also.  Here it is mounted in the case:



Here is a diagram of the most important bits of the project:


I had some trouble with double triggering with the announcer button and so I put a 0.1uF capacitor across the switch terminals.  With that AND the debounce function of the GPIO event detection routine – the problem went away.  Also note that the ground of the LED resistor is tied to pin 14 on the rPi header which is generally labeled as “DNC” for Do Not Connect – but it appears that many of the DNC pins are just grounded anyhow, so they make a convenient spot to hook into when  a ground is needed.  I guess they call them DNC because they are planning to use those pins in future revisions of the rPi board and don’t want people getting used to using them.  So keep an eye out for that change!

The wiring is pretty basic.  I used header pin jumper wires to connect up most all of the parts to the rPi headers:


I simply soldered resistors to the switches and LED as needed:


A couple of wiring bit I don’t show are the power supply connections and the audio connections.  They are both pretty basic.   For the 5V power to the rPi unit I connected the supply up to pin 2 on the header (5V) and pin 6 (ground).  It was far more easy using header pin connectors than adapting a micro-usb connector to the supply wires.

I used a simple 1/8″ mini-plug to connect audio out (unbalanced) to the input of the distribution amp.  I only connected the left audio out channel since the system in the auditorium was mostly mono and and stereo signal wiring would have been wasted effort.


First, a note about the code…. it is sort of a disaster!  Try to not judge me too harshly for it.  I am certainly NOT a coder.  I grabbed bits and pieces of code from places all around the net and through trial and error – found something that worked the way I needed it to.

The pygame toolkit is the heart of the system.  The toolkit’s primary audience is high school students who want to learn to write video games in python – but it has a very nice programmatic interface for handling audio playback.  Most importantly it has methods for layering and mixing various audio channels.  That way I can have a main background music track playing and easily mix over the top of it, another track, in this case, an announcement that people should return to their seats.

But there was one HUGE hurdle to start with:  even though I could play various tracks – I had a hard time figuring out how do the actual layering.  I discovered that I would need to spawn each audio element as its own thread with the python “callback” function.  That essentially allowed each audio element to exist in its own space and not need any further attention once started.

Also… another huge bit of the puzzle was using the rPi GPIO Event Detection function to simultaneously detect the button pushes AND debounce them AND call the appropriate code subroutine.  WHEW!  That’s a lot!

Here is the code as I currently run it:


I wanted the program to start up at boot and in case the program crashed I wanted it to restart automatically.  It seems pretty stable, but I have had it segfault on me a couple times as I randomly and quickly pushed the buttons.  I don’t anticipate it to be an issue… but just in case, having a ‘watchdog’ restart the process in case it dies is helpful.  I found something that I could put into my /etc/rc.local that does both things: 1) startup at boot and 2) auto-restart on exit – lines 5-17 below.




Finally,  I put some labels on the buttons:


and a little description on the front of what the unit does, instructions if you will, for any student or staff tech people who may wonder what the new box in the equipment rack is supposed to do:



I think that the beauty of the Raspberry Pi, or for that matter any number of other modular electronic devices appearing on the market lately, is that they allow you to “scratch an itch” that you maybe  could not afford to in the past.  I could have set up a computer with iTunes and hooked that into the auditorium system – but not very long ago, the school district would not have had a computer just ‘laying around’ to dedicate to such a task.  And even if I did dig up an  old computer to serve as an intermission music / announce unit – it would have been overly complicated and I imagine that rather than use it – it would have collected dust.  But the “single mindedness” and simplicity of devices built with Raspberry Pi units and Arduinos, and Beagle Bones,  ideally suit them to single simple tasks.   And not to mention they are just plain fun to play around with!