FX Basics STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2013
effects modify the frequency content of the audio signal, achieving boosting or weakening specific frequency bands or regions. Although their broad application to processing sound signals dates back from the early days of recording, their use application to processing guitar electrical signal may have started in the 1950s. effects make use of filters, which are signal processors which alter magnitude and phase of signals by different amount s to different frequency components. Ex: equalization, wah-wah
Equalization Original term coined from the task of adjusting the balance between of (or equalize) different frequency components of a signal. Equalization is commonly achieved by means of a device specifically designed for a user-friendly control of the parameters governing the behavior of filters used for its construction. magnitude DESIRED FREQUENCY CONTENT CURRENT FREQUENCY CONTENT frequency User-friendly interface to controlling filters so that a desired alteration is achieved DIGITAL FILTERS!
Digital Filters Systems that perform mathematical operations (multiplications and additions) to a discrete input signal x[n] to modify some of its characteristics and obtain a discrete output signal y[n]. x[n] Input Signal DIGITAL FILTER y[n] Output Signal It is common to describe a digital filter in terms of how it affects amplitude and phase of different frequency components of a signal. Ultimately, the design of digital filters is driven by such desired features. In general, digital filter design is not an easy task.
Digital Filters (ii) Magnitude Response 1 0.5 LOWER FREQUENCIES ARE UNALTERED HIGHER FREQUENCIES ARE ATTENUATED BY A FACTOR OF 2 1/f L f L f c Characteristic Frequency f H f s /2 90 HIGHER FREQUENCIES ARE DELAYED BY A QUARTER OF A PERIOD 1/f H Phase Response 90 deg
Digital Filters (iii) FREQUENY DOMAIN FREQUENCY RESPONSE DFT TIME DOMAIN IMPULSE RESPONSE H(f) h[n] f s /2 f n <H(f) IMPULSE ( delta function) IMPULSE RESPONSE δ[n] h[n] X[f] H[f] PRODUCT Y[f] = X[f] H[f] x[n] h[n] CONVOLUTION y[n] = x[n]*h[n]
Digital Filters (iv) How to explore the frequency domain response of a given filter? Among other options SINUSOIDAL ANALYSIS - Generate a sinusoidal x i [n] for each frequency f i to study - Feed filter with each sinusoidal signal x i [n] and obtain a sinusoidal y i [n] - Obtain magnitude and phase responses for each frequency f i : H(f i ) = A(y i )/A(x i ) IMPULSE RESPONSE - Generate an impulse delta signal δ[n] <H[f i ] = <y i - <x i - Feed filter with signal δ[n] and obtain output signal h[n] - Obtain H(f) via DFT( h[n] ) - Obtain magnitude and phase responses as: H[f] = abs( H[Ω] ) <H[Ω] = angle( H[Ω] )
Digital Filters (v) Digital filters are commonly expressed by their difference equation: y[n] = M i=0 b 0 x[n] + b 1 x[n-1] + + b M x[n-m] = Σ b i x[n-i] - Σ a j y[n-j] NON-RECURSIVE PART - a 1 y[n-1] - - a N y[n-n] N j=1 RECURSIVE PART b i, a j max(m,n) CURRENT AND PREVIOUS INPUT SAMPLES PREVIOUS OUTPUT SAMPLES FILTER COEFFICIENTS FILTER ORDER or by their transfer function (in the frequency domain, through the Z transform): H(z) = Y(z) = b 0 + b 1 z -1 + + b N z -M X(z) 1+ a 1 z -1 + + a N z -N z -M denotes M samples of delay
Digital Filters (vi) Two main types of digital filters: Finite Impulse Response ( FIR ) - Presents only b i coefficients being non-zero : NON-RECURSIVE - Finite h[n] - Phase response is linear Infinite Impulse Response ( IIR ) H(z) = b 0 + b 1 z -1 + + b N z -M 1+ a 1 z -1 + + a N z -N - Presents both b i and a j coefficients being non-zero: RECURSIVE - Infinite h[n] - Phase response is non-linear - Need less computations for similar desired characteristics - May suffer from numerical problems due to feedback
Gain (log) Digital Filters (vii) Some prototypical basic filters ( magnitude response ): LOW-PASS (LP) HIGH-PASS (HP) BAND-PASS (BP) ALL-PASS (AP) Introduces a desired PHASE SHIFT Freq. (log) f L f H PEAK NOTCH LOW-SHELF HIGH-SHELF BW G L G H BW
Digital Filters (viii) LPF (Butterworth) design parameters/constraints: 1st ORDER db Characteristic Frequency -6dB/oct Roll-Off Desired { } DESIGN PROCEDURE f (oct) Filter Coefficients {b i,a j } 2nd ORDER db -12dB/oct Roll-Off High Q ( Quality Factor ) Low BW ( Bandwidth ) f (oct) Low Q High BW Desired {,Q} or {,BW} DESIGN PROCEDURE Filter Coefficients {b i,a j }
Digital Filters (ix) BPF design parameters/constraints: db BW Desired {f L,f H } or {,BW} 2nd ORDER -12dB/oct Roll-Off DESIGN PROCEDURE f L f H f (oct) Filter Coefficients {b i,a j } PEAK design parameters/constraints: db BW Desired {,G 0,BW} or {,G 0,Q} 2nd ORDER G 0 Q DESIGN PROCEDURE f (oct) Filter Coefficients {b i,a j }
Digital Filters (x) HIGH-SHELF design parameters/constraints: db Desired {,G 0,S} 2nd ORDER G 0 S SHELF SLOPE +12dB/oct (max) DESIGN PROCEDURE f (oct) Filter Coefficients {b i,a j } All these filters functions can be implemented by means of the 2 nd order BIQUAD section: How to design them? Extensive theory & literature!! Quick method: R. Bristow-Johnson s cookbook: H(z) = b 0 + b 1 z -1 + b 2 z -2 a 0 + a 1 z -1 + a N z -2 http://www.musicdsp.org/files/audio-eq-cookbook.txt 04_stomp_filtering_1.pd
Equalization (ii) N-BAND EQUALIZER by PARALLEL BAND-DEDICATED, FIXED FILTERS Input Signal Band Filters Variable Gains LP BP BP BP BP HP G G G G G G 0dB Output Signal + GRAPHIC EQUALIZER Fixed Filters: only Control of Combination (Gains)
Equalization (iii) N-BAND EQUALIZER by CASCADE of BAND-DEDICATED, CONTROLLABLE SECTIONS Input Signal Section 1 Section N Output Signal G LOW f LOW G MID f MID Q MID G HIGH f HIGH PARAMETRIC EQUALIZER Variable Gains, Frequencies, and Bandwidths. LOW SHELF PEAK HIGH SHELF ISSUE: Changes in Gain/Frequency lead to Q/BW variation Constant-Q filters! +G MAX 0dB http://www.rane.com/note101.html f LOW f PEAK f HIGH
Wah-wah Dating back from the 60s, its name was given after voice tone modulation (formant shift) caused by transition between vowels. http://www.geofex.com/article_folders/wahpedl/voicewah.htm In its most basic form, it consists on shifting the center frequency of a resonant filter (Peak BP or LP) Pedal Angle Input Signal map RESONANT FILTER Output Signal G G 0dB 0dB f MIN f MAX f MIN f MAX 05_stomp_filtering_2.pd