How Dolby Stereo (aka Dolby Surround) works: 
(version 2.01, 4/22/94)

Don Munsil (dmunsil@netcom.com)

2.01 changes:

- Better explanation of inverting a sample.

2.0 changes:

- Added responses from Otto Chrons and Adrian Kwong.

- Cleaned up text considerably.

- Added more tips on practical aspects.

** Introduction:

Dolby Stereo is a system designed by Dolby Labs in the '70s for creating
better movie sound, including surround-sound. The other benefits are
increased directionality of front sounds and improved localization of
on-screen sounds like dialog for the people sitting on the edges. The
system is totally separate from Dolby noise-reduction systems like Dolby B
and C. Remember that there is only one encoding process: Dolby Stereo, 
which can be decoded by a Dolby Surround, Dolby Pro-Logic, or THX 
decoder, for varying degrees of home-theatre "quality."

There are four output channels in Dolby Stereo: Left front, Right front,
Center front, and Surround. These are encoded on two channels in such a
way that the soundtrack can be played back on a standard stereo device, a
mono device, or a Dolby decoder. (Or a THX system, which is a Dolby
Pro-Logic decoder with specifications licensed by Lucasfilm). 

A word is in order about THX. It is NOT different from Dolby Pro-Logic, at
least not precisely. THX is a licensing and quality-control wing of
LucasArts with the stated aim of improving movie sound and picture. It
licenses the name THX for movie equipment, movie theatres, home equipment,
and laserdiscs. The name means that the THX engineers certify it as good
quality. There are a few processing steps in home THX that are not
typically present in a plain Pro-Logic system, but they are merely
enhancements to Dolby Pro-Logic decoding, not a different system. 

The center channel is the most used one in a film. It contains all of the
dialog, and most of the on-screen sound effects. It is important to have a
center channel so that people on the edges of the theatre (or your living
room) still hear the on-screen sound from the direction of the screen, not
panned to one side or another. Without the center channel, people hear
most of the sound coming from the nearest speaker. In addition, dialog 
tends to be clearer when it is localized in the center channel.

The surround channel is used for "ambient" effects: sounds that should
envelop the listener. It is not a rear channel, and should not be used for
directional sounds. In a properly setup system, the listener should not be
able to tell where the surround speakers are located. In a movie theatre,
there are generally many surround speakers around the back of the hall. In
the home, this is impractical, so two speakers facing in such a way as to
maximize reflected sound are used.

Any device capable of playing back two distinct channels can produce Dolby
Stereo-compatible signals. This includes any stereo soundcard, stereo vcr,
or even CD player or record (there are Dolby Stereo encoded CDs).

** Here's how:

I'll refer to the four output channels as LO, RO, CO, and SO, for left,
right, center, and surround, respectively. The input channels (the ones
coming from the source and into the decoder) I'll call LI and RI. (If you
don't like acronyms, feel free to use search-and-replace to make this more
readable.) :-)

The LO channel and RO channel are recorded normally on the LI and RI tape
channels (we'll assume tape recording for example purposes). The CO
channel is recorded on BOTH the LI and RI channel at exactly the same
volume, in-phase (i.e., no special processing). The SO channel is recorded
on LI and RI at the same volume, with inverted phase (i.e. every peak on
one channel is a trough on the other). 

There are a few interesting nuances here. Because the CO channel is
recorded normally on LI and RI, it will still image in the center on any
stereo playback system, as long as the listener is basically in the
center. As the listener moves further left or right, the image moves in
the same direction, which is a little distracting, but acceptable. This is
what one gets with a simple "surround" decoder (in addition to the
surround channel, of course). Without the Center channel, the imaging is
fine for one or two people, but not so great for groups. Dolby Pro-Logic
adds (among other things) the center channel. 

Note that because of the inverted encoding scheme for the surround
channel, it will disappear when played back on a mono system. Each peak is
precisely canceled by a trough on the other channel, and all surround
information is lost. This is another reason to put only ambient,
non-essential sounds in the surround channel. Many systems are still mono
(most VCRs, for example) and will not reproduce them.

The Dolby decoder reproduces a fairly good semblance of the original four
channels from the two input channels, though there will always be leakage
and crosstalk. Dolby Pro-Logic and THX circuitry have special processing
that minimizes perceived crosstalk. 

When the Dolby Stereo is mixed, the engineers listen to it running through
a Pro-Logic decoder exactly like the one in the theatre or your home.
Thus, they design the four channels specifically so they will decode
properly. It is not a good idea to mix four distinct channels, then do the
Pro-Logic encoding "blind" as a post-process, because the results will not
be exactly the same as the original four distinct channels. 

** Doing it on a soundcard (kinky as it sounds):

On a soundcard, sending signals to the center channel is a simple as
playing the sound in dead-center (equal volume on both channels). Surround
is a bit tougher. The sound must be played back inverted on one channel.
One way would be to have two samples, with one pre-inverted. Another would
be to invert one side on the fly. I have been told that DMP, a MOD music
player by Otto Chrons, does just this. I haven't heard it myself. 

Inverting a sample simply consists of negating it. If the sample values 
are unsigned, the negation will still give the desired result because of 
the nature of two's complement representation (though you should make 
sure your compiler is actually doing the appropriate negation -- in C, 
cast the value to signed, then negate it, then cast to unsigned to be 
absolutely sure.)

