
Sound Synthesis with Periodic Linear Time-Varying Filters Antonio GOULART Joseph TIMONEY Marcelo QUEIROZ Victor LAZZARINI Computer Science Department Sound and Digital Music Technology Group Sonology Research Center National University of Ireland - Maynooth University of S~aoPaulo Maynooth - Co. Kildare - Ireland S~aoPaulo - Brazil fjoseph.timoney, [email protected] fag, [email protected] Abstract Linear Time-Varying (PLTV) systems. With In this survey we explore implementations of re- these new approaches we operate by modulat- cently proposed distortion synthesis techniques, ing the coefficients of a filter, and it was shown namely the Feedback Amplitude Modulation (1st [Pekonen, 2008] that it results in a kind of and 2nd order cases) and Allpass filter coefficient dynamic version of phase distortion [Ishibashi, modulation. These techniques are based on Periodic 1987]. A thorough study of time-varying sys- Linear Time-Varying systems, in which we operate tems applied to these techniques [Cherniakov, by finding a suitable modulation function to obtain 2003] [Timoney et al., 2014] discloses the ap- a desired spectrum. In order to illustrate this survey and encourage exploration of these new techniques propriate tools for properly understanding and we present examples in the Csound language. using these new synthesis processes. These sys- tems are intended to operate differently than Keywords audio effects such as time-varying delay lines allpass filter coefficient modulation, feedback ampli- used in flanging [Zolzer, 2011] and allpass filters tude modulation, periodic linear time-varying sys- used to obtain variable fractional delays [Peko- tems, distortion synthesis nen et al., 2010]. Additionally, they do not re- place another type of variation within musical 1 Introduction systems where users manually change (e.g. with Knowledge of a good set of synthesis techniques a knob) parameter values to achieve a sonic ef- is a must for electronic / electroacoustic / com- fect, such as mentioned in [Wishnick, 2014]. puter musicians, sound designers and synthe- Our motivation for presenting this survey siser builders. Audio effects plugins developers comes from the fact that most audio program- also benefit from dealing with synthesis tech- mers' work is supported by classic Linear Time- niques that can also be used in an audio effect Invariant (LTI) systems theory [Oppenheim and context, such as the ones that will be presented. Schafer, 1975], but Linear Time Varying (LTV) In a previous survey, classic and recent dis- systems theory is less well covered in the liter- tortion synthesis techniques along with their ature [Huang and Aggarwal, 1982]. Also, time- implementations were presented at the LAC varying tools were indeed considered a long time [Lazzarini, 2009]. Waveshaping [LeBrun, 1979], ago [Layzer, 1971] [Risset, 1969] for audio appli- phaseshaping [Ishibashi, 1987], and summation cations within our context, but only recently are formulae [Moorer, 1976], some of the classic ap- being tackled in a more comprehensive fashion. proaches to distortion synthesis, were analysed A good understanding of LTV theory can bring mathematically and demonstrated in Csound us new kinds of synthesis/effects techniques and code. More recent or unusual approaches like different ways for implementing established ones asymmetrical FM [Palamin et al., 1988], Phase (which can bring nice variations or reduce com- Aligned Formants [Puckette, 1995], and Modi- putational costs). fied FM synthesis [Lazzarini and Timoney, 2010] We will dedicate each of the next sections to were also exposed. Other, more common dis- one technique and then conclude the text. The tortion techniques, are also widely presented in aim of this paper is not to delve into the the- computer music textbooks [Dodge and Jerse, ory of LTV systems; our intention, instead, is 1997] [Moore, 1990] [Puckette, 2007]. to present another look at some techniques and In this paper, we address some recent tech- also provide code1 for their implementation. niques which extend the distortion synthesis 1 family, namely techniques based on Periodic http://www.ime.usp.br/~ag/dl/lac15-code.zip 2 Allpass coefficient modulation In order to get an approximation of a sawtooth An allpass filter contains poles and zeros at re- from a cosine, we must read the rising part of ciprocal distances from the origin, so their ef- the cosine in a shorter time, and take more time fects on all frequencies are balanced [Moore, to read the decaying portion. The function we 1990]. A typical 1st order invariant allpass must add to the phase generator, in this case, would have a fixed coefficient, but a time- is drawn on the upper panel of Figure 1 and is varying one has the transfer function given by [Lazzarini et al., 2009b] ( −m(t) + z−1 ( 1 − d) x ; x < d g(x) = 2 d (6) H(z; t) = −1 ; (1) 1 1−x 1 − m(t)z ( 2 − d) 1−d ; x ≥ d; with m(t) as the modulating function which where d is how long it takes to read from the drives the coefficient. Using this filter, a time- start of the cosine table up to its maximum, varying phase distortion given by [Timoney et and the smaller it is the more abrupt the rising al., 2009] [Laakso et al., 1996] ramp will be and the more distortion we will obtain. If we want to implement g(x) using a mod- −m(t) sin (!) φ(!; t) = −!+2 tan−1 (2) ulated allpass filter we will get better results if 1 − m(t) cos (!) φ(!; t) goes from −! to −π [Lazzarini et al., 2009b], so we make is introduced in the signal. If we know how we want the phase to be distorted { in other words, if we know φ(!; t) { we can use the ap- g(t)((1 − 2d)π − !) φ(!; t) = − (1 − 2d)π − !: proximation tan (x) ≈ x [Timoney et al., 2009] (1 − 2d)π and determine the modulating signal as (7) The resulting modulation function is shown on the lower panel of Figure 1. On Figures 2 −(φ(!; t) + !) m(t) = : (3) and 3 we can see the waveforms and spectra 2 sin (!) − (φ(!; t) + !) cos (!) of the sawtooths generated with both the origi- The allpass filtering described can be imple- nal technique and the modulated allpass based mented with the difference equation [Lazzarini one. Notice that the missing components of the et al., 2009b] classic phase distortion technique are actually present in the spectrum of the modulated all- pass output. We can also see and hear that y(n) = x(n − 1) − m(n)(x(n) − y(n − 1)): (4) the latter spectrum is richer. The code for im- plementing this example is given in Listing 1, The condition jm(n)j < 1; 8n; assures stability where we can see two instruments; the first one [Cherniakov, 2003] and a DC offset works as a synthesis instrument, distorting the sinusoid and producing richer spectra; the sec- 1 − m(n) ond one applies the same technique as an au- DC(n) = (5) 1 + m(n) dio effect, distorting the sound of a pre-recorded flute (any sound file can be used, or even a mi- is introduced in the signal [Pekonen, 2008]. crophone input). 2.1 Classic phase distortion emulation Listing 1: Classic phase distortion emulation as In [Pekonen, 2008] [Lazzarini et al., 2009b] [Ti- synthesis (instrument 1) and technique used as money et al., 2014], we find as an example for an audio effect (instrument 2) this technique the emulation of the classic phase distortion [Ishibashi, 1987]. The phase distor- 1 <CsoundSynthesizer> 2 tion algorithm consists of reading a cosine table 3 <CsOptions> in an unusual way. Instead of getting indexes 4 −o dac from a regular phase generator (which goes from 5 </CsOptions> 0 to 1 in a period related to the chosen funda- 6 7 <CsInstruments> mental frequency) multiplied by the table size, 8 we add another function to the phase genera- 9 0 dbfs=1 tor values and then read the cosine wavetable. 10 11 /∗ audio−rate coeff allpass ∗/ 12 opcode Allpass , a , aa 13 adel i n i t 0 14 setksmps 1 15 audio , a c o e f xin 16 aw = audio + a c o e f ∗ adel 17 ay = −aw∗ a c o e f + adel 18 adel = aw 19 xout ay 20 endop 21 22 23 /∗ PD f u n c t i o n ∗/ 24 /∗ inflection point ∗/ 25 gip = 0 . 1 26 27 /∗ ftgen producing line segments ∗/ Figure 1: Phase distortion function (up- 28 ipdfun ftgen 1,0,16384,7,0,16384∗ gip per panel) and coefficient modulation function ,1 ,16384∗(1 − gip ) ,0 (lower panel). Source: [Timoney et al., 2014] 29 30 /∗ 31 i n s t r 1 : 32 PD s y n t h e s i s 33 using s i n e wave input 34 ∗/ 35 36 i n s t r 1 37 i f r = p5 38 iamp = p4 39 40 /∗ regular phase generator ∗/ 41 aph phasor i f r 42 /∗ phase distortion signal ∗/ 43 apd tablei aph, 1, 1, 0, 1 44 45 /∗ scaling of pd signal (eq.7) ∗/ 46 iw = 2∗$M PI∗ i f r / s r /∗omega value ∗/ 47 i a = (1 − 2∗ gip ) ∗$M PI 48 apd = apd∗ i a Figure 2: Waveforms generated with the classic 49 apd = apd ∗( i a − iw ) / i a − i a − iw technique (solid line) and the modulated allpass 50 (dashed line). Source: [Timoney et al., 2014] 51 /∗ coefficient modulation function 52 obtained from phase distortion 53 s i g n a l ( equation 3) ∗/ 54 /∗ envelope for modulation ∗/ 55 kmod l i n s e g 0 , 1 , 1 , p3 −2 ,1 ,1 ,0 56 amod = −kmod∗(apd + iw)/(2∗ s i n ( iw ) − ( apd+iw ) ∗ cos ( iw ) ) 57 58 /∗ s i n e input ∗/ 59 a s i n t a b l e i aph , −1 ,1 ,0 ,1 60 61 /∗ a l l p a s s ∗/ 62 asig Allpass asin,amod 63 64 /∗ envelope ∗/ 65 aout l i n e n r a s i g ∗ iamp, 0.01, 0.1, 0.01 66 67 outs aout , aout 68 endin Figure 3: Spectra obtained with the classic tech- 69 nique (upper panel) and with modulated allpass 70 /∗ (lower panel).
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages8 Page
-
File Size-