Digital Audio Effects
Total Page:16
File Type:pdf, Size:1020Kb
CM3106 Chapter 7: Digital Audio Effects Prof David Marshall [email protected] and Dr Kirill Sidorov [email protected] www.facebook.com/kirill.sidorov School of Computer Science & Informatics Cardiff University, UK Digital Audio Effects Having learned to make basic sounds from basic waveforms and more advanced synthesis methods lets see how we can at some digital audio effects. These may be applied: As part of the audio creation/synthesis stage | to be subsequently filtered, (re)synthesised At the end of the audio chain | as part of the production/mastering phase. Effects can be applied in different orders and sometimes in a parallel audio chain. The order of applying the same effects can have drastic differences in the output audio. Selection of effects and the ordering is a matter for the sound you wish to create. There is no absolute rule for the ordering. CM3106 Chapter 7: Digital Audio Effects Intro 2 FX Pipeline Effect Types and Parameters Apply effects in which order? Effect Types and Parameters IPATCH LEVEL Some ordering is standard for some audio processing, E.g: PATCH LEVEL (Prm) Compression Distortion EQ Noiseillustrati Reduxon below. YoAmpu can us Sime all effect Determines the overall volume level of the patch. ModulationLinking Effects!Delay Reverb! ! modules together o!r selectively set ce!rtain 2 1 0 Sets the patch level in the range from 2 – 98, 1.0. A setting of 80 corresponds to unity gain (input level ! ! modules to on or off. and output level are equal). CanTh alsoe patch bees of configurable. the G1/G1X consist of eight serially linked effect modules, as shown in the Common for order guitar (and other sources) effects pedal: ICOMP/EFX (Compressor/EFX) module This module comprises the effects that control the level dynamics such as compressor, and Effect modules modulation effects such as tremolo and phaser. COMP/EFX DRIVE EQ ZNR AMP MODULATION DELAY REVERB COMP/EFX (Type&Prm) Compressor FD Clean ZNR AMP Sim. Chorus Delay Hall Auto Wah VX Clean Ensemble Tape Echo Room Adjusts the COMP/EFX module effect type and intensity. Booster HW Clean Flanger Analog Spring Delay Compressor Tremolo US Blues Step Arena Ping Pong C 1 C 9 This is an MXR Dynacomp type compressor. It attenuates high-level signal components and boosts Phaser BG Crunch Pitch Shift Delay Tiled Room low-level signal components, to keep the overall signal level within a certain range. Higher setting values result in higher sensitivity. Effect types Auto Wah A 1 A 9 This effect varies wah in accordance with picking intensity. Higher setting values result in higher * Manufacturer names and product names mentioned in this listing are trademarks or sensitivity. registered trademarks of their respective owners. The names are used only to illustrate sonic B 1 B 9 Booster characteristics and do not indicate any affiliation with ZOOM CORPORATION. Raises signal level and creates a dynamic sound. Higher setting values result in higher gain. T 1 T 9 Tremolo For some effect modules, you can select an effect type from several possible choices. For example, the This effect periodically varies the volume. Higher setting values result in faster modulation rate. MODULATION module comprises Chorus, Flanger, and other effect types. The REVERB module Phaser comprises Hall, Room, and other effect types from which you can choose one. P 1 P 9 This effect produces sound with a pulsating character. Higher setting values result in faster modulation CM3106 Chapter 7: Digital Audio Effects Intro 3 rate. Ring Mod (Ring Modulator) R 1 R 9 This effect produces a metallic ringing sound. Higher setting values result in higher modulation G Tap frequency. Explanation of symbols A [TAP] icon in the listing Slow Attack TAP indicates a parameter that can be S 1 S 9 This effect reduces the attack rate of each individual note, producing a violin playing style sound. Higher setting values result in slower attack times. G Module selector set with the [BANK UP•TAP] Vox Wah The Module selector symbol key. V 1 V 9 This effect simulates a half-open vintage VOX wah pedal. Higher setting values result in higher shows the position of the knob at emphasized frequency. When the respective module/effect type is which this module/parameter is Cry Wah selected in edit mode and the [BANK UP•TAP] called up. 1 9 This effect simulates a half-open vintage Crybaby wah pedal. Higher setting values result in higher key is pressed repeatedly, the parameter (such as emphasized frequency. G Expression pedal modulation rate or delay time) will be set according to the interval in which the key is A pedal icon in the listing IDRIVE module pressed. indicates a parameter that can be This module includes 20 types of distortion and an acoustic simulator. For this module, the two controlled with the built-in or an items DRIVE and GAIN can be adjusted separately. external expression pedal. DRIVE (Type) Selects the effect type for the DRIVE module. When this item is selected, the parameter in the module can then be controlled in real time with a FD Clean VX Clean connected expression pedal. Clean sound of a Fender Twin Reverb ('65 F D V Clean sound of the combo amp VOX AC- model) favored by guitarists of many 30 operating in class A. music styles. 18 ZOOM G1/G1X ZOOM G1/G1X 19 Effects Types Audio effects can be classified by the way process signals: Basic Filtering: Lowpass, Highpass filter etc., Equaliser Time Varying Filters: Wah-wah, Phaser Delays: Vibrato, Flanger, Chorus, Echo Modulators: Ring modulation, Tremolo, Vibrato Non-linear Processing: Compression, Limiters, Distortion, Exciters/Enhancers Spacial Effects: Panning, Reverb, Surround Sound CM3106 Chapter 7: Digital Audio Effects Intro 4 Basic Digital Audio Filtering Effects: Equalisers Filtering: Filters by definition remove/attenuate audio from the spectrum above or below some cut-off frequency. For many audio applications this a little too restrictive Equalisation: Equalisers, by contrast, enhance/diminish certain frequency bands whilst leaving others unchanged: Built using a series of shelving and peak filters First or second-order filters usually employed. CM3106 Chapter 7: Digital Audio Effects Equalisation 5 Shelving and Peak Filters Shelving Filter: Boost or cut the low or high frequency bands with a cut-off frequency, Fc and gain G: CM3106 Chapter 7: Digital Audio Effects Equalisation 6 Shelving and Peak Filters (Cont.) Peak Filter: Boost or cut mid-frequency bands with a cut-off frequency,Fc , a bandwidth, fb and gain G: CM3106 Chapter 7: Digital Audio Effects Equalisation 7 Shelving Filters A First-order Shelving Filter: Transfer function: H H(z) = 1 + 0 (1 A(z)) where LF =HF + = 2 ± − where A(z) is a first-order allpass filter | passes all frequencies but modifies phase: −1 z + aB=C A(z) = −1 B=Boost, C=Cut 1 + aB=C z which leads the following algorithm/difference equation: y1(n) = a x(n) + x(n 1) a y1(n 1) B=C − − B=C − H y(n) = 0 (x(n) y1(n)) + x(n) 2 ± CM3106 Chapter 7: Digital Audio Effects Equalisation 8 Shelving Filters (Cont.) Shelving Filter Parameters: The gain, G, in dB can be adjusted accordingly: G=20 H0 = V0 1 where V0 = 10 − and the cut-off frequency for boost, aB , or cut, aC are given by: tan(2πfc =fs ) 1 aB = − tan(2πfc =fs ) + 1 tan(2πfc =fs ) V0 aC = − tan(2πfc =fs ) V0 − CM3106 Chapter 7: Digital Audio Effects Equalisation 9 Shelving Filters Signal Flow Graph H0/2 x(n) A(z) y1(n) + y(n) ±× where A(z) is given by: x(n 1) x(n) T − aB/C 1 ×× y(n) ++ aB/C × − T y (n 1) 1 − CM3106 Chapter 7: Digital Audio Effects Equalisation 10 1 1 Peak Filters A 2nd-order Peak Filter Transfer function: H0 H(z) = 1 + (1 A2(z)) 2 − where A2(z) is a second-order allpass filter: −1 −2 aB + (d daB )z + z A(z) = − − −1 −2 1 + (d daB )z + aB z − which leads the following algorithm/difference equation: y1(n) = 1a x(n) + d(1 a )x(n 1) + x(n 2) B=C − B=C − − d(1 a )y1(n 1) + a y1(n 2) − − B=C − B=C − H0 y(n) = (x(n) y1(n)) + x(n) 2 − CM3106 Chapter 7: Digital Audio Effects Equalisation 11 Peak Filters (Cont.) Peak Filter Parameters: The center/cut-off frequency, d, is given by: d = cos(2πfc =fs ) − The H0 by relation to the gain, G, as before: G=20 H0 = V0 1 where V0 = 10 − and the bandwidth, fb is given by the limits for boost, aB , or cut, aC are given by: tan(2πfb=fs ) 1 aB = − tan(2πfb=fs ) + 1 tan(2πfb=fs ) V0 aC = − tan(2πfb=fs ) V0 − CM3106 Chapter 7: Digital Audio Effects Equalisation 12 Peak Filters Signal Flow Graph 1 H0/2 − x(n) A(z) y1(n) + + y(n) ×× where A(z) is given by: x(n) x(n 1) x(n 2) − − TT aB/C d(1 aB/C ) 1 ×××− − y(n) +++ aB/C d(1 aB/C ) ××− − TT y (n 2) y (n 1) 1 − 1 − CM3106 Chapter 7: Digital Audio Effects Equalisation 13 1 1 Shelving Filter EQ MATLAB Example (1) shelving.m function [b, a] = shelving(G, fc, fs, Q, type) % % Derive coefficients for a shelving filter with a given amplitude % and cutoff frequency. All coefficients are calculated as % described in Zolzer's DAFX book (p. 50 -55). % % Usage: [B,A] = shelving(G, Fc, Fs, Q, type); % % G is the logrithmic gain (in dB) % FC is the center frequency % Fs is the sampling rate % Q adjusts the slope be replacing the sqrt(2) term % type is a character string defining filter type % Choices are: 'Base_Shelf' or 'Treble_Shelf' % Error Check if((strcmp(type,'Base_Shelf') ~=1)&& ..