Digital Filters
43
quality factor
boost
notch
the CSound interpreter, which uses sr/kr variables for each signal variable
indicated in the orchestra, and updates all these variables in the same cycle.
This means that, as a matter of fact, we get sr/kr filters, each working at a
reduced sample rate on a signal undersampled by a factor sr/kr. The samples
of the partial results are then interleaved to give the signal at the sampling rate
sr. The output of each of the undersampled filters is subject to an upsampling
that produces the sr/kr periodic replicas of the spectrum.
time
0.0
3000
0.0
30.0
Figure 20: Sonogram of a musical phrase produced by filtering white noise
###
Positioning the zeros
We have seen how the poles can be positioned within the unit circle in order
to give resonances at the desired frequency and with the desired bandwidth.
The ratio between the central frequency and the width of a band is often called
quality factor and indicated with the symbol Q.
In many cases, it is necessary to design a filter having a flat frequency re-
sponse (in magnitude) except for a narrow zone around a frequency
0
where it
amplifies or attenuates. The resonant filter that we have just introduced can be
modified for this purpose by introducing a couple of zeros positioned near the
poles. In particular, the numerator of the transfer function will be the polyno-
mial in z
-1
having roots at z
0
= r
0
e
j
0
and at z
0
= r
0
e
-j
0
. By means of a
qualitative analysis of the pole-zero diagram we can realize that, if r
0
< r we
have a boost of the frequency response, and if r
0
> r we have an attenuation
(a notch) of the response around
0
. The reader is invited to do this qualita-
tive analysis on her own and to write the Octave/Matlab script that produces
fig. 21, which is obtained using the values r
0
= 0.9 and r
0
= 1.0. We notice that
the phase jumps down by 2 radians when we cross a zero laying on the unit
circumference.
2.2.3
Allpass Filters
Imagine that we are designing a filter by positioning its poles within the unit
circle in the complex plane. For each complex pole p
i
, let us introduce a zero