| 1 | |
| 2 | <refentry id="lphasor"> |
| 3 | <indexterm id="IndexLphasor"><primary>lphasor</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Generators:Sample Playback</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>lphasor</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>lphasor</refname> |
| 13 | <refpurpose> |
| 14 | Generates a table index for sample playback |
| 15 | </refpurpose> |
| 16 | </refnamediv> |
| 17 | |
| 18 | <refsect1> |
| 19 | <title>Description</title> |
| 20 | <para> |
| 21 | This opcode can be used to generate table index for sample playback (e.g. <link linkend="tablexkt">tablexkt</link>). |
| 22 | </para> |
| 23 | </refsect1> |
| 24 | |
| 25 | <refsect1> |
| 26 | <title>Syntax</title> |
| 27 | <synopsis>ares <command>lphasor</command> xtrns [, ilps] [, ilpe] [, imode] [, istrt] [, istor]</synopsis> |
| 28 | </refsect1> |
| 29 | |
| 30 | <refsect1> |
| 31 | <title>Initialization</title> |
| 32 | <para> |
| 33 | <emphasis>ilps</emphasis> -- loop start. |
| 34 | </para> |
| 35 | |
| 36 | <para> |
| 37 | <emphasis>ilpe</emphasis> -- loop end (must be greater than <emphasis>ilps</emphasis> to enable looping). The default value of <emphasis>ilps</emphasis> and <emphasis>ilpe</emphasis> is zero. |
| 38 | </para> |
| 39 | |
| 40 | <para> |
| 41 | <emphasis>imode</emphasis> (optional: default = 0) -- loop mode. Allowed values are: |
| 42 | <itemizedlist> |
| 43 | <listitem> |
| 44 | <para><emphasis>0:</emphasis> no loop</para> |
| 45 | </listitem> |
| 46 | |
| 47 | <listitem> |
| 48 | <para><emphasis>1:</emphasis> forward loop</para> |
| 49 | </listitem> |
| 50 | |
| 51 | <listitem> |
| 52 | <para><emphasis>2:</emphasis> backward loop</para> |
| 53 | </listitem> |
| 54 | |
| 55 | <listitem> |
| 56 | <para><emphasis>3:</emphasis> forward-backward loop</para> |
| 57 | </listitem> |
| 58 | </itemizedlist> |
| 59 | </para> |
| 60 | |
| 61 | <para> |
| 62 | <emphasis>istrt</emphasis> (optional: default = 0) -- The initial output value (phase). It must be less than <emphasis>ilpe</emphasis> if looping is enabled, but is allowed to be greater than <emphasis>ilps</emphasis> (i.e. you can start playback in the middle of the loop). |
| 63 | </para> |
| 64 | |
| 65 | <para> |
| 66 | <emphasis>istor</emphasis> (optional: default = 0) -- skip initialization if set to any non-zero value. |
| 67 | </para> |
| 68 | </refsect1> |
| 69 | |
| 70 | <refsect1> |
| 71 | <title>Performance</title> |
| 72 | <para> |
| 73 | <emphasis>ares</emphasis> -- a raw table index in samples (same unit for loop points). Can be used as index with the table opcodes. |
| 74 | </para> |
| 75 | |
| 76 | <para> |
| 77 | <emphasis>xtrns</emphasis> -- transpose factor, expressed as a playback ratio. <emphasis>ares</emphasis> is incremented by this value, and wraps around loop points. For example, 1.5 means a fifth above, 0.75 means fourth below. It is not allowed to be negative. |
| 78 | </para> |
| 79 | </refsect1> |
| 80 | <refsect1> |
| 81 | <title>Examples</title> |
| 82 | <para> |
| 83 | Here is an example of the lphasor opcode. It uses the file <ulink url="examples/lphasor.csd"><citetitle>lphasor.csd</citetitle></ulink>. |
| 84 | |
| 85 | <example> |
| 86 | <title>Example of the lphasor opcode.</title> |
| 87 | |
| 88 | <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> |
| 89 | <xi:include href="examples-xml/lphasor.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 90 | </example> |
| 91 | </para> |
| 92 | </refsect1> |
| 93 | |
| 94 | <refsect1> |
| 95 | <title>See also</title> |
| 96 | <para><link linkend="SiggenSample"><citetitle>Sample Playback</citetitle></link></para> |
| 97 | </refsect1> |
| 98 | |
| 99 | <refsect1> |
| 100 | <title>Credits</title> |
| 101 | <para> |
| 102 | <simplelist> |
| 103 | <member>Author: &nameistvan;</member> |
| 104 | <member>January 2002</member> |
| 105 | <member>Example by: Jonathan Murphy</member> |
| 106 | </simplelist> |
| 107 | </para> |
| 108 | |
| 109 | <para>New in version 4.18</para> |
| 110 | <para>Updated April 2002 and November 2002 by &nameistvan;</para> |
| 111 | </refsect1> |
| 112 | </refentry> |