Академический Документы
Профессиональный Документы
Культура Документы
] [n x
] [n y
Copyright 2005, S. K. Mitra 4
Time Time- -Domain Operations Domain Operations
The FIR filter of the previous slide is
characterized in the time-domain by the
difference equation
Equivalently, in the frequency-domain it is
characterized by the transfer function
1 < + = ], [ ] [ ] [ R n x n x n y
R
z z H
+ =1 ) (
Copyright 2005, S. K. Mitra 5
Time Time- -Domain Operations Domain Operations
The delay parameter R in the previous two
equations denote the time sound wave takes to
travel from the sound source to the listener
after bouncing back from the reflecting wall
The parameter , with , represents signal
loss caused by propagation and reflection
1 <
Copyright 2005, S. K. Mitra 6
Time Time- -Domain Operations Domain Operations
The impulse response and the magnitude
response of the single echo filter for =0.8
andR =8 are shown below:
Program 15_6.mcan be used to investigate the
effect of a single echo
0 10 20 30 40
0
0.2
0.4
0.6
0.8
1
Time index n
M
a
g
n
itu
d
e
Impulse Response
0 0.2 0.4 0.6 0.8 1
0
0.5
1
1.5
2
/
M
a
g
n
itu
d
e
|H(e
j
)|
2
Copyright 2005, S. K. Mitra 7
Time Time- -Domain Operations Domain Operations
Multiple Echo Filter
The FIR filter shown below generates a fixed
number of multiple echoes spaced R sampling
periods apart with exponentially delaying
amplitudes
+
R
z
] [n x ] [n y +
R N
z
) ( 1
N
Copyright 2005, S. K. Mitra 8
Time Time- -Domain Operations Domain Operations
The transfer function of the multiple echo filter
of the previous slide is given by
The impulse response of a multiple echo filter
with =0.8, N =6, and R =4, is shown
below:
1
1
1
<
=
, ) (
R
NR N
z
z
z H
0 10 20 30 40
0
0.2
0.4
0.6
0.8
1
Time index n
A
m
p
litu
d
e
Impulse Response of a Multiple Echo Filter
Copyright 2005, S. K. Mitra 9
Time Time- -Domain Operations Domain Operations
An infinite number of echoes spaced R sample
periods apart with exponentially decaying
amplitudes can be generated by the IIR filter
shown below:
R
z
] [n x ] [n y +
+
+
1
_
+ x[n]
y[n]
z
R
_
+
+
1
_
Copyright 2005, S. K. Mitra 17
Time Time- -Domain Operations Domain Operations
The transfer function of the allpass
reverberator is given by
In the steady state, the spectral balance of the
sound signal remains unchanged due to unity
magnitude response of the allpassreverberator
Program 15_8.mcan be used to investigate the
effect of the allpassreverberator
1
1
<
+
+
=
, ) (
R
R
z
z
z H
Copyright 2005, S. K. Mitra 18
Time Time- -Domain Operations Domain Operations
The IIR multiple echo filter of Slide 9and the
allpassreverberator of Slide 16are basic units
that are suitably connected to develop natural-
soudingreverberation
One such interconnection scheme is shown in
the next slide
By choosing different values for the delaysin
each section (obtained by adjusting ) and the
multiplier constants , it is possible to arrive
at a plesant sounding reverberation
i
R
i
4
Copyright 2005, S. K. Mitra 19
Time Time- -Domain Operations Domain Operations
Program 15_9.mcan be used to investigate the
effect of the above reverberator
x[n]
y[n]
+
+ +
+ +
+
+ +
+
+ +
+ +
z
R
_
1
z
R
_
2
z
R
_
3
z
R
_
4
z
R
_
5 z
R
_
6
7
_
1 _
1
4
1
2
4
1
Copyright 2005, S. K. Mitra 20
Time Time- -Domain Operations Domain Operations
Flanging
This operation was originally created by
feeding the same musical piece to two tape
recorders and then combining their delayed
outputs while varying the difference t
between their delay times
One way of varying t is to slow down one of
the tape recorders by placing ones thumb on
the flange of the feed reel, which led to the
name flanging
Copyright 2005, S. K. Mitra 21
Time Time- -Domain Operations Domain Operations
The digital filter structure shown below can be
used to create the flanging effect
Here, the delay unit develops time-varying
delay (n)
+
) (n
z
] [n x
] [n y
Copyright 2005, S. K. Mitra 22
Time Time- -Domain Operations Domain Operations
By periodically varying the delay between 0
and R with a low frequency such as
generates a flanging effect
Since (n) at an instant n has a noninteger
value, y[n] should be computed using some
type of interpolation method described in
Section 13.5
Program 15_10.mcan be used to investigate
the flanging effect
( ) ) cos( ) ( n n
o
R
= 1
2
o
) (n
i
5
Copyright 2005, S. K. Mitra 25
Time Time- -Domain Operations Domain Operations
Phasing Effect Generator
The phasing effect is produced by processing
the signal through a narrowband notch filter
with variable notch chacteristicsand adding a
portion of the notch filter output to the original
signal as indicated below:
+
] [n x
] [n y
Notchfilter with
variablenotch
frequency
Copyright 2005, S. K. Mitra 26
Frequency Frequency- -Domain Operations Domain Operations
The frequency responses of individually
recorded instruments or musical sounds of
performers are often modified by the sound
engineer during the mix-down process
These effect are achieved by passing the
original signals through an equalizer
Copyright 2005, S. K. Mitra 27
Frequency Frequency- -Domain Operations Domain Operations
The equalizer provides presence by peaking
the mid-frequency components in the range 1.5
to 3 kHz and modifies the bass-treble
relationships by providing boost or cut to
components outside this range
The equalizer is usually formed by cascading
first-order and second-order filterswith
adjustable frequency responses
Copyright 2005, S. K. Mitra 28
First First- -Order Digital Filters and Order Digital Filters and
Equalizers Equalizers
Low-frequency Filters and Equalizers
The transfer function of a first-order low-
frequency shelving filter for boost is given by
where
)] ( [ )] ( [ ) (
) (
z z z G
B B
K B
LP
A A + + = 1 1
2
1
2
1
1
1
=
z
z
z
B
B
B
) ( A
Copyright 2005, S. K. Mitra 29
First First- -Order Digital Filters and Order Digital Filters and
Equalizers Equalizers
The tuning parameter is given by
where is the cutoff frequencyand T is the
sampling period
) / tan(
) / tan(
2 1
2 1
T
T
c
c
B
=
B
=
z
z
z
C
c
C
) ( A
6
Copyright 2005, S. K. Mitra 31
First First- -Order Digital Filters and Order Digital Filters and
Equalizers Equalizers
The tuning parameter is given by
where is the cutoff frequencyand T is the
sampling period
The gain responses of the first-order lowpass
shelving filter are shown in the next slide for
various values of the tuning parameters
) / tan(
) / tan(
2
2
T K
T K
c
c
C
=
C
G
a
in
, d
B
K = 10
K = 5
K = 2
K = 0.5
K = 0.2
K = 0.1
_
_
10
2
10
1
10
0
10
1
20
10
0
10
20
G
a
in
, d
B
c
= 0.25
c
= 0.05
c
= 0.01
_
_
= 25 0.
c
1 = T
T =1 andK =10 for boost
T =10 andK =0.1for cut
Copyright 2005, S. K. Mitra 33
First First- -Order Digital Filters and Order Digital Filters and
Equalizers Equalizers
Note: (1) The parameter K controls the amount
of boost or cut at low frequencies
(2) The parameter controls the boost
bandwidth, while the parameter controls
the cut bandwidth
B
=
z
z
z
B
B
B
) ( A
Copyright 2005, S. K. Mitra 36
First First- -Order Digital Filters and Order Digital Filters and
Equalizers Equalizers
The tuning parameter is given by
where is the cutoff frequencyand T is the
sampling period
) / tan(
) / tan(
2 1
2 1
T
T
c
c
B
=
B
7
Copyright 2005, S. K. Mitra 37
First First- -Order Digital Filters and Order Digital Filters and
Equalizers Equalizers
The transfer function of a first-order high-
frequency shelving filter for cut is given by
where
The multiplier constant here is given by
)] ( [ )] ( [ ) (
) (
z z z G
C
K
C
C
HP
A A + + = 1 1
2 2
1
1
1
1
=
z
z
z
C
c
C
) ( A
C
) / tan(
) / tan(
2 1
2 1
T K
T K
c
c
C
+
=
Copyright 2005, S. K. Mitra 38
First First- -Order Digital Filters and Order Digital Filters and
Equalizers Equalizers
A realization of the high-frequency shelving
filter is shown below where
for boost and for cut
+
+
+ ] [n x
) (z
1
A ] [n y
1
2 1/
2 / K
) ( ) ( z z B A A = 1
) ( ) ( z z
C
A A =
1
Copyright 2005, S. K. Mitra 39
First First- -Order Digital Filters and Order Digital Filters and
Equalizers Equalizers
Gain responses of the high-frequency shelving
filter for boost andcut are shown below
= 5 0.
c
1 = T
T =1 andK =10 for boost
T =10 andK =0.1for cut
10
2
10
1
10
0
10
1
20
10
0
10
20
G
a
in
, d
B
K = 10
K = 5
K = 2
K = 0.5
K = 0.2
K = 0.1
_
_
10
2
10
1
10
0
10
1
20
10
0
10
20
G
a
in
, d
B
c
= 0.05
c
= 0.2
c
= 0.5
_
_
) / tan(
) / tan(
2 1
2 1
T B
T B
w
w
B
+
=
)] ( [ )] ( [ ) (
) (
z z z G
C C
K C
BP 2
2
1
2
2
1 1 A A + + =
8
Copyright 2005, S. K. Mitra 43
Second Second- -Order Digital Filters and Order Digital Filters and
Equalizers Equalizers
In the previous expression, the center angular
frequency , where the bandstopresponse
dips, is related to the parameter through
and
) cos(
o
=
o
2 1
2 1
2
1 1
1
+ +
+ +
=
z z
z z
z
C C
C C
C
) (
) (
) ( A
Copyright 2005, S. K. Mitra 44
Second Second- -Order Digital Filters and Order Digital Filters and
Equalizers Equalizers
Here, the parameter is related to the 3-dB
bandwidth of the bandpassresponse
through
w
B
C
) / tan(
) / tan(
2
2
T B K
T B K
w
w
C
+
=
Copyright 2005, S. K. Mitra 45
Second Second- -Order Digital Filters and Order Digital Filters and
Equalizers Equalizers
Since both and are identical
in form, the structure shown below can be
employed for boost if and
for cut if
) (
) (
z G
B
BP
) (
) (
z G
C
BP
) ( ) ( z z
B 2 2
A A =
) ( ) ( z z
C 2 2
A A =
+
+
+ ] [n x ) (z
2
A ] [n y
1
2 1/
2 / K
Copyright 2005, S. K. Mitra 46
Second Second- -Order Digital Filters and Order Digital Filters and
Equalizers Equalizers
Note: The peak or the dip of the gain response
occurs at the frequency which is
independently controlled by the parameter
Note: The 3-dB bandwidth of the gain
response is solely determined by the parameter
for boost or by the parameter for cut
o
w
B
B
10
3
10
2
10
1
10
0
10
1
6
4
2
0
2
4
6
G
a
i
n
, d
B
o = 0.45
o
= 0.2 o = 0.1
_
_
_
9
Copyright 2005, S. K. Mitra 49
Second Second- -Order Digital Filters and Order Digital Filters and
Equalizers Equalizers
Figure below show the gain responses of the
second-order peak filter obtained by varying
the parameters K and
w
B
10
3
10
2
10
1
10
0
10
1
20
15
10
5
0
5
10
15
20
G
a
in
, d
B
K = 0.1
K = 0.5
K = 0.2
K = 2
K = 5
K = 10
_
_
_
_
10
3
10
2
10
1
10
0
10
1
20
15
10
5
0
5
10
15
20
G
a
in
, d
B
B w = 0.1
Bw= 0.03
B
w
= 0.005
_
_
_
_
Copyright 2005, S. K. Mitra 50
Higher Higher- -Order Equalizers Order Equalizers
A graphic equalizer with tunable gain
responses can be built using a cascade of first-
order and second-order equalizers with
external control of the maximum gain values
of each section in the cascade
Figure below shows the block diagram of a
typical graphic equalizer
First-order
= 2 0.
c
3 1. = K
Second-order
= 2 0.
o
3 1. = K
= 2 0.
w
B
Second-order
= 4 0.
o
95 0. = K
= 2 0.
w
B
Second-order
= 8 0.
o
1 1. = K
= 2 0.
w
B
Input Output
Copyright 2005, S. K. Mitra 51
Higher Higher- -Order Equalizers Order Equalizers
Figure below shows the gain response of the
equalizer shown in the previous slide for some
typical values of the parameter K (maximum
gain values) of the individual sections
0 0.2 0.4 0.6 0.8
0
1
2
3
Normalized frequency
G
a
i
n
, d
B
Copyright 2005, S. K. Mitra 52
Musical Sound Processing Musical Sound Processing
There are basically four methods of musical
sound synthesis:
(1) Wavetable synthesis
(2) Spectral modeling synthesis,
(3) Nonlinear synthesis, and
(4) Physical modeling synthesis
Copyright 2005, S. K. Mitra 53
Wavetable Synthesis Wavetable Synthesis
We outline next a simple wavetablesynthesis-
basedmethod for generating the sounds of
plucked string instruments
The basic idea behidthe wavetablesynthesis
methodis to store one period of a desired
musical tone and peat it over and over again to
generate a periodic signal
Copyright 2005, S. K. Mitra 54
Wavetable Synthesis Wavetable Synthesis
Such a signal can be generated by running the
IIR digital filter structure shown below with
specified initial conditions, called wavetable,
stored in the delay register and with no
input
R
z
+
R
z
] [n x ] [n y
10
Copyright 2005, S. K. Mitra 55
Wavetable Synthesis Wavetable Synthesis
Mathematically, the generated periodic note
can be expressed as
where R, called the wavetablelength, is the
period
The frequency of the tone is , where
is the sampling frequency
Usually, samples of simple waveforms are
used as initial conditions
] [ ] [ R n y n y =
R F
T
/
T
F
Copyright 2005, S. K. Mitra 56
Wavetable Synthesis Wavetable Synthesis
A simple modification of the algorithm has
been used to generateplucked-string tones
The modified algorithm is given by
The corresponding structure is shown below
]) [ ] [ ( ] [ 1
2
+ =
R n y R n y n y
R
+
+
R
z
1
z
R
2 1/
] [n x ] [n y
Basic plucked-string filter structure
2-point moving average filter
Copyright 2005, S. K. Mitra 57
Wavetable Synthesis Wavetable Synthesis
Note: The structure inside the dashed box is a
lowpassfilter G(z) consisting of a 2-point
moving average filter
The initial sound of a plucked huitar string
contains many high-frequency components
To simulate this effect, the plucked-string
structure is run with zero input and with zero-
mean random number stored in the delay block
R
z
1
z
R
2 1/
] [n x ] [n y
Modified plucked-string filter structure
) (z A