miller-book/node156.html

183 lines
6.2 KiB
HTML
Raw Normal View History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--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>
<TITLE>Prefabricated low-, high-, and band-pass filters</TITLE>
<META NAME="description" CONTENT="Prefabricated low-, high-, and band-pass filters">
<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="node157.html">
<LINK REL="previous" HREF="node155.html">
<LINK REL="up" HREF="node155.html">
<LINK REL="next" HREF="node157.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html2903"
HREF="node157.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="file:/usr/local/share/lib/latex2html/icons/next.png"></A>
<A NAME="tex2html2897"
HREF="node155.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="file:/usr/local/share/lib/latex2html/icons/up.png"></A>
<A NAME="tex2html2891"
HREF="node155.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="file:/usr/local/share/lib/latex2html/icons/prev.png"></A>
<A NAME="tex2html2899"
HREF="node4.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="file:/usr/local/share/lib/latex2html/icons/contents.png"></A>
<A NAME="tex2html2901"
HREF="node201.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
SRC="file:/usr/local/share/lib/latex2html/icons/index.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html2904"
HREF="node157.html">Prefabricated time-varying band-pass filter</A>
<B> Up:</B> <A NAME="tex2html2898"
HREF="node155.html">Examples</A>
<B> Previous:</B> <A NAME="tex2html2892"
HREF="node155.html">Examples</A>
&nbsp; <B> <A NAME="tex2html2900"
HREF="node4.html">Contents</A></B>
&nbsp; <B> <A NAME="tex2html2902"
HREF="node201.html">Index</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION001251000000000000000">
Prefabricated low-, high-, and band-pass filters</A>
</H2>
<P>
Patches H01.low-pass.pd, H02.high-pass.pd, and H03.band-pass.pd (Figure <A HREF="#fig08.28">8.28</A>) show Pd's
built-in filters, which implement filter designs described in Sections
<A HREF="node140.html#sect08.low-pass">8.3.1</A>, <A HREF="node141.html#sect08.highpass">8.3.2</A> and <A HREF="node143.html#sect8.twopolebandpass">8.3.4</A>.
Two of the patches also use a noise generator we have not introduced before.
We will need four new Pd objects:
<P>
<BR><!-- MATH
$\fbox{\texttt{lop\~}}$
-->
<IMG
WIDTH="47" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img1014.png"
ALT="\fbox{\texttt{lop\~}}">:
<A NAME="10842"></A>one-pole low-pass filter. The left inlet takes a signal to be filtered, and
the right inlet takes control messages to set the
cutoff frequency of the filter. The filter is normalized so that the
gain is one at frequency 0.
<P>
<BR><!-- MATH
$\fbox{ \texttt{hip\~}}$
-->
<IMG
WIDTH="53" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img1016.png"
ALT="\fbox{ \texttt{hip\~}}">:
<A NAME="10843"></A>one-pole, one-zero high-pass filter, with the same inputs and outputs as
<TT>lop~</TT>, normalized to have a gain of one at the Nyquist frequency.
<P>
<BR><!-- MATH
$\fbox{ \texttt{bp\~}}$
-->
<IMG
WIDTH="44" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img1017.png"
ALT="\fbox{ \texttt{bp\~}}">:
<A NAME="10844"></A>resonant filter. The middle inlet takes control messages to set the center
frequency, and the right inlet to set ``q".
<P>
<BR><!-- MATH
$\fbox{ \texttt{noise\~}}$
-->
<IMG
WIDTH="69" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img1019.png"
ALT="\fbox{ \texttt{noise\~}}">:
<A NAME="10845"></A>white noise generator. Each sample is an independent
pseudo-random number, uniformly distributed from -1 to 1.
<P>
<DIV ALIGN="CENTER"><A NAME="fig08.28"></A><A NAME="10600"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 8.28:</STRONG>
Using prefabricated filters in Pd: (a) a low-pass filter, with
white noise as a test input; (b) using a high-pass filter to remove a
signal component of frequency 0.</CAPTION>
<TR><TD><IMG
WIDTH="491" HEIGHT="190" BORDER="0"
SRC="img1021.png"
ALT="\begin{figure}\psfig{file=figs/fig08.28.ps}\end{figure}"></TD></TR>
</TABLE>
</DIV>
<P>
The first three example patches demonstrate these three filters (see Figure
<A HREF="#fig08.28">8.28</A>). The <TT>lop~</TT> and <TT>bp~</TT> objects are demonstrated
with noise as input; <TT>hip~</TT> as shown is used to remove the DC (zero
frequency) component of a signal.
<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html2903"
HREF="node157.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="file:/usr/local/share/lib/latex2html/icons/next.png"></A>
<A NAME="tex2html2897"
HREF="node155.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="file:/usr/local/share/lib/latex2html/icons/up.png"></A>
<A NAME="tex2html2891"
HREF="node155.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="file:/usr/local/share/lib/latex2html/icons/prev.png"></A>
<A NAME="tex2html2899"
HREF="node4.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="file:/usr/local/share/lib/latex2html/icons/contents.png"></A>
<A NAME="tex2html2901"
HREF="node201.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
SRC="file:/usr/local/share/lib/latex2html/icons/index.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html2904"
HREF="node157.html">Prefabricated time-varying band-pass filter</A>
<B> Up:</B> <A NAME="tex2html2898"
HREF="node155.html">Examples</A>
<B> Previous:</B> <A NAME="tex2html2892"
HREF="node155.html">Examples</A>
&nbsp; <B> <A NAME="tex2html2900"
HREF="node4.html">Contents</A></B>
&nbsp; <B> <A NAME="tex2html2902"
HREF="node201.html">Index</A></B>
<!--End of Navigation Panel-->
<ADDRESS>
Miller Puckette
2006-12-30
</ADDRESS>
</BODY>
</HTML>