| 1 | |
| 2 | <refentry id="deltapn"> |
| 3 | <indexterm id="IndexDeltapn"><primary>deltapn</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Modifiers:Delay</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>deltapn</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>deltapn</refname> |
| 11 | <refpurpose> |
| 12 | Taps a delay line at variable offset times. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | Tap a delay line at variable offset times. |
| 20 | </para> |
| 21 | </refsect1> |
| 22 | |
| 23 | <refsect1> |
| 24 | <title>Syntax</title> |
| 25 | <synopsis>ares <command>deltapn</command> xnumsamps</synopsis> |
| 26 | </refsect1> |
| 27 | |
| 28 | <refsect1> |
| 29 | <title>Performance</title> |
| 30 | <para> |
| 31 | <emphasis>xnumsamps</emphasis> -- specifies the tapped delay time in number of samples. Each can range from 1 control period to the full delay time of the read/write pair; however, since there is no internal check for adherence to this range, the user is wholly responsible. Each argument can be a constant, a variable, or a time-varying signal. |
| 32 | </para> |
| 33 | |
| 34 | <para> |
| 35 | <emphasis>deltapn</emphasis> is identical to <link linkend="deltapi"><citetitle>deltapi</citetitle></link>, except delay time is specified in number of samples, instead of seconds (&namehans;). |
| 36 | </para> |
| 37 | |
| 38 | <para> |
| 39 | This opcode can tap into a <emphasis>delayr</emphasis>/<emphasis>delayw</emphasis> pair, extracting delayed audio from the <emphasis>idlt</emphasis> seconds of stored sound. There can be any number of <emphasis>deltap</emphasis> and/or <emphasis>deltapi</emphasis> units between a read/write pair. Each receives an audio tap with no change of original amplitude. |
| 40 | </para> |
| 41 | |
| 42 | <para> |
| 43 | This opcode can provide multiple delay taps for arbitrary delay path and feedback networks. They can deliver either constant-time or time-varying taps, and are useful for building chorus effects, harmonizers, and Doppler shifts. Constant-time delay taps (and some slowly changing ones) do not need interpolated readout; they are well served by <emphasis>deltap</emphasis>. Medium-paced or fast varying dlt's, however, will need the extra services of <emphasis>deltapi</emphasis>. |
| 44 | </para> |
| 45 | |
| 46 | <para> |
| 47 | <emphasis>delayr</emphasis>/<emphasis>delayw</emphasis> pairs may be interleaved. To associate a delay tap unit with a specific <emphasis>delayr</emphasis> unit, it not only has to be located between that <emphasis>delayr</emphasis> and the appropriate <emphasis>delayw</emphasis> unit, but must also precede any following <emphasis>delayr</emphasis> units. See Example 2. (This feature added in Csound version 3.57 by Jens Groh and &namejohn;). |
| 48 | </para> |
| 49 | |
| 50 | <para> |
| 51 | <emphasis>N.B.</emphasis> k-rate delay times are not internally interpolated, but rather lay down stepped time-shifts of audio samples; this will be found quite adequate for slowly changing tap times. For medium to fast-paced changes, however, one should provide a higher resolution audio-rate timeshift as input. |
| 52 | </para> |
| 53 | </refsect1> |
| 54 | |
| 55 | |
| 56 | <refsect1> |
| 57 | <title>Examples</title> |
| 58 | <para> |
| 59 | Here is an example of the deltapn opcode. It uses the file <ulink url="examples/deltapn.csd"><citetitle>deltapn.csd</citetitle></ulink>. |
| 60 | |
| 61 | <example> |
| 62 | <title>Example of the deltapn opcode.</title> |
| 63 | |
| 64 | <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> |
| 65 | <xi:include href="examples-xml/deltapn.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 66 | </example> |
| 67 | </para> |
| 68 | </refsect1> |
| 69 | |
| 70 | <refsect1> |
| 71 | <title>See also</title> |
| 72 | <para><link linkend="SigmodDelay"><citetitle>Delay</citetitle></link></para> |
| 73 | </refsect1> |
| 74 | |
| 75 | </refentry> |