Basic Digital Audio Effects
Total Page:16
File Type:pdf, Size:1020Kb
Digital Audio Effects Having learned to make basic waveforms and basic filtering lets CM0268 see how we can add some digital audio effects. These may be applied: MATLAB DSP GRAPHICS As part of the audio creation/synthesis stage — to be subsequently 332 • 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 1 • in the output audio. Selection of effects and the ordering is a matter for the sound you JJ • wish to create. There is no absolute rule for the ordering. II J I Back Close Effect Types and Parameters Effect Types and Parameters IPATCH LEVEL Typical Guitar (and other) Effects Pipeline PATCH LEVEL (Prm) illustration below. You can use all effect Determines the overall volume level of the patch. SomeLinking ordering Effects is standard for some audiomodule processing,s together or seE.glecti:vely set certain 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 Compression Distortion EQ modulesNoise to on Redux or off. Amp Sim and output level are equal). The patches of the! G1/G1X consist of! eight ! ! ! Modulation Delay Reverb CM0268 serially linked effect modules, as shown in the MATLAB ! ! DSP ICOMP/EFX (Compressor/EFX) module GRAPHICS Common for some guitar effects pedal: This module comprises the effects that control the level dynamics such as compressor, and Effect modules 333 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 1 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. JJ T 1 T 9 Tremolo For some effect modules, you can select an effect type from several possible choices. For example, the II 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 J 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 Note: Other Effects Units allow for a completely reconfigurable I rate. effects pipeline. E.g. Boss GT-8 Back Ring Mod (Ring Modulator) R 1 R 9 This effect produces a metallic ringing sound. Higher setting values result in higher modulation G Tap Close 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 Classifying Effects Audio effects can be classified by the way do their processing: CM0268 MATLAB DSP Basic Filtering — Lowpass, Highpass filter etc,, Equaliser GRAPHICS Time Varying Filters — Wah-wah, Phaser 334 Delays — Vibrato, Flanger, Chorus, Echo Modulators — Ring modulation, Tremolo, Vibrato Non-linear Processing — Compression, Limiters, Distortion, Exciters/Enhancers Spacial Effects — Panning, Reverb, Surround Sound 1 JJ II J I Back Close Basic Digital Audio Filtering Effects: Equalisers CM0268 MATLAB DSP GRAPHICS Filters by definition remove/attenuate audio from the spectrum 335 above or below some cut-off frequency. For many audio applications this a little too restrictive • Equalisers, by contrast, enhance/diminish certain frequency bands whilst leaving others unchanged: 1 Built using a series of shelving and peak filters • First or second-order filters usually employed. • JJ II J I Back Close Shelving and Peak Filters Shelving Filter — Boost or cut the low or high frequency bands with CM0268 a cut-off frequency, Fc and gain G MATLAB DSP GRAPHICS 336 Peak Filter — Boost or cut mid-frequency bands with a cut-off frequency, Fc, a bandwidth, fb and gain G 1 JJ II J I Back Close Shelving Filters A first-order shelving filter may be described by the transfer function: CM0268 MATLAB DSP H0 GRAPHICS H(z) = 1 + (1 A(z)) where LF=HF + = 2 ± − 337 where A(z) is a first-order allpass filter — passes all frequencies but modifies phase: 1 z− + a A z B=C ( ) = 1 B=Boost, C=Cut 1 + aB=Cz− which leads the following algorithm/difference equation: 1 y (n) = a x(n) + x(n 1) a y (n 1) 1 B=C − − B=C 1 − JJ H0 II y(n) = (x(n) y (n)) + x(n) 2 ± 1 J I Back Close Shelving Filters (Cont.) The gain, G, in dB can be adjusted accordingly: CM0268 G=20 MATLAB H = V 1 where V = 10 DSP 0 0 − 0 GRAPHICS 338 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 1 tan(2πfc=fs) V0 aC = − tan(2πfc=fs) V0 − JJ II J I Back Close Shelving Filters Signal Flow Graph H0/2 x(n) A(z) y (n) y(n) CM0268 1 + MATLAB DSP ±× GRAPHICS 339 where A(z) is given by: x(n 1) x(n) T − aB/C 1 ×× y(n) 1 ++ JJ aB/C × − II J T y (n 1) I 1 − Back Close 1 1 Peak Filters A first-order shelving filter may be described by the transfer function: CM0268 MATLAB DSP H0 GRAPHICS H(z) = 1 + (1 A2(z)) 2 − 340 where A2(z) is a second-order allpass filter: 1 2 a + (d da )z− + z− A(z) = − B − B 1 + (d da )z 1 + a z 2 − B − B − which leads the following algorithm/difference equation: 1 y (n) = 1a x(n) + d(1 a )x(n 1) + x(n 2) 1 B=C − B=C − − d(1 aB=C)y1(n 1) + aB=Cy1(n 2) JJ − − − − H II y(n) = 0 (x(n) y (n)) + x(n) 2 − 1 J I Back Close Peak Filters (Cont.) The center/cut-off frequency, d, is given by: d = cos(2πf =f ) c s CM0268 − MATLAB DSP GRAPHICS The H0 by relation to the gain, G, as before: 341 H = V 1 where V = 10G=20 0 0 − 0 and the bandwidth, fb is given by the limits for boost, aB, or cut, aC are given by: 1 tan(2πfb=fs) 1 aB = − JJ tan(2πf =f ) + 1 b s II tan(2πfb=fs) V0 aC = − J tan(2πfb=fs) V0 I − Back Close Peak Filters Signal Flow Graph 1 H0/2 − x(n) A(z) y1(n) y(n) CM0268 + + MATLAB DSP ×× GRAPHICS 342 where A(z) is given by: x(n) x(n 1) x(n 2) − − TT aB/C d(1 aB/C ) 1 ×××− − y(n) 1 +++ aB/C d(1 aB/C ) JJ ××− − II J TT y (n 2) y (n 1) 1 − 1 − I Back Close 1 1 Shelving Filter EQ MATLAB Example The following function, shelving.m performs a shelving filter: CM0268 MATLAB function [b, a] = shelving(G, fc, fs, Q, type) DSP % GRAPHICS % Derive coefficients for a shelving filter with a given amplitude 343 % and cutoff frequency. All coefficients are calculated as % described in Zolzer’s DAFX book (p.