Touchscreen audio controller for presentation sound

Sound Check

At the Fort Worth Museum of Science and History's Noble Planetarium, one Raspberry Pi has replaced four CD players for various music and sound effects.

Sound has long been essential to planetariums for creating an immersive experience. Before digital anything, planetarium shows were completely manual operations performed live by the host. Relay routing (Figure 1) was used to direct up to 10 or 12 different sound effects, music, and background sounds to speakers around the dome – an early surround-sound system.

Figure 1: This relay routing system was used to assign different audio sources to speakers around (or on top of) the dome. The switches in the middle were manual overrides.

Today, digital planetarium systems make it easy to drop soundtracks, sound effects, and just about anything else onto a timeline so that the timing and visuals are always in sync. Even with digital systems, however, live presentations are still our preferred style of planetarium show.

To control the audio during live presentations, I wrote an audio player that incorporates background and walk-in music, sound effects, and announcements. My custom audio player is controlled from the Raspberry Pi Foundation's new 7-inch touchscreen (Figure 2).

Figure 2: The audio mixer and Rasp Pi touchscreen. The old labels for the CD players can be seen on channels 3 through 6. A red filter has been added to limit extra light bouncing off the dome during shows. (Refer to the box called "Seeing Red" for more information.)

Seeing Red

The color scheme of the audio player is all shades of red, because red affects our night vision the least. Although movie and traditional stage theaters also rely on darkness to tell their stories, it is even more essential in planetariums.

All of the monitors have red filters installed to lower their light output. This also makes it possible for the operator to look back and forth between the monitor and the dome itself and still be able to see.

Playback Modes

The audio player handes audio using three different modes. Each mode is slightly different in its required arguments and how it handles the sound. Modes are selected in a config file (Listing 1), so it's easy to change behavior or add new audio files.

Listing 1

config.txt

Planetarium Walk In     /home/scott/domeAudio/walkin    PLAYLIST
Cattle Walk In  /home/scott/domeAudio/cattle    PLAYLIST
General /home/scott/domeAudio/announcements/basicBeep.wav       ANNOUNCEMENT
High Traffic    /home/scott/domeAudio/announcements/high traffic.wav    ANNOUNCEMENT
tech diff       /home/scott/domeAudio/announcements/technical difficulties.wav  BACKGROUND
young ast       /home/scott/domeAudio/announcements/young astronomers.wav       ANNOUNCEMENT
  • PLAYLIST mode works like a traditional music player. I specify the screen caption and the folder where the tracks are located. The player provides a volume control, next/previous track functions, and play/pause. All sound files in the directory will be looped continuously until playback is paused. I can load as many playlists as I like, and each one is accessible on its own row on the touchscreen.
  • ANNOUNCEMENT mode uses single files rather than a directory. I specify the button caption and the filename of the announcement. Announcements are played once at 100 percent volume whenever the button is touched.
  • BACKGROUND mode also uses single files that provide extra ambience. Just like announcements, I provide a button caption and the filename of the sound. Backgrounds toggle so the button will either display dim (not playing) or full brightness (playing). A small bargraph on the left-hand side shows volume level. They also have independent volume controls so they don't overpower other audio playing at the same time.

The config file shown in Listing 1 shows a list of audio sources with tab-separated arguments. The first field is the caption for the interface, the second is the path to the file/folder, and the third is which mode to use for this source.

Old vs. New

When a presenter is ready to start a show, they make their audio selections on the touchscreen. The choices include the pre-show/walk-in music and any background sounds they might want to include. I like to use crickets and birds for a nice spring day; other presenters will use the telltale beep of Sputnik passing overhead.

Before the Raspberry Pi was in place, the old CD players had a tendency to skip or shut off randomly (Figure 3). Each source on the mixer also had to be individually adjusted and unmuted. When trying to coordinate a live program, any step that can be eliminated is extremely helpful. (See the "Video Playback" box for more details.)

Figure 3: The old equipment on its way to be recycled.

Video Playback

During the same upgrade to replace the CD players, I also replaced two DVD players for looping video. The monitors already had HDMI capability, so I just added the Raspberry Pi behind the monitor and left the old cabling in place.

I started with a video file of the DVD contents and played it with omxplayer like this:

omxplayer -b --loop video.mpg

I added that line to /etc/rc.local so the player starts automatically on boot.

Buy this article as PDF

Express-Checkout as PDF

Pages: 2

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content