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

188 lines
13 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_1OnePole.html">OnePole</a>
</div>
<div class="contents">
<h1>stk::OnePole Class Reference</h1><!-- doxytag: class="stk::OnePole" --><!-- doxytag: inherits="stk::Filter" -->STK one-pole filter class.
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="OnePole_8h-source.html">OnePole.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for stk::OnePole:</div>
<div class="dynsection">
<p><center><img src="classstk_1_1OnePole.png" usemap="#stk::OnePole_map" border="0" alt=""></center>
<map name="stk::OnePole_map">
<area href="classstk_1_1Filter.html" alt="stk::Filter" shape="rect" coords="0,56,82,80">
<area href="classstk_1_1Stk.html" alt="stk::Stk" shape="rect" coords="0,0,82,24">
</map>
</div>
<p>
<a href="classstk_1_1OnePole-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="d0d322987780778e9f53f34837bea4b8"></a><!-- doxytag: member="stk::OnePole::OnePole" ref="d0d322987780778e9f53f34837bea4b8" args="(StkFloat thePole=0.9)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1OnePole.html#d0d322987780778e9f53f34837bea4b8">OnePole</a> (StkFloat thePole=0.9)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The default constructor creates a low-pass filter (pole at z = 0.9). <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="03ac84c397620180090d86f2ecafccc5"></a><!-- doxytag: member="stk::OnePole::~OnePole" ref="03ac84c397620180090d86f2ecafccc5" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1OnePole.html#03ac84c397620180090d86f2ecafccc5">~OnePole</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="ff587fbf5ba36b3dd24b2fb8d66b7e00"></a><!-- doxytag: member="stk::OnePole::setB0" ref="ff587fbf5ba36b3dd24b2fb8d66b7e00" args="(StkFloat b0)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1OnePole.html#ff587fbf5ba36b3dd24b2fb8d66b7e00">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="1f99beebd9c4fbdfce6478e40d7625d8"></a><!-- doxytag: member="stk::OnePole::setA1" ref="1f99beebd9c4fbdfce6478e40d7625d8" args="(StkFloat a1)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1OnePole.html#1f99beebd9c4fbdfce6478e40d7625d8">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="a92dd54382721d5151ef29b291ba6cb5"></a><!-- doxytag: member="stk::OnePole::setCoefficients" ref="a92dd54382721d5151ef29b291ba6cb5" args="(StkFloat b0, StkFloat a1, bool clearState=false)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1OnePole.html#a92dd54382721d5151ef29b291ba6cb5">setCoefficients</a> (StkFloat b0, 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_1OnePole.html#cc1aaa35c6d5ffbbebfe0c4bfa7d1132">setPole</a> (StkFloat thePole)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the pole position in the z-plane. <a href="#cc1aaa35c6d5ffbbebfe0c4bfa7d1132"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d1ad906374102791a01bfd60844028ec"></a><!-- doxytag: member="stk::OnePole::lastOut" ref="d1ad906374102791a01bfd60844028ec" args="(void) const " -->
StkFloat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1OnePole.html#d1ad906374102791a01bfd60844028ec">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="3c83b6d43f76bec06f11caa9de76881e"></a><!-- doxytag: member="stk::OnePole::tick" ref="3c83b6d43f76bec06f11caa9de76881e" args="(StkFloat input)" -->
StkFloat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1OnePole.html#3c83b6d43f76bec06f11caa9de76881e">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_1OnePole.html#f6611322a3c17f728cf6d57a4f932a1f">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="#f6611322a3c17f728cf6d57a4f932a1f"></a><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_1OnePole.html#495943f1659f2da6208703a24275defb">tick</a> (<a class="el" href="classstk_1_1StkFrames.html">StkFrames</a> &amp;iFrames, <a class="el" href="classstk_1_1StkFrames.html">StkFrames</a> &amp;oFrames, unsigned int iChannel=0, unsigned int oChannel=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Take a channel of the <code>iFrames</code> object as inputs to the filter and write outputs to the <code>oFrames</code> object. <a href="#495943f1659f2da6208703a24275defb"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
STK one-pole filter class.
<p>
This class implements a one-pole digital filter. A method is provided for setting the pole position along the real axis of the z-plane while maintaining a constant peak filter gain.<p>
by Perry R. Cook and Gary P. Scavone, 1995 - 2009. <hr><h2>Member Function Documentation</h2>
<a class="anchor" name="cc1aaa35c6d5ffbbebfe0c4bfa7d1132"></a><!-- doxytag: member="stk::OnePole::setPole" ref="cc1aaa35c6d5ffbbebfe0c4bfa7d1132" args="(StkFloat thePole)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void stk::OnePole::setPole </td>
<td>(</td>
<td class="paramtype">StkFloat&nbsp;</td>
<td class="paramname"> <em>thePole</em> </td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set the pole position in the z-plane.
<p>
This method sets the pole position along the real-axis of the z-plane and normalizes the coefficients for a maximum gain of one. A positive pole value produces a low-pass filter, while a negative pole value produces a high-pass filter. This method does not affect the filter <em>gain</em> value.
</div>
</div><p>
<a class="anchor" name="f6611322a3c17f728cf6d57a4f932a1f"></a><!-- doxytag: member="stk::OnePole::tick" ref="f6611322a3c17f728cf6d57a4f932a1f" 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::OnePole::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 <a class="el" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a> argument reference is returned. 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>
<a class="anchor" name="495943f1659f2da6208703a24275defb"></a><!-- doxytag: member="stk::OnePole::tick" ref="495943f1659f2da6208703a24275defb" args="(StkFrames &amp;iFrames, StkFrames &amp;oFrames, unsigned int iChannel=0, unsigned int oChannel=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::OnePole::tick </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classstk_1_1StkFrames.html">StkFrames</a> &amp;&nbsp;</td>
<td class="paramname"> <em>iFrames</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classstk_1_1StkFrames.html">StkFrames</a> &amp;&nbsp;</td>
<td class="paramname"> <em>oFrames</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&nbsp;</td>
<td class="paramname"> <em>iChannel</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&nbsp;</td>
<td class="paramname"> <em>oChannel</em> = <code>0</code></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Take a channel of the <code>iFrames</code> object as inputs to the filter and write outputs to the <code>oFrames</code> object.
<p>
The <code>iFrames</code> object reference is returned. Each channel argument must be less than the number of channels in the corresponding <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.
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="OnePole_8h-source.html">OnePole.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>