| 1 | |
| 2 | <refentry id="dconv"> |
| 3 | <indexterm id="IndexDconv"><primary>dconv</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Modifiers:Convolution and Morphing</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>dconv</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>dconv</refname> |
| 11 | <refpurpose> |
| 12 | A direct convolution opcode. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | A direct convolution opcode. |
| 20 | </para> |
| 21 | </refsect1> |
| 22 | |
| 23 | <refsect1> |
| 24 | <title>Syntax</title> |
| 25 | <synopsis>ares <command>dconv</command> asig, isize, ifn</synopsis> |
| 26 | </refsect1> |
| 27 | |
| 28 | <refsect1> |
| 29 | <title>Initialization</title> |
| 30 | <para> |
| 31 | <emphasis>isize</emphasis> -- the size of the convolution buffer to use. If the buffer size is smaller than the size of <emphasis>ifn</emphasis>, then only the first <emphasis>isize</emphasis> values will be used from the table. |
| 32 | </para> |
| 33 | |
| 34 | <para> |
| 35 | <emphasis>ifn</emphasis> -- table number of a stored function containing the impulse response for convolution. |
| 36 | </para> |
| 37 | </refsect1> |
| 38 | |
| 39 | <refsect1> |
| 40 | <title>Performance</title> |
| 41 | <para> |
| 42 | Rather than the analysis/resynthesis method of the <emphasis>convolve</emphasis> opcode, <emphasis>dconv</emphasis> uses direct convolution to create the result. For small tables it can do this quite efficiently, however larger table require much more time to run. <emphasis>dconv</emphasis> does (<emphasis>isize</emphasis> * <emphasis>ksmps</emphasis>) multiplies on every k-cycle. Therefore, reverb and delay effects are best done with other opcodes (unless the times are short). |
| 43 | </para> |
| 44 | |
| 45 | <para> |
| 46 | <emphasis>dconv</emphasis> was designed to be used with time varying tables to facilitate new realtime filtering capabilities. |
| 47 | </para> |
| 48 | </refsect1> |
| 49 | |
| 50 | <refsect1> |
| 51 | <title>Examples</title> |
| 52 | <para> |
| 53 | Here is an example of the dconv opcode. It uses the file <ulink url="examples/dconv.csd"><citetitle>dconv.csd</citetitle></ulink>. |
| 54 | |
| 55 | <example> |
| 56 | <title>Example of the dconv opcode.</title> |
| 57 | <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> |
| 58 | <xi:include href="examples-xml/dconv.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 59 | </example> |
| 60 | </para> |
| 61 | </refsect1> |
| 62 | |
| 63 | <refsect1> |
| 64 | <title>See also</title> |
| 65 | <para><link linkend="SigProcConmorph"><citetitle>Convolution and Morphing</citetitle></link></para> |
| 66 | </refsect1> |
| 67 | |
| 68 | <refsect1> |
| 69 | <title>Credits</title> |
| 70 | <para> |
| 71 | <simplelist> |
| 72 | <member>Author: William <quote>Pete</quote> Moss</member> |
| 73 | <member>2001</member> |
| 74 | </simplelist> |
| 75 | </para> |
| 76 | |
| 77 | <para>New in version 4.12</para> |
| 78 | </refsect1> |
| 79 | </refentry> |