home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / rec / audio / 17539 < prev    next >
Encoding:
Internet Message Format  |  1992-12-30  |  4.6 KB

  1. Path: sparky!uunet!usc!sdd.hp.com!spool.mu.edu!umn.edu!csus.edu!ucdavis!matthews
  2. From: matthews@eecs.ucdavis.edu (Thomas W. Matthews)
  3. Newsgroups: rec.audio
  4. Subject: Re: CD Sound Quality
  5. Message-ID: <20627@ucdavis.ucdavis.edu>
  6. Date: 30 Dec 92 17:34:50 GMT
  7. References: <1992Dec22.090725.11365@leland.Stanford.EDU> <7490273@hpfcso.FC.HP.COM> <vanz.02bd@tragula.equinox.gen.nz> <lk1cpdINNrrh@exodus.Eng.Sun.COM> <1hr15aINNib7@gap.caltech.edu>
  8. Sender: usenet@ucdavis.ucdavis.edu
  9. Organization: Division of Electrical Engineering and Computer Science, UC Davis
  10. Lines: 75
  11.  
  12. I've been following the discussion about "CD sound quality" with
  13. interest.  Right now, the focus seems to be on how a CD player
  14. that only gets 44.1 k samples/sec produces two, four, or eight times
  15. that many samples to feed to its D to A converter.  
  16.  
  17. In <lk1erdINNrtg@exodus.Eng.Sun.COM>,  chased@rbbb.Eng.Sun.COM (David Chase)
  18. asked about an interpolation scheme in which the player generates an extra
  19. sample between original 44.1 kHz samples by linear interpolation.  I used to
  20. wonder about that also, but I think that andrey@cco.caltech.edu (Andre T. Yew)
  21. is on the right track.
  22.  
  23. I will be so bold as to present my understanding of how this is done, and
  24. hopefully others will correct, refine, and/or confirm it.
  25.  
  26. Let's say we're oversampling 4X.  Let T = 1 / (176.4 kHz) so that T is the
  27. sample time at the higher 4X oversampling rate.  Then the original samples
  28. off the CD are only available at the rate of one every 4T, and we would like
  29. the D to A converter to receive samples at the rate of one every T.  How do
  30. we generate the extra samples?
  31.  
  32. First, we generate a sequence that has extra zeros in it.  If original samples
  33. are denoted by "S" and zeros by "0", then the new sequence looks like:
  34.  
  35.      S 0 0 0 S 0 0 0 S 0 0 0 S etc.
  36.  
  37. At first, this seems like a meaningless step.  But note that now the sequence
  38. has samples every T seconds, not just every 4T seconds.  And the filtering
  39. and conversion operations to follow are accomplished at the higher rate.
  40.  
  41. Below I have drawn the topology of an FIR filter.  The input is the sequence
  42. of original samples with the zeros added (the one typed out above).  The output
  43. is C1*X1 + C2*X2 + C3*X3, . . . Cn*Xn.  In words, each signal Xn is multiplied
  44. by a constant (coefficient) and all the products thus formed are added up
  45. to produce an output.  Note that each Xn can have a different Cn.  It is the
  46. selection of all the Cn that gives the filter its characteristics.  
  47.  
  48.                   _____       _____                   _____       _____
  49.                  |  T  |     |  T  |                 |  T  |     |  T  |
  50.       Input------|delay|-----|delay|- - mamy more - -|delay|-----|delay|--
  51.                | |_____|   | |_____|                 |_____|  |  |_____|  |
  52.                |           |                                  |           |
  53.                |           |                                  |           |
  54.                X1          X2                                 X16         X17
  55.  
  56. I haven't drawn the multipliers and the finnal summer to save space.
  57.  
  58. Example:  If the input samples are all zeros except for a single sample
  59. which has value "1", the "1" will appear at X1, then after T seconds it
  60. will appear at X2, then at X3, etc.  In this case the output of the filter
  61. will be C1, C2, C3, etc.  This is called the impulse response of the filter.
  62. Because the response to an impulse will cease after the "1" has been shifted
  63. through the last delay element, this is called a Finite Impulse Response filter.
  64.  
  65. If the Cn are calculated from a sinc function, the filter is a good
  66. approximation to a "brick wall" filter (a box filter).  The Cn can be
  67. chosen so that the filter cuts off at 20 kHz (the clock frequency
  68. of 176.4 kHz. must be considered also when determining the cutoff
  69. frequency).  
  70.  
  71. Note that X1 is the present input and that X2, X3, etc. are just input samples
  72. that have been delayed.  I don't know how many delay stages are actually 
  73. used in a CD player (anyone?).  At one instant in time, if one were to read
  74. the values X1, X2, etc. one would be reading the present input sample, then the
  75. sample from one T ago, then the sample from two T ago, etc.  Hence at any given 
  76. time, only one-fourth of the Xn are non-zero.  But note that an output sample is
  77. generated every T seconds!  And the output has been bandlimited to 20 kHz.  The
  78. output still has "images" of the input signal centered around multiples of the
  79. sampling frequency, but above 20 kHz there is nothing to worry about until
  80. 176.4 kHz - 20 kHz = 156.4 kHz.  
  81.  
  82. The actual implementation of the filter is not done with separate delay
  83. elements as drawn, but the concept is the same.  I hope that this article is
  84. useful.
  85.  
  86. Tom Matthews
  87.