| 1 | |
| 2 | <refentry id="delay"> |
| 3 | <indexterm id="IndexDelay"><primary>delay</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Modifiers:Delay</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>delay</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>delay</refname> |
| 13 | <refpurpose> |
| 14 | Delays an input signal by some time interval. |
| 15 | </refpurpose> |
| 16 | </refnamediv> |
| 17 | |
| 18 | <refsect1> |
| 19 | <title>Description</title> |
| 20 | <para> |
| 21 | A signal can be read from or written into a delay path, or it can be automatically delayed by some time interval. |
| 22 | </para> |
| 23 | </refsect1> |
| 24 | |
| 25 | <refsect1> |
| 26 | <title>Syntax</title> |
| 27 | <synopsis>ares <command>delay</command> asig, idlt [, iskip]</synopsis> |
| 28 | </refsect1> |
| 29 | |
| 30 | <refsect1> |
| 31 | <title>Initialization</title> |
| 32 | <para> |
| 33 | <emphasis>idlt</emphasis> -- requested delay time in seconds. This can be as large as available memory will permit. The space required for n seconds of delay is 4n * <emphasis>sr</emphasis> bytes. It is allocated at the time the instrument is first initialized, and returned to the pool at the end of a score section. |
| 34 | </para> |
| 35 | |
| 36 | <para> |
| 37 | <emphasis>iskip</emphasis> (optional, default=0) -- initial disposition of delay-loop data space (see <link linkend="reson"><citetitle>reson</citetitle></link>). The default value is 0. |
| 38 | </para> |
| 39 | </refsect1> |
| 40 | |
| 41 | <refsect1> |
| 42 | <title>Performance</title> |
| 43 | <para> |
| 44 | <emphasis>asig</emphasis> -- audio signal |
| 45 | </para> |
| 46 | |
| 47 | <para> |
| 48 | <emphasis>delay</emphasis> is a composite of <link linkend="delayr"><citetitle>delayr</citetitle></link> and <link linkend="delayw"><citetitle>delayw</citetitle></link>, both reading from and writing into its own storage area. It can thus accomplish signal time-shift, although modified feedback is not possible. There is no minimum delay period. |
| 49 | </para> |
| 50 | </refsect1> |
| 51 | |
| 52 | <refsect1> |
| 53 | <title>Examples</title> |
| 54 | <para> |
| 55 | Here is an example of the delay opcode. It uses the file <ulink url="examples/delay.csd"><citetitle>delay.csd</citetitle></ulink>. |
| 56 | |
| 57 | <example> |
| 58 | <title>Example of the delay opcode.</title> |
| 59 | |
| 60 | |
| 61 | |
| 62 | <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> |
| 63 | <xi:include href="examples-xml/delay.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 64 | </example> |
| 65 | </para> |
| 66 | </refsect1> |
| 67 | |
| 68 | <refsect1> |
| 69 | <title>See also</title> |
| 70 | <para><link linkend="SigmodDelay"><citetitle>Delay</citetitle></link></para> |
| 71 | </refsect1> |
| 72 | |
| 73 | </refentry> |