You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
2.6KB

  1. <h3>Summary</h3>
  2. <p>Originally, flanging was produced by playing the same signal on two synchronized
  3. reel-to-reel tape recorders and making one of the reels slow down and speed up by
  4. pressing on the flange of the reel (hence the name). This is a type of
  5. comb filtering, and produces a harmonically-related series of peaks and notches
  6. in the audio spectrum.</p>
  7. <p>This flanger uses a delay line, combining the original voice with only one sample from the delay
  8. line, but the position of that sample varies sinusoidally.</p>
  9. <p>The effect can be represented as:<br>
  10. result = sample(0) + sample(dt + depth*sin(2*PI*Fe))</p>
  11. <p>The value of the sine function is always a number from -1 to +1 and
  12. so the result of depth*(sin(Fe)) is always a number from -depth to +depth.
  13. Thus, the delayed sample will be selected from the range (dt-depth) to
  14. (dt+depth). This selection will vary at whatever rate is specified as the
  15. frequency of the effect, Fe. Typically a low frequency (a few Hertz) is used.
  16. <h3>Audio Connections</h3>
  17. <table class=doc align=center cellpadding=3>
  18. <tr class="top"><th>Port</th><th>Purpose</th></tr>
  19. <tr class="odd"><td align="center">In 0</td><td>Signal Input</td></tr>
  20. <tr class="odd"><td align="center">Out 0</td><td>Flanged Output</td></tr>
  21. </table>
  22. <h3>Functions</h3>
  23. <p class=func><span class=keyword>begin</span>(delayBuffer, length, offset, depth, delayRate);</p>
  24. <p class=desc>Create a flanger by specifying the address of the delayline, the
  25. total number of samples in the delay line (often done as an integer multiple of
  26. AUDIO_BLOCK_SAMPLES), the offset (how far back the flanged sample is from the original voice),
  27. the modulation depth (larger values give a greater variation) and the modulation
  28. frequency, in Hertz.
  29. </p>
  30. <p class=func><span class=keyword>modify</span>(offset, depth, delayRate);</p>
  31. <p class=desc>Alters the parameters in a running flanger (previously started with begin).
  32. </p>
  33. <h3>Examples</h3>
  34. <p class=exam>File &gt; Examples &gt; Audio &gt; Effects &gt; Flange
  35. </p>
  36. <h3>Notes</h3>
  37. <p>The longer the length of the delay buffer, the more memory blocks are used.</p>
  38. <p>Try these settings:<br>
  39. #define FLANGE_DELAY_LENGTH (2*AUDIO_BLOCK_SAMPLES)<br>
  40. and<br>
  41. int s_idx = 2*FLANGE_DELAY_LENGTH/4;<br>
  42. int s_depth = FLANGE_DELAY_LENGTH/4;<br>
  43. double s_freq = 3;</p>
  44. <p>The flange effect can also produce a chorus-like effect if a longer
  45. delay line is used with a slower modulation rate, for example try:<br>
  46. #define FLANGE_DELAY_LENGTH (12*AUDIO_BLOCK_SAMPLES)<br>
  47. and<br>
  48. int s_idx = 3*FLANGE_DELAY_LENGTH/4;<br>
  49. int s_depth = FLANGE_DELAY_LENGTH/8;<br>
  50. double s_freq = .0625;</p>