You are on page 1of 17

ELEN E4896 MUSIC SIGNAL PROCESSING

Lecture 7:
Filters & Reverb
1. Filters & EQ
2. Time delay effects
3. Reverb

Dan Ellis

Dept. Electrical Engineering, Columbia University


dpwe@ee.columbia.edu
E4896 Music Signal Processing (Dan Ellis)

http://www.ee.columbia.edu/~dpwe/e4896/
2013-03-04 - 1 /17

1. Filters & EQ

EQ is a critical tool in audio mixing


boost/cut on single control
each instrument has its own space

Different formats

Low/Mid/High, Parametric

Graphic EQ
E4896 Music Signal Processing (Dan Ellis)

2013-03-04 - 2 /17

EQ filters

How to get boost + cut from a single filter?


1

A(z)

-0.5

-0.2
-0.4

-0.6

-10
-1

1 Re{z}

-20

{A(z)}

10

0.5

-1

|A(z)|

20

level / dB

Im{z}

use allpass

-0.8
0

0.2

0.4

0.6

0.8

0.2

0.4

0.6

0.8

then +/- to get phase cancellation/reinforcement


+
A(z)

y[n]

level / dB

x[n]

1 + g A(z)

20

g = -1

10

g=0

g = -1...1

-10
-20

g=1
0.2

0.4

0.6

0.8

s03-allpass1.pd

E4896 Music Signal Processing (Dan Ellis)

2013-03-04 - 3 /17

Allpass Filters

Allpass filters have flat gain: |A(ej)| = 1


from mirror-image numerator and denominator:
A(z) =

A(z)

)
0.6 + z
A(z) =
1 0.6z

-0.5
0

1 Re{z}

-20

{A(z)}

-0.4

-0.6

-10
-1

-0.2

10

0.5

-1

0.6z

|A(z)|

20

level / dB

Im{z}

e.g. for Dm (z) = 1