>>New addition: Otto Chrons (c142092@cc.tut.fi), author of DMP, emailed 
me the following: 

You wrote an excellent article about Dolby Surround sound at csip.soundcard
but I wanted to comment on few things. DMP does work with surround channel
and the technique I use is extremely simple. Dolby standard state that
you should do +90 and -90 phase shifting on left & right channels, but I've
found out that doing a 0 and +180 shift works as well. So basically I
put the original sound data out of the left speaker and negate the data
on the right speaker. In my mixing routines this is accomplished by
using ADD and SUB instructions respectively. So doing surround sound is
as easy as doing mono!

>>End Chrons

** A few other issues to keep in mind:

>>Adrian Kwong (akwong@alfred.carleton.ca) had this to add:

You might want to add that the surround channel in a normal Dolby
Surround setup is placed through Dolby A type noise decoding.  It has
something to do with making it 3dB larger following a specific
frequency envelope.  To make the surround appear at the correct
volume, you'll need to "double" the signal to the surround channel.
(+3dB is about 2x the signal)

>>End Kwong

One thing to keep in mind is that the Surround channel is typically not 
designed to handle a lot of bass. The speakers are generally small, and 
the amplifiers are lower wattage. On a film soundtrack, the low bass is 
generally filtered out of the soundtrack to avoid clipping.

In addition, the high frequencies are generally filtered out of the 
surround channel because higher frequencies are easier to localize, and 
the surround channel is not supposed to be directional. The end result is 
that the surround channel is only "supposed" to carry about 200-8000Hz, 
which is a fairly narrow spectrum.

It is difficult to get a sound to play on all four channels at once.
Generally, on a film soundtrack, a "big" sound, like an explosion, is sent
mainly to the surround channel. Since this will be lost in mono, a similar
sound is sent to the left and right channels as well.

A technique often used with thunder effects is to put the main sound in
the surround channel, followed by an echo in the front channels (or
sometimes vice-versa). The Dolby stereo listeners hear the two-part
thunder, and the mono listeners hear just the second bit (or a scaled-down
version of the first). 

Another technique is to slightly pitch-shift or delay sounds going to the
different speakers, but results can be iffy. YMMV. The important thing is
to do testing on a real Pro-Logic setup, and experiment until a good
balance is reached.

One can also send frequency band-limited chunks of the sound to each channel,
which will decode rather well. It requires that the bulk of each channel
be using a different band of the frequency spectrum, which is not
practical in some cases.

Keep in mind that there are many tricks of the trade that are used in film
mixing that only Dolby really knows. They don't tell how they do it,
because they want film companies to buy their technology, not the
competition (e.g. UltraStereo, Chase Surround, StereoSurround). If anyone 
reading this has useful techniques (that are not trade secrets of Dolby) 
they would like to share, please email the author.

Fortunately, in computer sound, you don't have to make the soundtrack
mono-compatible. You can ask the user if the sound system is Dolby
Surround, and place sounds in the surround channel as needed. On a mono
system, the sounds can all be sent to the single channel.

** Disclaimers:

All of this information is from me, and any errors are my own darn fault.
None of this information has been endorsed by Dolby Labs. Dolby is a
trademark of Dolby labs, and should not be used on a product without
getting their permission. (Although I think if you called it "surround"
people would get the idea.)

Please email suggestions/criticisms/additions/subtractions/
multiplications/corrections to dmunsil@netcom.com or don@elseware.com.

This text is copyright 1993 by Don Munsil. It may be distributed freely,
as long as modifications are attributed and marked clearly.

-- 
------------------------------------------------------
Don Munsil          | I respect faith, but doubt is
dmunsil@netcom.com  | what gets you an education.
don@elseware.com    |                 -- Wilson Mizner

Discuss this article in the forums


Date this article was posted to GameDev.net: 7/16/1999
(Note that this date does not necessarily correspond to the date the article was written)

See Also:
Audio

© 1999-2011 Gamedev.net. All rights reserved. Terms of Use Privacy Policy
Comments? Questions? Feedback? Click here!