<sect1 id='designfilter-manual'> <title><command>design_filter</command></title> <toc depth='1'></toc> <para> </para> <sect2> <title>Synopsis</title> <para> </para> <!-- /amd/projects/festival/versions/v_mpiro/speech_tools_linux/bin/design_filter -sgml_synopsis --> <para> <cmdsynopsis><command>design_filter</command>[input file0] -o [output file]<arg>-h </arg> <arg>-forder <replaceable>int</replaceable></arg> <arg>-double </arg> <arg>-o <replaceable>ofile</replaceable></arg> </cmdsynopsis> </para> <!-- DONE /amd/projects/festival/versions/v_mpiro/speech_tools_linux/bin/design_filter -sgml_synopsis --> <para> <command>designfilter</command> computes the coefficients of a FIR filter with a given frequency response. The user supplies the frequency response as a vector of evenly spaced gains ranging from 0 to half the sampling frequency. The length of this vector must be a power of 2. The filter coefficients can be used by the \Ref{sigfilter} program. </para> </sect2> <sect2> <title>Options</title> <para> </para> <!-- /amd/projects/festival/versions/v_mpiro/speech_tools_linux/bin/design_filter -sgml_options --> <para> <variablelist> <varlistentry><term>-h</term> <LISTITEM><PARA> Options help </PARA></LISTITEM> </varlistentry> <varlistentry><term>-forder</term> <LISTITEM><PARA> <replaceable>int</replaceable> Order of FIR filter. This must be ODD. Sensible values range from 19 (quick but with a shallow rolloff) to 199 (slow but with a steep rolloff). The default is 199. </PARA></LISTITEM> </varlistentry> <varlistentry><term>-double</term> <LISTITEM><PARA> Design a filter suitable for double (zero-phase) filtering </PARA></LISTITEM> </varlistentry> <varlistentry><term>-o</term> <LISTITEM><PARA> <replaceable>ofile</replaceable> output filter file </PARA></LISTITEM> </varlistentry> </variablelist> </para> <!-- DONE /amd/projects/festival/versions/v_mpiro/speech_tools_linux/bin/design_filter -sgml_options --> </sect2> <sect2> <title>Example</title> <para> <title>Designing a bandpass filter</title> The frequency response vector must be placed in a file, in either ascii of EST headered format. For example: <screen> <para>EST_File fvector</para> <para>version 1</para> <para>DataType ascii</para> <para>length 128</para> <para>EST_Header_End</para> <para>0.0</para> <para>0.0</para> <para>.....[etc]</para> <para>1.0</para> <para>1.0</para> <para>1.0</para> <para>.....[etc]</para> <para>0.0</para> <para>0.0</para> <para>0.0</para> <para>.....[etc]</para> </screen> And the filter is simply designed using </para> <para> <screen> $ design_filter -o filter.coefficients filter.freq_response </screen> </para> <para> where filter.freq_response is the above file, and filter.coefficients is the output file which can be used by \Ref{sigfilter}. </para> </para> </sect2> </sect1>