biquad.s
<BLOCK> <LICENSE> /* Copyright (C) 2006-2007 Silicon DSP Corporation, Portland, Oregon
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
http://capsimtmk.sourceforge.net */ </LICENSE> <BLOCK_NAME>biquad</BLOCK_NAME>
<COMMENTS> <![CDATA[
/* biquad.s */ /********************************************************************** biquad() *********************************************************************** Implements biquad. */ ]]> </COMMENTS> <DESC_SHORT> Implements biquad.</DESC_SHORT>
<DESCRIPTION> Implements biquad. </DESCRIPTION>
<PROGRAMMERS>
</PROGRAMMERS>
<DECLARATIONS>
</DECLARATIONS>
<PARAMETERS> <PARAM> <DEF>zsec1</DEF> <TYPE>float</TYPE> <NAME>zsec1</NAME> <VALUE>1.0</VALUE> </PARAM> <PARAM> <DEF>zsec2</DEF> <TYPE>float</TYPE> <NAME>zsec2</NAME> <VALUE>0</VALUE> </PARAM> <PARAM> <DEF>psec1</DEF> <TYPE>float</TYPE> <NAME>psec1</NAME> <VALUE>-1.259838581e+00</VALUE> </PARAM> <PARAM> <DEF>psec2</DEF> <TYPE>float</TYPE> <NAME>psec2</NAME> <VALUE>1.000000000e+00</VALUE> </PARAM> </PARAMETERS>
<INPUT_BUFFERS> <BUFFER> <TYPE>float</TYPE> <NAME>x</NAME> </BUFFER> </INPUT_BUFFERS> <OUTPUT_BUFFERS> <BUFFER> <TYPE>float</TYPE> <NAME>y</NAME> </BUFFER> </OUTPUT_BUFFERS>
<STATES> <STATE> <TYPE>float</TYPE> <NAME>xs_A[3]</NAME> </STATE> <STATE> <TYPE>float</TYPE> <NAME>ys_A[3]</NAME> </STATE> </STATES>
<INIT_CODE> <![CDATA[
xs_A[2]=0; xs_A[1]=0; xs_A[0]=0;
ys_A[2]=0; ys_A[1]=0; ys_A[0]=0;
]]> </INIT_CODE>
<MAIN_CODE> <![CDATA[
float xx; float yy;
xx=x.read(); xs_A[2]=xs_A[1]; xs_A[1]=xs_A[0]; xs_A[0]=xx;
yy=xs_A[0]+(zsec1*xs_A[1])+(zsec2*xs_A[2])-(psec1*ys_A[1])-(psec2*ys_A[2]);
ys_A[2]=ys_A[1]; ys_A[1]=yy; y.write(yy);
]]> </MAIN_CODE>
<WRAPUP_CODE> <![CDATA[
]]> </WRAPUP_CODE>
</BLOCK>