Dattorro Effect Design. Part 2: Delay-Line Modulation and Chorus

Dattorro Effect Design. Part 2: Delay-Line Modulation and Chorus

PAPERS Effect Design* Part 2: Delay-Line Modulation and Chorus JON DATTORRO, AES Member CCRMA, Stanford University, Stanford, CA, USA The paper is a tutorial intended to serve as a reference in the field of digital audio effects in the electronic music industry for those who are new to this specialization of digital signal processing. The effects presented are those that are demanded most often, hence they will serve as a good toolbox. The algorithms chosen are of such a fundamental nature that they will find application ubiquitously and often. 4 LINEAR INTERPOLATION pendix 4) corresponds to the pitch change (or pitch shift) ratio. We synopsize the formal derivation in Section 4.1 Audio Applications of Interpolation: 6.2, Appendix 4, where a schematic translation of the Chorus, Flange, and Vibrato Effects fundamental algorithms discussed here, to the classical The technique of delay-line interpolation is used when digital signal processing (DSP) nomenclature will be it is desired to delay a signal by some number of samples found. This should serve to bridge the two viewpoints. expressible as a whole plus some fractional part of a The interpolation methods we seek are computation- sample. This way, the effective delay is not discretized, ally simple and inexpensive by necessity. The interpola- thus avoiding signal discontinuities when the desired tion algorithm may be executed many times in one sample- delay time is continuously swept or modulated. Delay synchronous audio processing program. We typically modulation is indigenous to pitch change and pitch shift cannot afford interpolation routines that consume a large algorithms,S2 which are themselves integral to numerous percentage of the allotted execution time, since they play other effects, such as chorus, flange, doppler, detune, only a subsidiary role. harmonizer, Leslie rotating speaker emulation, or dou- bling. The chorus and flange effects come about when 4.2 Interpolation of a Delay Line the output signal is made to be a linear sum (mix) of The DSP block diagram for delay-line interpolation the original (dry) input and the dynamically delayed is shown in Fig. 22, where we find a delay line named (wet) input signal. The chorus and flange effects are VoiceL of length 2048 samples. At every sample time distinguished primarily by the minimum delay in their n the newest input sample is accepted into the left-hand respective delay ranges. 53 Delay modulation alone (with side of the delay line (sample 0), while the oldest sample no mix) yields vibrato when the modulation is sinusoidal. is discarded off the right-hand side. That action defines In this section we present the topic of delay-line inter- the delay line. The delay-line output is rarely the last polation from the intuitive point of view of the required sample, so the output is shown above the block as an fractional sample delay, that is, from a time-domain arbitrary tap, somewhere within the body of the delay viewpoint. The formal derivation, called sample rate line. Because the arbitrary delay tap is moving smoothly conversion [32], [29], is traditionally a frequency- about the tap center, it becomes necessary to interpolate domain formulation. In a musical context, the sample- rate conversion ratio inverse (M/L in Section 6.2.3, Ap- vibra~_T_~ * Manuscript received 1996 March 14; revised 1996 Sep- I tap center tember 14 and 1997 June 28. x[n] ~ I 52 Pitch change and pitch shift will be distinguished later (see Figs. 51 and 52). The minimum is less for the flange effect (Section 6). -I Any use of delay modulation typically entails a nominal signal Fig. 22. Delay line VoiceL[2048]. NOMINALDELAY cor- delay because the modulation spans some desired range. responds to delay tap center. 764 J. Audio Eng Sot., Vol 45, No. 10, 1997 October PAPERS EFFECT DESIGN in real time in between the discrete samples of the delay content. For the chorus and flanger the loss we perceive line. The audible effect of the tap movement is vibrato. is not attributable to the comb filtering that is constituent The process called vibrato 54 is shown microscopically to those effects. 56 It is this observation which compels in Fig. 23. The desired output (vibrato) dynamically a frequency-domain analysis of linear interpolation. points (i.frac) to a place between two discrete samples. We are not accustomed to think of linear interpolation The index i, an integer, is defined as the current com- as a frequency-domain filtering process. This is because puted whole relative index into our delay line, relative it is such an intuitively simple time-domain algorithm to the beginning of the delay line. The integer i requires that performs fractional sample delay. Yet linear interpo- computation because we want it modulated by the low- lation is routinely used to perform sample rate conver- frequency oscillator (LFO) y In], oscillating as a function sion in contemporary sampler-type music synthesizers,57 of discrete time n. The integer range of i, ---CHORUS_ and we know there is a vast amount of literature that WIDTH, is centered about the nominal tap point into poses the sample rate conversion problem in the fre- the delay line, NOMINALDELAY the fixed positive quency domain. integer tap center. Fig. 24 shows the actual dual-input linear time- Note from Fig. 23 that because the time-varying varying digital filter that implements linear interpola- pointer i.frac is always a nonnegative real relative index tion. The time index n steps through discrete time in a into the delay line, the elemental coefficient frac is al- ways a nonnegative fraction. 54 Vibrato is most often implemented by undulating the ef- fect we call pitch change, although it can certainly be accom- i.frac = i + frac plished by other means (see Figs. 51 and 52). 55 See Part 3, Section 9.1, Appendix 7. 56 When a signal is added to a delayed replica of itself, The time-varying nonnegative coefficients frac and comb filtering results. (1 - frac) can have 23-bit resolution within a 24-bit 57 There it most often manifests itself as a constant pitch processor chip because CHORUS_WIDTH (a fixed posi- change at playback, dependent on the key struck. (We distin- guish pitch change from pitch "shift"; see Figs. 51 and 52.) The tive whole number of samples) is scaled by an LFO y In], technique used to accomplish pitch change by fixed amounts is a unity-level bipolar control signal that is typically two's called the phase-accumulating oscillator [33]. The Ensoniq complement q23 format. 55 (Sinusoidal oscillators as Mirage, introduced in 1984, used zeroth-order interpolation (choosing the nearest sample in time) in conjunction with eight LFOs are discussed in Section 7.) phase-accumulating oscillators. The Mirage, one of the earliest sampler-type music synthesizers, is still in commercial use 4.3 Linear Interpolation as Polyphase Digital because of its characteristic sound quality due primarily to its digital encoding scheme. Its hybrid floating-point design was Filter based on an 8-bit mantissa and an 8-bit exponent. Recorded Linear interpolation as applied in the chorus, flange, sound samples used only the mantissa. Subsequent enveloping and vibrato effects makes small undulating changes in applied the 8-bit exponent to the analog reference on a digital- to-analog (D/A) converter. That way the signal-to-noise ratio pitch. If we listen closely to all these effects, we will also of the original sample was not compromised when the signal discover a significant perceived loss of high-frequency was dynamically scaled. Robert Yannes. 2 * CHORUS_WIDTH ~-- I delaylino; VoiceL[2048] ) 0 2047 NOMINAL The tapcen ." vibrato[ ." '~'- ['-~" i.frac = NOMINAL_DELAY + CHORUS_WIDTH * y[n] i.frac i = floor(i.frac) -~ frac II,-~:~--- 1 - ffac = i.frac - i i+1 vibr i.frac For linear interpolation: v[n] = frac * VoiceL[i + 1] + (1 - frac) VoiceL[i] For all-pass interpolation: v[n] = VoiceL[i + 1] + (1 - frac) VoiceL[i] - (1 - frac) v[n - 1] Fig. 23. v[n] = vibrato. J. Audio Eng Soc., Vol. 45, No. 10, 1997 October 765 DA'I-I'OR RO PAPERS sequential fashion, 0 <~ n < oo. The index n always function of i.frac, as outlined in Fig. 23. The linear refers to the current sample. We have drawn the linear interpolation circuit is polyphase because whenever an interpolation circuit in a strange way to emphasize the output sample v[n] is computed, a new pair of coeffi- nonsequential access of the input samples demanded by cients is fetched, yielding a different phase response the computed index i. The unit delay z-~ is not termi- from one of the filters in an ordinal set 6~ [29, ch. 4.6.5, nated because the index i is time varying (it changes at p. 166]. each time step n), which is to say that it can take on any value within bounds. 58 From Fig. 23 we have estab- 4.4 Movement of the i.frac Pointer lished the parameters: 0 ~< i < 2048. The consequence It is interesting to know how the pointer i.frac moves of these considerations is that x[n - i - 1] is not neces- under certain conditions. 61 sarily the old value of x[n - i]. To make the connection from the circuit in Fig. 24 to 4.4.1 Constant Delay the delay line in Fig. 23, we make the analytical i.frac is a real constant, that is, it is not dynamic in identification this circumstance. x[n - i] = VoiceL[i] . 4.4.2 Undulating Pitch Change, Vibrato It is given that i.frac varies sinusoidally. Without loss This identification locates the requested sample in our of generality we may consider vibrato as applied to an delay line.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    25 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us