summaryrefslogtreecommitdiff
path: root/opcodes/dconv.xml
blob: 490d65f9f91104a0942cfa1bf7276627045b2bb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<refentry id="dconv">
<indexterm id="IndexDconv"><primary>dconv</primary></indexterm>
  <refentryinfo><title>Signal Modifiers:Convolution and Morphing</title></refentryinfo>
  <refmeta>
    <refentrytitle>dconv</refentrytitle>
  </refmeta>

  <refnamediv>
    <refname>dconv</refname>
    <refpurpose>
      A direct convolution opcode.
    </refpurpose>
  </refnamediv>

  <refsect1>
    <title>Description</title>
    <para>
      A direct convolution opcode.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis>ares <command>dconv</command> asig, isize, ifn</synopsis>
  </refsect1>

  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>isize</emphasis> -- the size of the convolution buffer to use.  if the buffer size is smaller than the size of ifn, then only the first isize values will be used from the table.
    </para>

    <para>
      <emphasis>ifn</emphasis> -- table number of a stored function containing the impulse response for convolution.
    </para>
  </refsect1>

  <refsect1>
    <title>Performance</title>
    <para>
      Rather than the analysis/resynthesis method of the convolve 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 (isize * ksmps) multiplies on every k-cycle.  Therefore, reverb and delay effects are best done with other opcodes (unless the times are short).
    </para>

    <para>
      <emphasis>dconv</emphasis> was designed to be used with time varying tables to facilitate new realtime filtering capabilities.
    </para>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the dconv opcode. It uses the file <ulink url="examples/dconv.csd"><citetitle>dconv.csd</citetitle></ulink>.

      <example>
        <title>Example of the dconv opcode.</title>
        <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>
          <xi:include href="examples-xml/dconv.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
      </example>
    </para>
  </refsect1>
  
  <refsect1>
    <title>See also</title>
    <para>
      <link linkend="pconvolve"><citetitle>pconvolve</citetitle></link>,
      <link linkend="convolve"><citetitle>convolve</citetitle></link>.,
      <link linkend="ftconv"><citetitle>convolve</citetitle></link>
    </para>
  </refsect1>
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: William <quote>Pete</quote> Moss</member>
        <member>2001</member>
      </simplelist>
    </para>

    <para>New in version 4.12</para>
  </refsect1>
</refentry>