| 1 | |
| 2 | <refentry id="trfilter"> |
| 3 | <indexterm id="Indextrfilter"><primary>trfilter</primary></indexterm> |
| 4 | |
| 5 | <refentryinfo><title>Spectral Processing:Streaming</title></refentryinfo> |
| 6 | <refmeta> |
| 7 | <refentrytitle>trfilter</refentrytitle> |
| 8 | </refmeta> |
| 9 | |
| 10 | <refnamediv> |
| 11 | <refname>trfilter</refname> |
| 12 | <refpurpose> |
| 13 | Streaming partial track filtering. |
| 14 | </refpurpose> |
| 15 | </refnamediv> |
| 16 | |
| 17 | <refsect1> |
| 18 | <title>Description</title> |
| 19 | <para> |
| 20 | The <emphasis>trfilter</emphasis> opcode takes an input containg a TRACKS pv streaming signal (as generated, |
| 21 | for instance by <emphasis>partials</emphasis>) and filters it using an amplitude response curve stored in |
| 22 | a function table. The function table can have any size (no restriction to powers-of-two). |
| 23 | The table lookup is done by linear-interpolation. It is possible to create time-varying |
| 24 | filter curves by updating the amlitude response table with a table-writing opcode. |
| 25 | </para> |
| 26 | </refsect1> |
| 27 | |
| 28 | <refsect1> |
| 29 | <title>Syntax</title> |
| 30 | <synopsis>fsig <command>trfilter</command> fin, kamnt, ifn</synopsis> |
| 31 | </refsect1> |
| 32 | |
| 33 | <refsect1> |
| 34 | <title>Performance</title> |
| 35 | <para> |
| 36 | <emphasis>fsig</emphasis> -- output pv stream in TRACKS format |
| 37 | </para> |
| 38 | |
| 39 | <para> |
| 40 | <emphasis>fin</emphasis> -- input pv stream in TRACKS format |
| 41 | </para> |
| 42 | <para> |
| 43 | <emphasis>kamnt</emphasis> -- amount of filtering (0-1) |
| 44 | </para> |
| 45 | |
| 46 | <para> |
| 47 | <emphasis>ifn</emphasis> -- function table number. This will contain an |
| 48 | amplitude response curve, from 0 Hz to the Nyquist (table indexes 0 to N). Any size is |
| 49 | allowed. Larger tables will provide a smoother amplitude response curve. Table reading uses |
| 50 | linear interpolation. |
| 51 | </para> |
| 52 | </refsect1> |
| 53 | |
| 54 | <refsect1> |
| 55 | <title>Examples</title> |
| 56 | <para> |
| 57 | Here is an example of the trfilter opcode. It uses the file <ulink url="examples/trfilter.csd"><citetitle>trfilter.csd</citetitle></ulink>. |
| 58 | <example> |
| 59 | <title>Example of the trfilter opcode.</title> |
| 60 | <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para> |
| 61 | <xi:include href="examples-xml/trfilter.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 62 | </example> |
| 63 | </para> |
| 64 | <para> |
| 65 | The example above shows partial tracking of an ifd-analysis signal and |
| 66 | linear additive resynthesis with low-pass filtering. |
| 67 | </para> |
| 68 | </refsect1> |
| 69 | |
| 70 | <refsect1> |
| 71 | <title>See also</title> |
| 72 | <para><link linkend="SpectralRealTime"><citetitle>Tools for Real-time Spectral Processing (pvs opcodes)</citetitle></link></para> |
| 73 | </refsect1> |
| 74 | |
| 75 | <refsect1> |
| 76 | <title>Credits</title> |
| 77 | <para> |
| 78 | <simplelist> |
| 79 | <member>Author: Victor Lazzarini;</member> |
| 80 | <member>February 2006 </member> |
| 81 | </simplelist> |
| 82 | </para> |
| 83 | <para>New in Csound 5.01</para> |
| 84 | </refsect1> |
| 85 | </refentry> |