Dm (z
Dm (z)

-0.8
0

0.2

0.4

0.6

0.8

0.2

0.4

0.6

0.8

slope governs phase interactions, group delay


g ( c)
E4896 Music Signal Processing (Dan Ellis)

d ( )
d

2013-03-04 - 4 /17

Group Delay

Local phase change of H(z) governs effective


delay of that frequency region: group delay

g ( c)

d ( )
d

8000

Frequency

6000

4000

2000

0.5

1.5
Time

2.5

0.5

1.5
Time

2.5

8000

Frequency

6000

4000

2000

E4896 Music Signal Processing (Dan Ellis)

2013-03-04 - 5 /17

Parametric EQ
Im{z}

2nd order Allpass slope & place () =


|A(z)|

10
dB

0.5
0

-0.5

-10

-20

-0.5

-1.5

-30

-1
-1

-0.5

0.5

Re{z}

{A(z)}

0.2

0.4

0.6

0.8

-2

0.2

0.4

0.6

0.8

angle frequency
radius slope bandwidth

x[n]

+
A(z)

y[n]

1 + g A(z)

20

level / dB

Same structure for EQ

g=1

10

g=0

g = -1...1

-10
-20

E4896 Music Signal Processing (Dan Ellis)

g = -1
0

0.2

0.4

0.6

0.8

s06-allpass2.pd

2013-03-04 - 6 /17

Time-Varying Filters

Classic Wah-Wah ?

Iterated Filters...
s07-wahwah.pd

E4896 Music Signal Processing (Dan Ellis)

2013-03-04 - 7 /17

2. Time Delays

Delays correspond to sound propagation


340 m/s 1 foot / ms

Delays are a simple kind of filter

can analyze from Fourier perspective...

x[n]

delay

y[n]
1

|H(ej)|

h[n] = [n ]

H(ej) = ej

{H(ej)}

1
0

E4896 Music Signal Processing (Dan Ellis)

n
2013-03-04 - 8 /17

Fractional Delays

For short delays, one sample quantization


may be too coarse

1 sample @ 44.1 kHz = 22.7 s

Fractional delay can be recovered


from Fourier domain
e

sin (n
(n

)
)

= sinc(n

1
0.8

sinc(n-)

0.6
0.4

h[n]

0.2
0
-0.2
-0.4

truncated FIR implementation


E4896 Music Signal Processing (Dan Ellis)

10

time / samples

2013-03-04 - 9 /17

Comb Filters
x[n]

y[n]

+
delay

h[n]

Delay added to direct path causes comb

Im{z}

.. from phase interactions

1+g

0.5
1

0
-0.5

1- g
0

-1
/

2/

3/

4/

5/

...

Range of perceptual effects

< 10 ms - phasing (spectral structure)


20-100 ms - chorus/doubling
> 100 ms - echo

E4896 Music Signal Processing (Dan Ellis)

-1

-0.5

0.5

1
Re{z}

s10-comb.pd

2013-03-04 - 10/17

IIR Comb Filters

x[n]

Feedback delay spreads out more in time


y[n]

h[n] 1

delay

g2

g3

g4 ...
n

Im{z}

Poles can give unbounded gain


1
1+g

0.5
0
-0.5

1
1
1- g
0

-1
/

2/

3/

4/

5/

...

-1

-0.5

0.5

1
Re{z}

s11-iircomb.pd

E4896 Music Signal Processing (Dan Ellis)

2013-03-04 - 11/17

Time Varying Delay

Periodic variation over large range


Pitch modulation

analogous to Doppler shift


x[n]

delay line
y[n]

Random (but smooth) shift over short delay


Chorus

pattern of cancellation notches like detuned


voices
s12-vardelay.pd

E4896 Music Signal Processing (Dan Ellis)

2013-03-04 - 12/17

3. Reverberation

Received sound is direct path


+ reflections

l(t)

delayed relative
to direct path
different at
each ear
Direct-toReverberant...

direct
reflected
t

r(t)

R/

SourceEar is ~ LTI

can use impulse response, convolution


freq / Hz

hlwy16 - 128pt window

0.1
0.05
0

-10

0.1

-20

6000
0.05

-30

-40

-0.05

-50

4000

-0.05
-0.1

8000

2000

0.2

0.4

0.6

0.8
time / s

E4896 Music Signal Processing (Dan Ellis)

-0.1
0

-60

0.01
0.1

0.2

0.02
0.3

0.4

time 0.5
/s

0.03
0.6

0.7 time / s

-70

2013-03-04 - 13/17

Early Echoes & Late Reverb

Reflected paths are like virtual sources


virtual (image) sources

reflected
path

source

listener

first part of reverberant IR is sparse

Reflections quickly
build up & merge
later part of
reverb is like
decaying noise

0.1
0.05
0
-0.05
0 05

0.1

-0.1

0.05

0.01
0

0.2

0.4
0.
.4 0.005 0.6

-0.05

-0.005

-0.1

E4896 Music Signal Processing (Dan Ellis)

0.01

0.02

0.03

-0.01
0.2

0.8

0.3

0.4

0.5

0.6

2013-03-04 - 14/17

Nested Allpass

Allpass efficiently creates decaying response


multiple, combined filters for complex patterns

FIR Comb
2
1.5

Allpass

z-k

-g
H(z) =
1 - gz-k

-g

0.5
0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

6
4

x[n]

y[n]
+

z-k

h[n]

1-g2
g(1-g2) 2
g (1-g2)
k

g
g,k

3k

iIR Comb

Imaginary Part

-g

Nested+Cascade Allpass
50,0.5
20,0.3

2k

Synthetic Reverb
+

30,0.7

a0
+

AP0
g

E4896 Music Signal Processing (Dan Ellis)

AP1
LPF

0
0.5
1

+
a1

0.5

a2

0.5

0
0.5
Real Part

AP2
s15-gardnerverb.pd

2013-03-04 - 15/17

Feedback Delay Network

Matrix of feedbacks gives even more


complex patterns

from Stauter & Puckette 1982

Unitary matrix ensures decay

s16-reverb.pd

E4896 Music Signal Processing (Dan Ellis)

2013-03-04 - 16/17

Filters:

Summary

EQ used to balance mixes


Varying filters gives effects e.g. Wah-wah

Delays

Wide range of effects: phasing ... echo


Fractional delays

Reverb

Just a complex pattern of echoes


Discrete early echoes reverberant tail

E4896 Music Signal Processing (Dan Ellis)

2013-03-04 - 17/17

You might also like