Release 4.4.3 tarball

This commit is contained in:
Gary Scavone
2013-09-29 23:49:37 +02:00
committed by Stephen Sinclair
parent cfdfe7736a
commit f13d5bb3cd
632 changed files with 12236 additions and 19041 deletions

View File

@@ -69,7 +69,7 @@ StkFloat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>STK two-zero filter class. </p>
<p>This class implements a two-zero digital filter. A method is provided for creating a "notch" in the frequency response while maintaining a constant filter gain.</p>
<p>by Perry R. Cook and Gary P. Scavone, 1995 - 2010. </p>
<p>by Perry R. Cook and Gary P. Scavone, 1995-2011. </p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a3a89facd2b94bbcfc2f06d8766a46329"></a><!-- doxytag: member="stk::TwoZero::setNotch" ref="a3a89facd2b94bbcfc2f06d8766a46329" args="(StkFloat frequency, StkFloat radius)" -->
<div class="memitem">
@@ -97,7 +97,7 @@ StkFloat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="
<div class="memdoc">
<p>Sets the filter coefficients for a "notch" at <em>frequency</em> (in Hz). </p>
<p>This method determines the filter coefficients corresponding to two complex-conjugate zeros with the given <em>frequency</em> (in Hz) and <em>radius</em> from the z-plane origin. The coefficients are then normalized to produce a maximum filter gain of one (independent of the filter <em>gain</em> parameter). The resulting filter frequency response has a "notch" or anti-resonance at the given <em>frequency</em>. The closer the zeros are to the unit-circle (<em>radius</em> close to or equal to one), the narrower the resulting notch width. </p>
<p>This method determines the filter coefficients corresponding to two complex-conjugate zeros with the given <em>frequency</em> (in Hz) and <em>radius</em> from the z-plane origin. The coefficients are then normalized to produce a maximum filter gain of one (independent of the filter <em>gain</em> parameter). The resulting filter frequency response has a "notch" or anti-resonance at the given <em>frequency</em>. The closer the zeros are to the unit-circle (<em>radius</em> close to or equal to one), the narrower the resulting notch width. The <em>frequency</em> value should be between zero and half the sample rate. The <em>radius</em> value should be positive. </p>
</div>
</div>
@@ -131,6 +131,28 @@ StkFloat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="
<p>Implements <a class="el" href="classstk_1_1Filter.html#a3260a238824c4a748ac057b84b7d3f21">stk::Filter</a>.</p>
<p><div class="fragment"><pre class="fragment"><a name="l00103"></a>00103 {
<a name="l00104"></a>00104 <span class="preprocessor">#if defined(_STK_DEBUG_)</span>
<a name="l00105"></a>00105 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( channel &gt;= frames.channels() ) {
<a name="l00106"></a>00106 oStream_ &lt;&lt; <span class="stringliteral">&quot;TwoZero::tick(): channel and StkFrames arguments are incompatible!&quot;</span>;
<a name="l00107"></a>00107 <a class="code" href="classstk_1_1Stk.html#a48ac73a0d8ca28445ba1a054e1f061ff" title="Static function for error reporting and handling using c-strings.">handleError</a>( StkError::FUNCTION_ARGUMENT );
<a name="l00108"></a>00108 }
<a name="l00109"></a>00109 <span class="preprocessor">#endif</span>
<a name="l00110"></a>00110 <span class="preprocessor"></span>
<a name="l00111"></a>00111 StkFloat *samples = &amp;frames[channel];
<a name="l00112"></a>00112 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> hop = frames.channels();
<a name="l00113"></a>00113 <span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i=0; i&lt;frames.frames(); i++, samples += hop ) {
<a name="l00114"></a>00114 inputs_[0] = gain_ * *samples;
<a name="l00115"></a>00115 *samples = b_[2] * inputs_[2] + b_[1] * inputs_[1] + b_[0] * inputs_[0];
<a name="l00116"></a>00116 inputs_[2] = inputs_[1];
<a name="l00117"></a>00117 inputs_[1] = inputs_[0];
<a name="l00118"></a>00118 }
<a name="l00119"></a>00119
<a name="l00120"></a>00120 lastFrame_[0] = *(samples-hop);
<a name="l00121"></a>00121 <span class="keywordflow">return</span> frames;
<a name="l00122"></a>00122 }
</pre></div></p>
</div>
</div>
<a class="anchor" id="a0ef9deab4fbc7e64511d4b6d38afd185"></a><!-- doxytag: member="stk::TwoZero::tick" ref="a0ef9deab4fbc7e64511d4b6d38afd185" args="(StkFrames &amp;iFrames, StkFrames &amp;oFrames, unsigned int iChannel=0, unsigned int oChannel=0)" -->
@@ -173,6 +195,29 @@ StkFloat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="
<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>
<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. </p>
<p><div class="fragment"><pre class="fragment"><a name="l00125"></a>00125 {
<a name="l00126"></a>00126 <span class="preprocessor">#if defined(_STK_DEBUG_)</span>
<a name="l00127"></a>00127 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( iChannel &gt;= iFrames.channels() || oChannel &gt;= oFrames.channels() ) {
<a name="l00128"></a>00128 oStream_ &lt;&lt; <span class="stringliteral">&quot;TwoZero::tick(): channel and StkFrames arguments are incompatible!&quot;</span>;
<a name="l00129"></a>00129 <a class="code" href="classstk_1_1Stk.html#a48ac73a0d8ca28445ba1a054e1f061ff" title="Static function for error reporting and handling using c-strings.">handleError</a>( StkError::FUNCTION_ARGUMENT );
<a name="l00130"></a>00130 }
<a name="l00131"></a>00131 <span class="preprocessor">#endif</span>
<a name="l00132"></a>00132 <span class="preprocessor"></span>
<a name="l00133"></a>00133 StkFloat *iSamples = &amp;iFrames[iChannel];
<a name="l00134"></a>00134 StkFloat *oSamples = &amp;oFrames[oChannel];
<a name="l00135"></a>00135 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> iHop = iFrames.channels(), oHop = oFrames.channels();
<a name="l00136"></a>00136 <span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i=0; i&lt;iFrames.frames(); i++, iSamples += iHop, oSamples += oHop ) {
<a name="l00137"></a>00137 inputs_[0] = gain_ * *iSamples;
<a name="l00138"></a>00138 *oSamples = b_[2] * inputs_[2] + b_[1] * inputs_[1] + b_[0] * inputs_[0];
<a name="l00139"></a>00139 inputs_[2] = inputs_[1];
<a name="l00140"></a>00140 inputs_[1] = inputs_[0];
<a name="l00141"></a>00141 }
<a name="l00142"></a>00142
<a name="l00143"></a>00143 lastFrame_[0] = *(oSamples-oHop);
<a name="l00144"></a>00144 <span class="keywordflow">return</span> iFrames;
<a name="l00145"></a>00145 }
</pre></div></p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
@@ -183,7 +228,7 @@ StkFloat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="
<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-2010 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
<tr><td>&copy;1995-2011 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
</table>
</BODY>