miller-book/node160.html

216 lines
7.2 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<TITLE>Using elementary filters directly: shelving and peaking</TITLE>
<META NAME="description" CONTENT="Using elementary filters directly: shelving and peaking">
<META NAME="keywords" CONTENT="book">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="book.css">
<LINK REL="next" HREF="node161.html">
<LINK REL="previous" HREF="node159.html">
<LINK REL="up" HREF="node155.html">
<LINK REL="next" HREF="node161.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
2022-04-12 23:32:40 -03:00
<A ID="tex2html2959"
HREF="node161.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="next.png"></A>
2022-04-12 23:32:40 -03:00
<A ID="tex2html2953"
HREF="node155.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="up.png"></A>
2022-04-12 23:32:40 -03:00
<A ID="tex2html2947"
HREF="node159.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="prev.png"></A>
2022-04-12 23:32:40 -03:00
<A ID="tex2html2955"
HREF="node4.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="contents.png"></A>
2022-04-12 23:32:40 -03:00
<A ID="tex2html2957"
HREF="node201.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
SRC="index.png"></A>
<BR>
2022-04-12 23:32:40 -03:00
<B> Next:</B> <A ID="tex2html2960"
HREF="node161.html">Making and using all-pass</A>
2022-04-12 23:32:40 -03:00
<B> Up:</B> <A ID="tex2html2954"
HREF="node155.html">Examples</A>
2022-04-12 23:32:40 -03:00
<B> Previous:</B> <A ID="tex2html2948"
HREF="node159.html">Single sideband modulation</A>
2022-04-12 23:32:40 -03:00
&nbsp; <B> <A ID="tex2html2956"
HREF="node4.html">Contents</A></B>
2022-04-12 23:32:40 -03:00
&nbsp; <B> <A ID="tex2html2958"
HREF="node201.html">Index</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
2022-04-12 23:32:40 -03:00
<H2><A ID="SECTION001255000000000000000">
Using elementary filters directly: shelving and peaking</A>
</H2>
<P>
2022-04-12 23:32:40 -03:00
<DIV ALIGN="CENTER"><A ID="fig08.32"></A><A ID="10641"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 8.32:</STRONG>
Building filters from elementary, raw ones: (a) shelving; (b) peaking.
</CAPTION>
<TR><TD><IMG
WIDTH="548" HEIGHT="276" BORDER="0"
SRC="img1027.png"
ALT="\begin{figure}\psfig{file=figs/fig08.32.ps}\end{figure}"></TD></TR>
</TABLE>
</DIV>
<P>
No finite set of prefabricated filters could fill every possible need, and so
Pd provides the elementary filters of Sections
<A HREF="node133.html#sect8.nonrecirculating">8.2.1</A>-<A HREF="node135.html#sect8.recirculating">8.2.3</A> in raw form, so that the
user can supply the filter coefficients explicitly. In this section we will
describe patches that realize the shelving and peaking filters of Sections
<A HREF="node142.html#sect8.shelving">8.3.3</A> and <A HREF="node144.html#sect8.peaking">8.3.5</A> directly from elementary filters.
First we introduce the six Pd objects that realize elementary filters:
<P>
<BR><!-- MATH
$\fbox{ \texttt{rzero\~}}$
-->
<IMG
WIDTH="69" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img1028.png"
ALT="\fbox{ \texttt{rzero\~}}">,
<BR><!-- MATH
$\fbox{ \texttt{rzero\_rev\~}}$
-->
<IMG
WIDTH="100" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img1029.png"
ALT="\fbox{ \texttt{rzero\_rev\~}}">,
<BR><!-- MATH
$\fbox{ \texttt{rpole\~}}$
-->
<IMG
WIDTH="69" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img1030.png"
ALT="\fbox{ \texttt{rpole\~}}">:
2022-04-12 23:32:40 -03:00
<A ID="10847"></A><A ID="10848"></A><A ID="10849"></A>elementary filters with real-valued coefficients operating on real-valued
signals. The three implement non-recirculating filters of the first and
second types, and the recirculating filter. They all have one inlet, at
right, to supply the coefficient that sets the location of the zero or pole.
The inlet
for the coefficient (as well as the left inlet for the signal to filter) take
audio signals. No stability check is performed.
<P>
<BR><!-- MATH
$\fbox{ \texttt{czero\~}}$
-->
<IMG
WIDTH="69" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img1034.png"
ALT="\fbox{ \texttt{czero\~}}">,
<BR><!-- MATH
$\fbox{ \texttt{czero\_rev\~}}$
-->
<IMG
WIDTH="100" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img1035.png"
ALT="\fbox{ \texttt{czero\_rev\~}}">,
<BR><!-- MATH
$\fbox{ \texttt{cpole\~}}$
-->
<IMG
WIDTH="69" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img1036.png"
ALT="\fbox{ \texttt{cpole\~}}">:
2022-04-12 23:32:40 -03:00
<A ID="10850"></A><A ID="10851"></A><A ID="10852"></A>elementary filters with complex-valued coefficients, operating on complex-valued
signals, corresponding to the real-valued ones above. Instead of two inlets and
one outlet, each of these filters has four inlets (real and imaginary part of
the signal to filter, and real and imaginary part of the coefficient) and
two outlets for the complex-valued output.
<P>
The example patches use a pair of abstractions to graph the frequency and phase
responses of filters as explained in Example H10.measurement.pd. Example H11.shelving.pd (Figure <A HREF="#fig08.32">8.32</A>, part a) shows how to make a shelving filter. One
elementary non-recirculating filter (<TT>rzero~</TT>) and one elementary
recirculating one (<TT>rpole~</TT>) are put in series. As the analysis of
Section <A HREF="node148.html#sect8.timevarying">8.3.9</A> might suggest, the <TT>rzero~</TT> object is placed
first.
<P>
Example H12.peaking.pd (part (b) of the figure) implements a peaking filter. Here the
pole and the zero are rotated by an angle <IMG
WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img27.png"
ALT="$\omega $"> to control the center
frequency of the filter. The bandwidth and center frequency gain are equal to
the shelf frequency and the DC gain of the corresponding shelving filter.
<P>
Example H13.butterworth.pd demonstrates a three-pole, three-zero Butterworth shelving
filter. The filter itself is an abstraction, <TT>butterworth3~</TT>, for
easy reuse.
<P>
<HR>
<!--Navigation Panel-->
2022-04-12 23:32:40 -03:00
<A ID="tex2html2959"
HREF="node161.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="next.png"></A>
2022-04-12 23:32:40 -03:00
<A ID="tex2html2953"
HREF="node155.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="up.png"></A>
2022-04-12 23:32:40 -03:00
<A ID="tex2html2947"
HREF="node159.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="prev.png"></A>
2022-04-12 23:32:40 -03:00
<A ID="tex2html2955"
HREF="node4.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="contents.png"></A>
2022-04-12 23:32:40 -03:00
<A ID="tex2html2957"
HREF="node201.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
SRC="index.png"></A>
<BR>
2022-04-12 23:32:40 -03:00
<B> Next:</B> <A ID="tex2html2960"
HREF="node161.html">Making and using all-pass</A>
2022-04-12 23:32:40 -03:00
<B> Up:</B> <A ID="tex2html2954"
HREF="node155.html">Examples</A>
2022-04-12 23:32:40 -03:00
<B> Previous:</B> <A ID="tex2html2948"
HREF="node159.html">Single sideband modulation</A>
2022-04-12 23:32:40 -03:00
&nbsp; <B> <A ID="tex2html2956"
HREF="node4.html">Contents</A></B>
2022-04-12 23:32:40 -03:00
&nbsp; <B> <A ID="tex2html2958"
HREF="node201.html">Index</A></B>
<!--End of Navigation Panel-->
<ADDRESS>
Miller Puckette
2006-12-30
</ADDRESS>
</BODY>
</HTML>