Barberpole Phasing and Flanging Illusions
Total Page:16
File Type:pdf, Size:1020Kb
Proc. of the 18th Int. Conference on Digital Audio Effects (DAFx-15), Trondheim, Norway, Nov 30 - Dec 3, 2015 BARBERPOLE PHASING AND FLANGING ILLUSIONS Fabián Esqueda∗ , Vesa Välimäki Julian Parker Aalto University Native Instruments GmbH Dept. of Signal Processing and Acoustics Berlin, Germany Espoo, Finland [email protected] [email protected] [email protected] ABSTRACT [11, 12] have found that a flanging effect is also produced when a musician moves in front of the microphone while playing, as Various ways to implement infinitely rising or falling spectral the time delay between the direct sound and its reflection from the notches, also known as the barberpole phaser and flanging illu- floor is varied. sions, are described and studied. The first method is inspired by Phasing was introduced in effect pedals as a simulation of the the Shepard-Risset illusion, and is based on a series of several cas- flanging effect, which originally required the use of open-reel tape caded notch filters moving in frequency one octave apart from each machines [8]. Phasing is implemented by processing the input sig- other. The second method, called a synchronized dual flanger, re- nal with a series of first- or second-order allpass filters and then alizes the desired effect in an innovative and economic way using adding this processed signal to the original [13, 14, 15]. Each all- two cascaded time-varying comb filters and cross-fading between pass filter then generates one spectral notch. When the allpass filter them. The third method is based on the use of single-sideband parameters are slowly modulated, the notches move up and down modulation, also known as frequency shifting. The proposed tech- in frequency, as in the flanging effect. The number and distribu- niques effectively reproduce the illusion of endlessly moving spec- tion of the notches are the main differences between phasing and tral notches, particularly at slow modulation speeds and for input flanging, which can sometimes sound quite similar. signals with a rich frequency spectrum. These effects can be pro- grammed in real time and implemented as part of a digital audio Bode developed a barberpole phaser in which the spectral processing system. notches move endlessly in one direction in frequency [16]. The name ‘barberpole’ stems from a rotating cylindrical sign, usually white with a red stripe going around it, which have been tradition- 1. INTRODUCTION ally used in front of barber shops in England and in the US. As the pole rotates, a visual illusion of the red stripe climbing up end- Shepard introduced in the 1960s the infinitely ascending chromatic lessly along the pole is observed, although the pattern is actually scale, which was produced with additive synthesis [1, 2]. Risset expanded this idea by designing a continuously rising and falling sweep [3, 4]. The spectrum of two instances of the Shepard tone are shown in Figure 1. It is seen that the sinusoidal components are equally spaced in the logarithmic frequency scale, as each compo- nent is one octave higher than the previous one. A bell-shaped spectral envelope function takes care of the fade-in and fade-out of harmonic components. In addition to Shepard-Risset tones, other auditory illusions have been discovered, including binaural para- doxes [5] and rhythms which appear to be gaining speed in a nev- erending manner [4, 6]. This paper discusses impossible-sounding phasing and flanging effects inspired by the Shepard-Risset tones. Flanging is a delay-based audio effect which generates a se- Magnitude (dB) ries of sweeping notches on the spectrum of a signal [7, 8, 9, 10]. Historically, analog flanging was achieved by mixing the output of two tape machines and varying their speed by applying pres- sure on the flanges—hence the effect’s name [7, 9, 10]. Adding a signal with a delayed version of itself results in a comb filtering effect, introducing periodic notches in the output spectrum. As the 20 100 1k 10k Frequency (Hz) length of the delay changes over time, the number of notches and their position also changes, producing the effect’s characteristic Figure 1: Spectrum of a Shepard tone with 10 harmonics (solid swooshing or “jet aircraft” sound [7, 9]. Wanderley and Depalle lines), spaced one octave apart, and a raised-cosine spectral en- velope (dotted line) [1]. The dashed lines show the harmonics a ∗ The work of Fabián Esqueda is supported by the CIMO Centre for International Mobility and the Aalto ELEC Doctoral School. short time earlier. DAFX-1 Proc. of the 18th Int. Conference on Digital Audio Effects (DAFx-15), Trondheim, Norway, Nov 30 - Dec 3, 2015 frequencies (denoted by K) each filter will go through before it x[n] H1 (z) H 2(z) HM (z) y[n] completes a full cycle is the same for every filter and is determined by K = bFs/ρc ; (1) th Figure 2: Block diagram for the proposed network of M time- where Fs is the sampling rate of the system. The k center fre- th varying notch filters Hm(z) for m = 1; 2; 3; :::; M. The center quency for the m filter can then be computed from frequencies of these filters are situated at one-octave intervals. [K(m−1)+k−1]=K fc(m; k) = f02 (2) for k = 1; 2; 3; :::; K and m = 1; 2; 3; :::; M. The parameter f0 stationary. Barberpole phasing and flanging effects are currently is the center frequency of the first filter at the beginning of a cycle. available in some audio software, but it is not known to us how Next, the kth center gain of the mth filter is defined as they are implemented [17, 18]. Related recent work has focused on virtual analog models of (L − L )(1 − cos[θ(m; k)]) vintage flanger and phaser circuits, such as the digital modeling of L (m; k) = L + max min ; (3) c min 2 the nonlinear behavior caused by the use of operational transcon- ductance amplifiers [19] and bucket-brigade devices [20]. Eichas where Lmin and Lmax are the minimum and maximum attenuation et al. [21] have presented a detailed virtual analog model of a fa- levels in dB, respectively, and Lmax < Lmin < 0. The function θ mous phaser. Furthermore, some research has focused on under- is defined as standing how flanging, phasing, and other audio effects processing (m − 1)K + k − 1 is recognized by humans [22] or by the computer [23]. θ(m; k) = 2π : (4) In this paper we investigate ways to implement barberpole MK phasing and flanging effects. The inspiration for this comes from In summary, we must implement M notches that sweep uni- inverting the Shepard-Risset tone, i.e. replacing the spectral peaks formly throughout K frequencies, each with its own attenuation with notches, to create a new impossible audio effect. In the end, level. In order to achieve this amount of control for each filter, we we found that there are at least three different principles to obtain can use a parametric equalizer (EQ) filter structure [24]. This type this effect. This paper is organized as follows. Section 2 discusses of second-order IIR filter is commonly used in graphic equalizers, the basic cascaded notch filter technique to simulate the barber- since it allows users to increase (boost) or reduce (cut) the gain of pole phasing effect. Section 3 introduces a novel flanging method a specific frequency band. using a pair of delay lines. Section 4 describes a third method, The z-domain transfer function for the cutting case of the para- derived from that of Bode, which has its roots in single-sideband metric equalizer filter is given by modulation. Finally, Section 5 provides some concluding remarks. cos( 2πfc ) 1+Gβ Fs −1 1−Gβ −2 1+β − 2 1+β z + 1+β z H(z) = ; (5) cos( 2πfc ) 2. CASCADED TIME-VARYING NOTCH FILTERS Fs −1 1−β −2 1 − 2 1+β z + 1+β z The illusion of endless rising or falling sweeping notches, simi- Lc=20 lar to that of the phasing effect, can be achieved using a network where G is the scalar gain at the center frequency fc (i.e. 10 ) of cascaded time-varying notch filters (see Figure 2). To do so, and β is defined as we follow the design of the Shepard tone and place the center fre- s 2 quencies of the filters at one-octave intervals. This design choice GB − 1 ∆! β = 2 2 tan ; (6) translates into notches uniformly distributed along the logarithmic G − GB 2 frequency axis. The amount of attenuation caused by each filter is determined using an inverted version of the raised-cosine envelope where ∆! is the width of the filter at gain level GB [24]. Figure originally proposed by Shepard [1] (see Figure 1). 3 illustrates the relationship between these three parameters for a Considering the case of a rising notch sweep, as the center fre- filter with arbitrary center frequency f Hz. quencies of the filters move up the spectrum, notches approaching Now, the definition of ∆! is rather ambiguous in this case. It is generally taken to be the width of the filter 3 dB below the the Nyquist limit (fN ) will gradually disappear. Similarly, notches 2 coming from the low end of the spectrum will increase in depth reference level (i.e. GB = 1=2). In our case, since notches near as they reach the middle frequencies. Since the one-octave in- DC and fN may not reach this level of attenuation, this particular terval between notches is preserved at every time step, the center definition is inadequate.