| 1 | |
| 2 | <refentry id="liveconv"> |
| 3 | <indexterm id="IndexLiveconv"><primary>liveconv</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Modifiers:Convolution and Morphing</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>liveconv</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>liveconv</refname> |
| 11 | <refpurpose> |
| 12 | Partitioned convolution with dynamically reloadable impulse response |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para>Plugin opcode in liveconv.</para> |
| 19 | <para> |
| 20 | Computationally efficient, partitioned convolution, using a function table as impulse response (IR) source, |
| 21 | similar to the <link linkend="ftconv"><citetitle>ftconv</citetitle></link> opcode. |
| 22 | The <emphasis>liveconv</emphasis> opcode allows dynamic reload of IR data at any time |
| 23 | while the convolution is running, controlled by the <emphasis>kupdate</emphasis> parameter. |
| 24 | Due to the manner in which the IR is updated, the operation can be done without audio artifacts in the convolution output. |
| 25 | </para> |
| 26 | |
| 27 | <para> |
| 28 | The IR table is read partition by partition after signalling an update. |
| 29 | The first <emphasis>ksmps</emphasis> samples must be available when the update flag is set. |
| 30 | The rest of the table can be continuously filled in consecutive passes. There may be a new update |
| 31 | for every partition, allowing as many as <emphasis>ftlen/iplen</emphasis> simultaneous updates |
| 32 | (ftlen is the length of the IR table). |
| 33 | </para> |
| 34 | |
| 35 | <para> |
| 36 | The low-latency, dynamic behavior of <emphasis>liveconv</emphasis> makes it ideal for |
| 37 | convolution with live sampled impulse responses, and/or real-time impulse response transformations and modifications. |
| 38 | </para> |
| 39 | |
| 40 | </refsect1> |
| 41 | |
| 42 | <refsect1> |
| 43 | <title>Syntax</title> |
| 44 | <synopsis>ares <command>liveconv</command> ain, ift, iplen, kupdate, kclear</synopsis> |
| 45 | </refsect1> |
| 46 | |
| 47 | <refsect1> |
| 48 | <title>Initialization</title> |
| 49 | |
| 50 | <para> |
| 51 | <emphasis>ift</emphasis> |
| 52 | -- table number for storing the impulse response (IR) for convolution. The table may be filled with new |
| 53 | data at any time while the convolution is running. |
| 54 | </para> |
| 55 | |
| 56 | <para> |
| 57 | <emphasis>iplen</emphasis> |
| 58 | -- length of impulse response partition in samples; must be an |
| 59 | integer power of two. Lower settings allow for shorter output delay, but |
| 60 | will increase CPU usage. |
| 61 | </para> |
| 62 | |
| 63 | </refsect1> |
| 64 | |
| 65 | <refsect1> |
| 66 | <title>Performance</title> |
| 67 | |
| 68 | <para> |
| 69 | <emphasis>ain</emphasis> |
| 70 | -- input signal. |
| 71 | </para> |
| 72 | |
| 73 | <para> |
| 74 | <emphasis>ares</emphasis> |
| 75 | -- output signal. |
| 76 | </para> |
| 77 | |
| 78 | <para> |
| 79 | <emphasis>kupdate</emphasis> |
| 80 | -- flag indicating whether the IR table should be updated. |
| 81 | If kupdate=1 the IR table ift is loaded partition by partition, starting with the next partition. |
| 82 | If kupdate=-1 the IR table ift is unloaded (cleared to zero) partition by partition, starting with the next partition. |
| 83 | Other values have no effect. |
| 84 | </para> |
| 85 | |
| 86 | <para> |
| 87 | <emphasis>kclear</emphasis> |
| 88 | -- flag for clearing all internal buffers. |
| 89 | If kclear has any value != zero, the internal buffers are cleared immediately. This operation is not free of artifacts. |
| 90 | </para> |
| 91 | |
| 92 | </refsect1> |
| 93 | |
| 94 | <refsect1> |
| 95 | <title>Example</title> |
| 96 | <para> |
| 97 | Here is an example of the liveconv opcode. It uses the file <ulink url="examples/liveconv.csd"><citetitle>liveconv.csd</citetitle></ulink>. |
| 98 | <example> |
| 99 | <title>Example of the liveconv opcode.</title> |
| 100 | <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> |
| 101 | <xi:include href="examples-xml/liveconv.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 102 | </example> |
| 103 | </para> |
| 104 | </refsect1> |
| 105 | |
| 106 | <refsect1> |
| 107 | <title>See also</title> |
| 108 | <para><link linkend="SigProcConmorph"><citetitle>Convolution and Morphing</citetitle></link></para> |
| 109 | </refsect1> |
| 110 | |
| 111 | <refsect1> |
| 112 | <title>Credits</title> |
| 113 | <para> |
| 114 | <simplelist> |
| 115 | <member>Author: Sigurd Saue, Oeyvind Brandtsegg</member> |
| 116 | <member>2017</member> |
| 117 | </simplelist> |
| 118 | </para> |
| 119 | </refsect1> |
| 120 | </refentry> |