home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / Programming / Source / IP_Pvc / EDUCATE_YOURSELF < prev    next >
Encoding:
Text File  |  1992-05-10  |  3.8 KB  |  104 lines

  1.  
  2. Pvc is a NeXTstep phase vocoder application.  Phase vocoders perform
  3. frequency analysis of input signals by use of overlapped fast fourier
  4. transforms (FFT).  A phase vocoder such as this one is typically used
  5. for frequency and time scaling of audio signals without modification
  6. of the opposing domain.  In other words, a phase vocoder can be used
  7. to change the length of sampled mouth harp twangs without
  8. significantly changing their "pitch", and vice versa.  Handy.
  9.  
  10. What many people don't realize though, is that the phase vocoder
  11. provides super powerful spectral representations of audio signals.  I
  12. have an entire battery of digital signal processors that modify phase
  13. vocoder data.  They are currently available in vanilla C, but they
  14. will eventually be adopted into this application.  I am not happy to
  15. document them all in one night for you.  Sorry.  One or two at a time.
  16.  
  17. A groovy in-application help feature is on the way.
  18.  
  19.  
  20.  
  21. Pvc parameters:
  22.  
  23.  FFT size    size of the fourier transform this must be an integer
  24.         and a power of two
  25.  Window Size    the size of the window is normally set to the FFT size.
  26.         making it smaller provides better time resolution at
  27.         the cost of frequency aliasing.  Making it larger has
  28.         provides better frequency resolution at the cost of
  29.         time aliasing.  Opinion: I like larger window values.
  30.  decimation    the decimation factor determines the analysis sampling rate.
  31.         phase vocoder analysis requires overlap between successive
  32.         analysis frames.  this value, determines the amount of
  33.         analysis overlap (overlap = N - D). See notes on the
  34.         "Dolson rule".  D is specified in samples thus it must be
  35.         a positive integer.
  36.  interpolation    the interpolation factor determines the amount of resynthesis
  37.         overlap between successive analysis frames overlap
  38.         (overlap = N - I).
  39.  frequency    this flag acts in two ways.  it toggles oscillator bank 
  40.  multiplier    resynthesis and it specifies a frequency multiplier for the 
  41.         output signal; thus, this flag can be used to to specifiy
  42.         oscillator re-synthesis (-F1.) alone, or used to transpose 
  43.         the spectrum (pitch transposition) of the input.
  44.  
  45.  
  46.  
  47. More explanation!
  48.  
  49. Ok, you need to learn what I call the "Dolson Rule":
  50.  
  51. The largest value of either the D (D = decimation factor) and I (I =
  52. interpolation factor) values should never be greater than W/8 (W =
  53. Window size) if you wish to avoid gross amplitude modulation.  D is
  54. the input or analysis overlap (overlap in samples = W-D) while I is
  55. the output or resynthesis overlap (overlap in samples = W-I).  The
  56. ratio between D and I determines time scaling.  If D/I is greater than
  57. 1, then the sound will have a shorter duration.  If D/I is less than
  58. 1, then the sound will be longer.
  59.  
  60.  
  61. Example:
  62.  
  63.     FFT Size:        1024
  64.     Window Size:        1024
  65.     Decimation:        128
  66.     Interpolation:        64
  67.     Frequency Multiplier:    0
  68.  
  69. This will decrease the time-scale of the signal by a factor of two; in
  70. other words, the duration of the sound will be be half of its original
  71. length, and its spectral disposition (or loosely: "pitch") will remain
  72. approximately constant.
  73.  
  74.     FFT Size:        1024
  75.     Window Size:        1024
  76.     Decimation:        64
  77.     Interpolation:        128
  78.     Frequency Multiplier:    0
  79.  
  80. This will increase the time-scale of the signal by a factor of two.
  81.  
  82.     FFT Size:        1024
  83.     Window Size:        1024
  84.     Decimation:        128
  85.     Interpolation:        128
  86.     Frequency Multiplier:    1.5
  87.  
  88. The resultant signal will have an approximately unchanged time-scale, and its
  89. spectrum will be scaled by 1.5, or a perfect fifth in musical parlance.
  90.  
  91.  
  92. Remember that frequency resolution is [nyquist frequency] / (N/2).
  93. Thus, if you want to represent noisy or dense signals (at 44.1KHz),
  94. then window sizes (N) of 4096 are not uncommon.  Window size must
  95. always be a power of two.  Also, decimation (D) determines the
  96. sampling rate of analysis, so for large values of N, it is typical to
  97. use overlap values (maximum of D and I) <= 128.
  98.  
  99.  
  100. Christopher Penrose
  101. penrose@silvertone.princeton.edu
  102.  
  103. 4/10/92
  104.