Files
stk/doc/html/classstk_1_1PoleZero.html
2013-09-29 23:44:33 +02:00

171 lines
12 KiB
HTML

<HTML>
<HEAD>
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<img src="princeton.gif"> &nbsp; <img src="ccrma.gif"> &nbsp; <img src="mcgill.gif"><P>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="information.html">Information</a> &nbsp; <a class="qindex" href="classes.html">Classes</a> &nbsp; <a class="qindex" href="download.html">Download</a> &nbsp; <a class="qindex" href="usage.html">Usage</a> &nbsp; <a class="qindex" href="maillist.html">Mail List</a> &nbsp; <a class="qindex" href="system.html">Requirements</a> &nbsp; <a class="qindex" href="links.html">Links</a> &nbsp; <a class="qindex" href="faq.html">FAQ</a> &nbsp; <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
<HR>
<!-- Generated by Doxygen 1.5.8 -->
<div class="navpath"><a class="el" href="namespacestk.html">stk</a>::<a class="el" href="classstk_1_1PoleZero.html">PoleZero</a>
</div>
<div class="contents">
<h1>stk::PoleZero Class Reference</h1><!-- doxytag: class="stk::PoleZero" --><!-- doxytag: inherits="stk::Filter" -->STK one-pole, one-zero filter class.
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="PoleZero_8h-source.html">PoleZero.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for stk::PoleZero:</div>
<div class="dynsection">
<p><center><img src="classstk_1_1PoleZero.png" usemap="#stk::PoleZero_map" border="0" alt=""></center>
<map name="stk::PoleZero_map">
<area href="classstk_1_1Filter.html" alt="stk::Filter" shape="rect" coords="0,56,86,80">
<area href="classstk_1_1Stk.html" alt="stk::Stk" shape="rect" coords="0,0,86,24">
</map>
</div>
<p>
<a href="classstk_1_1PoleZero-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d9a46d21ee470d7afcd641807b5e314e"></a><!-- doxytag: member="stk::PoleZero::PoleZero" ref="d9a46d21ee470d7afcd641807b5e314e" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1PoleZero.html#d9a46d21ee470d7afcd641807b5e314e">PoleZero</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor creates a first-order pass-through filter. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="beb7feab68b5d8370bd9c2aef94c8541"></a><!-- doxytag: member="stk::PoleZero::~PoleZero" ref="beb7feab68b5d8370bd9c2aef94c8541" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1PoleZero.html#beb7feab68b5d8370bd9c2aef94c8541">~PoleZero</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Class destructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8e4a45e4a5263c66e9d447688975ca0f"></a><!-- doxytag: member="stk::PoleZero::setB0" ref="8e4a45e4a5263c66e9d447688975ca0f" args="(StkFloat b0)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1PoleZero.html#8e4a45e4a5263c66e9d447688975ca0f">setB0</a> (StkFloat b0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the b[0] coefficient value. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e33d1e1f594b4cf9063518c7b065c5f5"></a><!-- doxytag: member="stk::PoleZero::setB1" ref="e33d1e1f594b4cf9063518c7b065c5f5" args="(StkFloat b1)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1PoleZero.html#e33d1e1f594b4cf9063518c7b065c5f5">setB1</a> (StkFloat b1)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the b[1] coefficient value. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e3f0fc1182eb06730f09b8137c01779f"></a><!-- doxytag: member="stk::PoleZero::setA1" ref="e3f0fc1182eb06730f09b8137c01779f" args="(StkFloat a1)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1PoleZero.html#e3f0fc1182eb06730f09b8137c01779f">setA1</a> (StkFloat a1)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the a[1] coefficient value. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f34e485fbcaa1f4985a88a882ca9d5c5"></a><!-- doxytag: member="stk::PoleZero::setCoefficients" ref="f34e485fbcaa1f4985a88a882ca9d5c5" args="(StkFloat b0, StkFloat b1, StkFloat a1, bool clearState=false)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1PoleZero.html#f34e485fbcaa1f4985a88a882ca9d5c5">setCoefficients</a> (StkFloat b0, StkFloat b1, StkFloat a1, bool clearState=false)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set all filter coefficients. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1PoleZero.html#51264d601b635aa0274c75ba1aa5a048">setAllpass</a> (StkFloat coefficient)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the filter for allpass behavior using <em>coefficient</em>. <a href="#51264d601b635aa0274c75ba1aa5a048"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1PoleZero.html#cb7119d8964215546bbeeb6029f5c46f">setBlockZero</a> (StkFloat thePole=0.99)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a DC blocking filter with the given pole position in the z-plane. <a href="#cb7119d8964215546bbeeb6029f5c46f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="03edf036d1619bb5d33bb41701833232"></a><!-- doxytag: member="stk::PoleZero::lastOut" ref="03edf036d1619bb5d33bb41701833232" args="(void) const " -->
StkFloat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1PoleZero.html#03edf036d1619bb5d33bb41701833232">lastOut</a> (void) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the last computed output value. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1a29ac6f3a2b75e71693c73554599228"></a><!-- doxytag: member="stk::PoleZero::tick" ref="1a29ac6f3a2b75e71693c73554599228" args="(StkFloat input)" -->
StkFloat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1PoleZero.html#1a29ac6f3a2b75e71693c73554599228">tick</a> (StkFloat input)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Input one sample to the filter and return one output. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classstk_1_1StkFrames.html">StkFrames</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1PoleZero.html#1b5e97a13c582d97cfaa7fcbd4211b47">tick</a> (<a class="el" href="classstk_1_1StkFrames.html">StkFrames</a> &amp;frames, unsigned int channel=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Take a channel of the <a class="el" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a> object as inputs to the filter and replace with corresponding outputs. <a href="#1b5e97a13c582d97cfaa7fcbd4211b47"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
STK one-pole, one-zero filter class.
<p>
This class implements a one-pole, one-zero digital filter. A method is provided for creating an allpass filter with a given coefficient. Another method is provided to create a DC blocking filter.<p>
by Perry R. Cook and Gary P. Scavone, 1995 - 2009. <hr><h2>Member Function Documentation</h2>
<a class="anchor" name="51264d601b635aa0274c75ba1aa5a048"></a><!-- doxytag: member="stk::PoleZero::setAllpass" ref="51264d601b635aa0274c75ba1aa5a048" args="(StkFloat coefficient)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void stk::PoleZero::setAllpass </td>
<td>(</td>
<td class="paramtype">StkFloat&nbsp;</td>
<td class="paramname"> <em>coefficient</em> </td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set the filter for allpass behavior using <em>coefficient</em>.
<p>
This method uses <em>coefficient</em> to create an allpass filter, which has unity gain at all frequencies. Note that the <em>coefficient</em> magnitude must be less than one to maintain stability.
</div>
</div><p>
<a class="anchor" name="cb7119d8964215546bbeeb6029f5c46f"></a><!-- doxytag: member="stk::PoleZero::setBlockZero" ref="cb7119d8964215546bbeeb6029f5c46f" args="(StkFloat thePole=0.99)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void stk::PoleZero::setBlockZero </td>
<td>(</td>
<td class="paramtype">StkFloat&nbsp;</td>
<td class="paramname"> <em>thePole</em> = <code>0.99</code> </td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Create a DC blocking filter with the given pole position in the z-plane.
<p>
This method sets the given pole position, together with a zero at z=1, to create a DC blocking filter. <em>thePole</em> should be close to one to minimize low-frequency attenuation.
</div>
</div><p>
<a class="anchor" name="1b5e97a13c582d97cfaa7fcbd4211b47"></a><!-- doxytag: member="stk::PoleZero::tick" ref="1b5e97a13c582d97cfaa7fcbd4211b47" args="(StkFrames &amp;frames, unsigned int channel=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classstk_1_1StkFrames.html">StkFrames</a> &amp; stk::PoleZero::tick </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classstk_1_1StkFrames.html">StkFrames</a> &amp;&nbsp;</td>
<td class="paramname"> <em>frames</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&nbsp;</td>
<td class="paramname"> <em>channel</em> = <code>0</code></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Take a channel of the <a class="el" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a> object as inputs to the filter and replace with corresponding outputs.
<p>
The <code>channel</code> argument must be less than the number of channels in the <a class="el" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a> argument (the first channel is specified by 0). However, range checking is only performed if _STK_DEBUG_ is defined during compilation, in which case an out-of-range value will trigger an <a class="el" href="classstk_1_1StkError.html" title="STK error handling class.">StkError</a> exception.
<p>Implements <a class="el" href="classstk_1_1Filter.html#3260a238824c4a748ac057b84b7d3f21">stk::Filter</a>.</p>
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="PoleZero_8h-source.html">PoleZero.h</a></ul>
</div>
<HR>
<table>
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
<tr><td>&copy;1995-2009 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
</table>
</BODY>
</HTML>