| 1 | |
| 2 | <refentry id="deltapx"> |
| 3 | <indexterm id="IndexDeltapx"><primary>deltapx</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Modifiers:Delay</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>deltapx</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>deltapx</refname> |
| 11 | <refpurpose> |
| 12 | Read from or write to a delay line with interpolation. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | <emphasis>deltapx</emphasis> is similar to <link linkend="deltapi"><citetitle>deltapi</citetitle></link> or <link linkend="deltap3"><citetitle>deltap3</citetitle></link>. However, it allows higher quality interpolation. This opcode can read from and write to a <emphasis>delayr/delayw</emphasis> delay line with interpolation. |
| 20 | </para> |
| 21 | </refsect1> |
| 22 | |
| 23 | <refsect1> |
| 24 | <title>Syntax</title> |
| 25 | <synopsis>aout <command>deltapx</command> adel, iwsize</synopsis> |
| 26 | </refsect1> |
| 27 | |
| 28 | <refsect1> |
| 29 | <title>Initialization</title> |
| 30 | <para> |
| 31 | <emphasis>iwsize</emphasis> -- interpolation window size in samples. Allowed values are integer multiplies of 4 in the range 4 to 1024. <emphasis>iwsize</emphasis> = 4 uses cubic interpolation. Increasing <emphasis>iwsize</emphasis> improves sound quality at the expense of CPU usage, and minimum delay time. |
| 32 | </para> |
| 33 | </refsect1> |
| 34 | |
| 35 | <refsect1> |
| 36 | <title>Performance</title> |
| 37 | <para> |
| 38 | <emphasis>aout</emphasis> -- Output signal. |
| 39 | </para> |
| 40 | |
| 41 | <para> |
| 42 | <emphasis>adel</emphasis> -- Delay time in seconds. |
| 43 | </para> |
| 44 | |
| 45 | <para> |
| 46 | <informalexample> |
| 47 | <programlisting> |
| 48 | a1 <emphasis role="opc">delayr</emphasis> idlr |
| 49 | <emphasis role="opc">deltapxw</emphasis> a2, adl1, iws1 |
| 50 | a3 <emphasis role="opc">deltapx</emphasis> adl2, iws2 |
| 51 | <emphasis role="opc">deltapxw</emphasis> a4, adl3, iws3 |
| 52 | <emphasis role="opc">delayw</emphasis> a5</programlisting> |
| 53 | </informalexample> |
| 54 | </para> |
| 55 | |
| 56 | <para> |
| 57 | Minimum and maximum delay times: |
| 58 | |
| 59 | <informalexample> |
| 60 | <programlisting> |
| 61 | idlr >= 1/kr Delay line length |
| 62 | |
| 63 | adl1 >= (iws1/2)/sr Write before read |
| 64 | adl1 <= idlr - (1 + iws1/2)/sr (allows shorter delays) |
| 65 | |
| 66 | adl2 >= 1/kr + (iws2/2)/sr Read time |
| 67 | adl2 <= idlr - (1 + iws2/2)/sr |
| 68 | adl2 >= adl1 + (iws1 + iws2) / (2*sr) |
| 69 | adl2 >= 1/kr + adl3 + (iws2 + iws3) / (2*sr) |
| 70 | |
| 71 | adl3 >= (iws3/2)/sr Write after read |
| 72 | adl3 <= idlr - (1 + iws3/2)/sr (allows feedback) |
| 73 | </programlisting> |
| 74 | </informalexample> |
| 75 | </para> |
| 76 | |
| 77 | <note> |
| 78 | <title>Note</title> |
| 79 | <para> |
| 80 | Window sizes for opcodes other than <emphasis>deltapx</emphasis> are: <emphasis>deltap</emphasis>, <emphasis>deltapn</emphasis>: 1, <emphasis>deltapi</emphasis>: 2 (linear), <emphasis>deltap3</emphasis>: 4 (cubic) |
| 81 | </para> |
| 82 | </note> |
| 83 | </refsect1> |
| 84 | |
| 85 | <refsect1> |
| 86 | <title>Examples</title> |
| 87 | <para> |
| 88 | Here is an example of the deltapx opcode. It uses the file <ulink url="examples/deltapx.csd"><citetitle>deltapx.csd</citetitle></ulink>. |
| 89 | <example> |
| 90 | <title>Example of the deltapx opcode.</title> |
| 91 | <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> |
| 92 | <xi:include href="examples-xml/deltapx.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 93 | </example> |
| 94 | </para> |
| 95 | </refsect1> |
| 96 | |
| 97 | <refsect1> |
| 98 | <title>See also</title> |
| 99 | <para><link linkend="SigmodDelay"><citetitle>Delay</citetitle></link></para> |
| 100 | </refsect1> |
| 101 | |
| 102 | <refsect1> |
| 103 | <title>Credits</title> |
| 104 | <para> |
| 105 | <simplelist> |
| 106 | <member>Author: &nameistvan;</member> |
| 107 | <member>August 2001</member> |
| 108 | </simplelist> |
| 109 | </para> |
| 110 | |
| 111 | <para>New in version 4.13</para> |
| 112 | </refsect1> |
| 113 | </refentry> |