home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / FAQSYS18.ZIP / FAQS.DAT / DOLBY.201 < prev    next >
Text File  |  1995-12-12  |  11KB  |  217 lines

  1.  
  2. How Dolby Stereo (aka Dolby Surround) works: 
  3. (version 2.01, 4/22/94)
  4.  
  5. Don Munsil (dmunsil@netcom.com)
  6.  
  7. 2.01 changes:
  8.  
  9. - Better explanation of inverting a sample.
  10.  
  11. 2.0 changes:
  12.  
  13. - Added responses from Otto Chrons and Adrian Kwong.
  14.  
  15. - Cleaned up text considerably.
  16.  
  17. - Added more tips on practical aspects.
  18.  
  19. ** Introduction:
  20.  
  21. Dolby Stereo is a system designed by Dolby Labs in the '70s for creating
  22. better movie sound, including surround-sound. The other benefits are
  23. increased directionality of front sounds and improved localization of
  24. on-screen sounds like dialog for the people sitting on the edges. The
  25. system is totally separate from Dolby noise-reduction systems like Dolby B
  26. and C. Remember that there is only one encoding process: Dolby Stereo, 
  27. which can be decoded by a Dolby Surround, Dolby Pro-Logic, or THX 
  28. decoder, for varying degrees of home-theatre "quality."
  29.  
  30. There are four output channels in Dolby Stereo: Left front, Right front,
  31. Center front, and Surround. These are encoded on two channels in such a
  32. way that the soundtrack can be played back on a standard stereo device, a
  33. mono device, or a Dolby decoder. (Or a THX system, which is a Dolby
  34. Pro-Logic decoder with specifications licensed by Lucasfilm). 
  35.  
  36. A word is in order about THX. It is NOT different from Dolby Pro-Logic, at
  37. least not precisely. THX is a licensing and quality-control wing of
  38. LucasArts with the stated aim of improving movie sound and picture. It
  39. licenses the name THX for movie equipment, movie theatres, home equipment,
  40. and laserdiscs. The name means that the THX engineers certify it as good
  41. quality. There are a few processing steps in home THX that are not
  42. typically present in a plain Pro-Logic system, but they are merely
  43. enhancements to Dolby Pro-Logic decoding, not a different system. 
  44.  
  45. The center channel is the most used one in a film. It contains all of the
  46. dialog, and most of the on-screen sound effects. It is important to have a
  47. center channel so that people on the edges of the theatre (or your living
  48. room) still hear the on-screen sound from the direction of the screen, not
  49. panned to one side or another. Without the center channel, people hear
  50. most of the sound coming from the nearest speaker. In addition, dialog 
  51. tends to be clearer when it is localized in the center channel.
  52.  
  53. The surround channel is used for "ambient" effects: sounds that should
  54. envelop the listener. It is not a rear channel, and should not be used for
  55. directional sounds. In a properly setup system, the listener should not be
  56. able to tell where the surround speakers are located. In a movie theatre,
  57. there are generally many surround speakers around the back of the hall. In
  58. the home, this is impractical, so two speakers facing in such a way as to
  59. maximize reflected sound are used.
  60.  
  61. Any device capable of playing back two distinct channels can produce Dolby
  62. Stereo-compatible signals. This includes any stereo soundcard, stereo vcr,
  63. or even CD player or record (there are Dolby Stereo encoded CDs).
  64.  
  65. ** Here's how:
  66.  
  67. I'll refer to the four output channels as LO, RO, CO, and SO, for left,
  68. right, center, and surround, respectively. The input channels (the ones
  69. coming from the source and into the decoder) I'll call LI and RI. (If you
  70. don't like acronyms, feel free to use search-and-replace to make this more
  71. readable.) :-)
  72.  
  73. The LO channel and RO channel are recorded normally on the LI and RI tape
  74. channels (we'll assume tape recording for example purposes). The CO
  75. channel is recorded on BOTH the LI and RI channel at exactly the same
  76. volume, in-phase (i.e., no special processing). The SO channel is recorded
  77. on LI and RI at the same volume, with inverted phase (i.e. every peak on
  78. one channel is a trough on the other). 
  79.  
  80. There are a few interesting nuances here. Because the CO channel is
  81. recorded normally on LI and RI, it will still image in the center on any
  82. stereo playback system, as long as the listener is basically in the
  83. center. As the listener moves further left or right, the image moves in
  84. the same direction, which is a little distracting, but acceptable. This is
  85. what one gets with a simple "surround" decoder (in addition to the
  86. surround channel, of course). Without the Center channel, the imaging is
  87. fine for one or two people, but not so great for groups. Dolby Pro-Logic
  88. adds (among other things) the center channel. 
  89.  
  90. Note that because of the inverted encoding scheme for the surround
  91. channel, it will disappear when played back on a mono system. Each peak is
  92. precisely canceled by a trough on the other channel, and all surround
  93. information is lost. This is another reason to put only ambient,
  94. non-essential sounds in the surround channel. Many systems are still mono
  95. (most VCRs, for example) and will not reproduce them.
  96.  
  97. The Dolby decoder reproduces a fairly good semblance of the original four
  98. channels from the two input channels, though there will always be leakage
  99. and crosstalk. Dolby Pro-Logic and THX circuitry have special processing
  100. that minimizes perceived crosstalk. 
  101.  
  102. When the Dolby Stereo is mixed, the engineers listen to it running through
  103. a Pro-Logic decoder exactly like the one in the theatre or your home.
  104. Thus, they design the four channels specifically so they will decode
  105. properly. It is not a good idea to mix four distinct channels, then do the
  106. Pro-Logic encoding "blind" as a post-process, because the results will not
  107. be exactly the same as the original four distinct channels. 
  108.  
  109. ** Doing it on a soundcard (kinky as it sounds):
  110.  
  111. On a soundcard, sending signals to the center channel is a simple as
  112. playing the sound in dead-center (equal volume on both channels). Surround
  113. is a bit tougher. The sound must be played back inverted on one channel.
  114. One way would be to have two samples, with one pre-inverted. Another would
  115. be to invert one side on the fly. I have been told that DMP, a MOD music
  116. player by Otto Chrons, does just this. I haven't heard it myself. 
  117.  
  118. Inverting a sample simply consists of negating it. If the sample values 
  119. are unsigned, the negation will still give the desired result because of 
  120. the nature of two's complement representation (though you should make 
  121. sure your compiler is actually doing the appropriate negation -- in C, 
  122. cast the value to signed, then negate it, then cast to unsigned to be 
  123. absolutely sure.)
  124.  
  125. >>New addition: Otto Chrons (c142092@cc.tut.fi), author of DMP, emailed 
  126. me the following: 
  127.  
  128. You wrote an excellent article about Dolby Surround sound at csip.soundcard
  129. but I wanted to comment on few things. DMP does work with surround channel
  130. and the technique I use is extremely simple. Dolby standard state that
  131. you should do +90 and -90 phase shifting on left & right channels, but I've
  132. found out that doing a 0 and +180 shift works as well. So basically I
  133. put the original sound data out of the left speaker and negate the data
  134. on the right speaker. In my mixing routines this is accomplished by
  135. using ADD and SUB instructions respectively. So doing surround sound is
  136. as easy as doing mono!
  137.  
  138. >>End Chrons
  139.  
  140. ** A few other issues to keep in mind:
  141.  
  142. >>Adrian Kwong (akwong@alfred.carleton.ca) had this to add:
  143.  
  144. You might want to add that the surround channel in a normal Dolby
  145. Surround setup is placed through Dolby A type noise decoding.  It has
  146. something to do with making it 3dB larger following a specific
  147. frequency envelope.  To make the surround appear at the correct
  148. volume, you'll need to "double" the signal to the surround channel.
  149. (+3dB is about 2x the signal)
  150.  
  151. >>End Kwong
  152.  
  153. One thing to keep in mind is that the Surround channel is typically not 
  154. designed to handle a lot of bass. The speakers are generally small, and 
  155. the amplifiers are lower wattage. On a film soundtrack, the low bass is 
  156. generally filtered out of the soundtrack to avoid clipping.
  157.  
  158. In addition, the high frequencies are generally filtered out of the 
  159. surround channel because higher frequencies are easier to localize, and 
  160. the surround channel is not supposed to be directional. The end result is 
  161. that the surround channel is only "supposed" to carry about 200-8000Hz, 
  162. which is a fairly narrow spectrum.
  163.  
  164. It is difficult to get a sound to play on all four channels at once.
  165. Generally, on a film soundtrack, a "big" sound, like an explosion, is sent
  166. mainly to the surround channel. Since this will be lost in mono, a similar
  167. sound is sent to the left and right channels as well.
  168.  
  169. A technique often used with thunder effects is to put the main sound in
  170. the surround channel, followed by an echo in the front channels (or
  171. sometimes vice-versa). The Dolby stereo listeners hear the two-part
  172. thunder, and the mono listeners hear just the second bit (or a scaled-down
  173. version of the first). 
  174.  
  175. Another technique is to slightly pitch-shift or delay sounds going to the
  176. different speakers, but results can be iffy. YMMV. The important thing is
  177. to do testing on a real Pro-Logic setup, and experiment until a good
  178. balance is reached.
  179.  
  180. One can also send frequency band-limited chunks of the sound to each channel,
  181. which will decode rather well. It requires that the bulk of each channel
  182. be using a different band of the frequency spectrum, which is not
  183. practical in some cases.
  184.  
  185. Keep in mind that there are many tricks of the trade that are used in film
  186. mixing that only Dolby really knows. They don't tell how they do it,
  187. because they want film companies to buy their technology, not the
  188. competition (e.g. UltraStereo, Chase Surround, StereoSurround). If anyone 
  189. reading this has useful techniques (that are not trade secrets of Dolby) 
  190. they would like to share, please email the author.
  191.  
  192. Fortunately, in computer sound, you don't have to make the soundtrack
  193. mono-compatible. You can ask the user if the sound system is Dolby
  194. Surround, and place sounds in the surround channel as needed. On a mono
  195. system, the sounds can all be sent to the single channel.
  196.  
  197. ** Disclaimers:
  198.  
  199. All of this information is from me, and any errors are my own darn fault.
  200. None of this information has been endorsed by Dolby Labs. Dolby is a
  201. trademark of Dolby labs, and should not be used on a product without
  202. getting their permission. (Although I think if you called it "surround"
  203. people would get the idea.)
  204.  
  205. Please email suggestions/criticisms/additions/subtractions/
  206. multiplications/corrections to dmunsil@netcom.com or don@elseware.com.
  207.  
  208. This text is copyright 1993 by Don Munsil. It may be distributed freely,
  209. as long as modifications are attributed and marked clearly.
  210.  
  211. -- 
  212. ------------------------------------------------------
  213. Don Munsil          | I respect faith, but doubt is
  214. dmunsil@netcom.com  | what gets you an education.
  215. don@elseware.com    |                 -- Wilson Mizner
  216.  
  217.