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

@@ -64,7 +64,7 @@ StkFloat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="
<p>a[0]*y[n] = b[0]*x[n] + ... + b[nb]*x[n-nb] - a[1]*y[n-1] - ... - a[na]*y[n-na]</p>
<p>If a[0] is not equal to 1, the filter coeffcients are normalized by a[0].</p>
<p>The <em>gain</em> parameter is applied at the filter input and does not affect the coefficient values. The default gain value is 1.0. This structure results in one extra multiply per computed sample, but allows easy control of the overall 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>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ab011114d45e4f5b1222e07070c9bdc38"></a><!-- doxytag: member="stk::Iir::Iir" ref="ab011114d45e4f5b1222e07070c9bdc38" args="(std::vector&lt; StkFloat &gt; &amp;bCoefficients, std::vector&lt; StkFloat &gt; &amp;aCoefficients)" -->
<div class="memitem">
@@ -223,6 +223,38 @@ 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="l00136"></a>00136 {
<a name="l00137"></a>00137 <span class="preprocessor">#if defined(_STK_DEBUG_)</span>
<a name="l00138"></a>00138 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( channel &gt;= frames.channels() ) {
<a name="l00139"></a>00139 oStream_ &lt;&lt; <span class="stringliteral">&quot;Iir::tick(): channel and StkFrames arguments are incompatible!&quot;</span>;
<a name="l00140"></a>00140 <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="l00141"></a>00141 }
<a name="l00142"></a>00142 <span class="preprocessor">#endif</span>
<a name="l00143"></a>00143 <span class="preprocessor"></span>
<a name="l00144"></a>00144 StkFloat *samples = &amp;frames[channel];
<a name="l00145"></a>00145 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i, hop = frames.channels();
<a name="l00146"></a>00146 <span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j=0; j&lt;frames.frames(); j++, samples += hop ) {
<a name="l00147"></a>00147 outputs_[0] = 0.0;
<a name="l00148"></a>00148 inputs_[0] = gain_ * *samples;
<a name="l00149"></a>00149 <span class="keywordflow">for</span> ( i=b_.size()-1; i&gt;0; i-- ) {
<a name="l00150"></a>00150 outputs_[0] += b_[i] * inputs_[i];
<a name="l00151"></a>00151 inputs_[i] = inputs_[i-1];
<a name="l00152"></a>00152 }
<a name="l00153"></a>00153 outputs_[0] += b_[0] * inputs_[0];
<a name="l00154"></a>00154
<a name="l00155"></a>00155 <span class="keywordflow">for</span> ( i=a_.size()-1; i&gt;0; i-- ) {
<a name="l00156"></a>00156 outputs_[0] += -a_[i] * outputs_[i];
<a name="l00157"></a>00157 outputs_[i] = outputs_[i-1];
<a name="l00158"></a>00158 }
<a name="l00159"></a>00159
<a name="l00160"></a>00160 *samples = outputs_[0];
<a name="l00161"></a>00161 }
<a name="l00162"></a>00162
<a name="l00163"></a>00163 lastFrame_[0] = *(samples-hop);
<a name="l00164"></a>00164 <span class="keywordflow">return</span> frames;
<a name="l00165"></a>00165 }
</pre></div></p>
</div>
</div>
<a class="anchor" id="a60919d8e000bf83613bdd5e002d750f1"></a><!-- doxytag: member="stk::Iir::tick" ref="a60919d8e000bf83613bdd5e002d750f1" args="(StkFrames &amp;iFrames, StkFrames &amp;oFrames, unsigned int iChannel=0, unsigned int oChannel=0)" -->
@@ -265,6 +297,39 @@ 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="l00168"></a>00168 {
<a name="l00169"></a>00169 <span class="preprocessor">#if defined(_STK_DEBUG_)</span>
<a name="l00170"></a>00170 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( iChannel &gt;= iFrames.channels() || oChannel &gt;= oFrames.channels() ) {
<a name="l00171"></a>00171 oStream_ &lt;&lt; <span class="stringliteral">&quot;Iir::tick(): channel and StkFrames arguments are incompatible!&quot;</span>;
<a name="l00172"></a>00172 <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="l00173"></a>00173 }
<a name="l00174"></a>00174 <span class="preprocessor">#endif</span>
<a name="l00175"></a>00175 <span class="preprocessor"></span>
<a name="l00176"></a>00176 StkFloat *iSamples = &amp;iFrames[iChannel];
<a name="l00177"></a>00177 StkFloat *oSamples = &amp;oFrames[oChannel];
<a name="l00178"></a>00178 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i, iHop = iFrames.channels(), oHop = oFrames.channels();
<a name="l00179"></a>00179 <span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j=0; j&lt;iFrames.frames(); j++, iSamples += iHop, oSamples += oHop ) {
<a name="l00180"></a>00180 outputs_[0] = 0.0;
<a name="l00181"></a>00181 inputs_[0] = gain_ * *iSamples;
<a name="l00182"></a>00182 <span class="keywordflow">for</span> ( i=b_.size()-1; i&gt;0; i-- ) {
<a name="l00183"></a>00183 outputs_[0] += b_[i] * inputs_[i];
<a name="l00184"></a>00184 inputs_[i] = inputs_[i-1];
<a name="l00185"></a>00185 }
<a name="l00186"></a>00186 outputs_[0] += b_[0] * inputs_[0];
<a name="l00187"></a>00187
<a name="l00188"></a>00188 <span class="keywordflow">for</span> ( i=a_.size()-1; i&gt;0; i-- ) {
<a name="l00189"></a>00189 outputs_[0] += -a_[i] * outputs_[i];
<a name="l00190"></a>00190 outputs_[i] = outputs_[i-1];
<a name="l00191"></a>00191 }
<a name="l00192"></a>00192
<a name="l00193"></a>00193 *oSamples = outputs_[0];
<a name="l00194"></a>00194 }
<a name="l00195"></a>00195
<a name="l00196"></a>00196 lastFrame_[0] = *(oSamples-oHop);
<a name="l00197"></a>00197 <span class="keywordflow">return</span> iFrames;
<a name="l00198"></a>00198 }
</pre></div></p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
@@ -275,7 +340,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>