home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / amiga / audio / 3194 < prev    next >
Encoding:
Text File  |  1992-08-26  |  3.8 KB  |  76 lines

  1. Newsgroups: comp.sys.amiga.audio
  2. Path: sparky!uunet!sun-barr!cs.utexas.edu!uwm.edu!src.honeywell.com!hwcae!ericj
  3. From: ericj@hwcae.Honeywell.COM (Eric Jacobsen)
  4. Subject: Re: Halving sample speed while keeping pitch
  5. In-Reply-To: finkel@virgo.math.tau.ac.il's message of Tue, 25 Aug 1992 11: 45:30 GMT
  6. Message-ID: <ERICJ.92Aug26130650@lagos.cfsat.Honeywell.COM>
  7. Sender: news@src.honeywell.com (News interface)
  8. Nntp-Posting-Host: lagos.hwcae.az.honeywell.com
  9. Organization: Honeywell, Air Transport Division; Phoenix, AZ
  10. References: <9208241809.AA00474@.nairobi.inel.gov.inel.gov.>
  11.     <ERICJ.92Aug24131911@lagos.cfsat.Honeywell.COM>
  12.     <1992Aug25.114530.14241@aristo.tau.ac.il>
  13. Date: Wed, 26 Aug 1992 19:06:50 GMT
  14. Lines: 60
  15.  
  16. In article <1992Aug25.114530.14241@aristo.tau.ac.il> finkel@virgo.math.tau.ac.il (Udi Finkelstein) writes:
  17.    >
  18.    >One way to get what you are looking for:
  19.    >
  20.    >1. Upsample the signal until it is of the length you wish. The pitch
  21.    >will be lower, but you can get the time duration you want.
  22.    >
  23.    >2. Take the upsampled signal and mix it with a sine wave that shifts
  24.    >the pitch back up. (You get a sum and difference frequency, you filter
  25.    >out the difference freq). Actually, this is kinda tough to do
  26.    >digitally. It is a lot easier to do this in the analog domain when
  27.    >you play it back.
  28.    This method isn't very accurate, and I'll give an example:
  29.  
  30.    Suppose our signal has two peaks, one at 1Khz, and the other at 2KHz.
  31.  
  32.    1. we upsample by 100%, we now get the two peaks at 500Hz and 1Khz.
  33.    2. by multiplying with a 500Hz sine wave, we get 1Khz, and 1.5KHz peaks.
  34.       if we use 1Khz, we get 1.5KHz and 2KHz peaks.
  35.  
  36.    This demontrates that the method above doesn't exacly preserve the spectral
  37.    content of the signal while making it longer.
  38.    However, I think that for small speed variations it should be bearable.
  39.  
  40. Mixing does compress or stretch the spectra as you describe, but to
  41. accomplish the time stretch and pitch preservation that the original
  42. poster asked for, you have to give up something. I challenge anybody
  43. to come up with a method of doing this that doesn't introduce some
  44. sort of distortion (spectrally or otherwise).
  45.  
  46. At least with the mixing method you haven't introduced any *new*
  47. components to the signal, you haven't added any noise (theoretically),
  48. and the spectral relationships have been preserved, although, as you
  49. pointed out, things get stretched or mooshed a bit. When you actually
  50. do this (which is how a lot of audio special effects are done for
  51. movies, etc.) it sounds pretty good.
  52.  
  53. *BTW*, something that should be mentioned: As in the above example
  54. the 500 and 1kHz signals get mixed up to 1kHz and 1.5kHz, the
  55. difference frequencies appear at 0Hz and 500Hz, which are definitely
  56. in band for audio. Depending on where you want the spectra to land,
  57. it may be desirable to mix the signal way up to some high freq, filter
  58. out the unwanted stuff, mix it back down to where you want it and filter
  59. out the unused portion. Another note: Every time you split the spectra
  60. like this and filter half away, you lose 3dB in the Signal-to-Noise ratio.
  61. (So, although we haven't added any noise, we lose half the signal power.)
  62.  
  63. Gee, sorry about the long post, everybody...
  64. --
  65. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  66. * Eric Jacobsen        Honeywell Inc.                           *
  67. |     1-602-436-3941   Commercial Flight Systems, Air Transport |
  68. * HVN       436-3941   US Mail: P.O. Box 21111, MS 2Q34C1       *
  69. | FAX 1-602-436-1310   Phoenix AZ 85036-1111                    |
  70. * INet: ericj@hwcae.honeywell.com                               *
  71. | UUCP: uunet!hwcae.honeywell.com!ericj@uunet.uu.net            |
  72. * The opinions expressed are my own and therefore better        *
  73. | thought out than my employer's.                               |
  74. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  75.  
  76.