| 1 | |
| 2 | <refentry id="lpshold"> |
| 3 | <indexterm id="IndexLpshold"><primary>lpshold</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Generators:Linear and Exponential Generators</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>lpshold</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>lpshold</refname> |
| 13 | <refpurpose> |
| 14 | Generate control signal consisting of held segments. |
| 15 | </refpurpose> |
| 16 | </refnamediv> |
| 17 | |
| 18 | <refsect1> |
| 19 | <title>Description</title> |
| 20 | <para> |
| 21 | Generate control signal consisting of held segments delimited by two or more specified points. The entire envelope is looped at <emphasis>kfreq</emphasis> rate. Each parameter can be varied at k-rate. |
| 22 | </para> |
| 23 | </refsect1> |
| 24 | |
| 25 | <refsect1> |
| 26 | <title>Syntax</title> |
| 27 | <synopsis>ksig <command>lpshold</command> kfreq, ktrig, iphase, kvalue0, ktime0 [, kvalue1] [, ktime1] [, kvalue2] [, ktime2] [...]</synopsis> |
| 28 | </refsect1> |
| 29 | |
| 30 | <refsect1> |
| 31 | <title>Performance</title> |
| 32 | <para> |
| 33 | <emphasis>ksig</emphasis> -- Output signal |
| 34 | </para> |
| 35 | |
| 36 | <para> |
| 37 | <emphasis>kfreq</emphasis> -- Repeat rate in Hz or fraction of Hz |
| 38 | </para> |
| 39 | |
| 40 | <para> |
| 41 | <emphasis>ktrig</emphasis> -- If non-zero, retriggers the envelope from start (see <link linkend="trigger"><citetitle>trigger opcode</citetitle></link>), before the envelope cycle is completed. |
| 42 | </para> |
| 43 | |
| 44 | <para> |
| 45 | <emphasis>iphase</emphasis> -- A vaue between 0 and 1 to say |
| 46 | where to start the loop. Zero, the commonest value, indicates |
| 47 | the beginning. |
| 48 | </para> |
| 49 | |
| 50 | <para> |
| 51 | <emphasis>kvalue0...kvalueN</emphasis> -- Values of points |
| 52 | </para> |
| 53 | |
| 54 | <para> |
| 55 | <emphasis>ktime0...ktimeN</emphasis> -- Times between points; expressed in fractions of a cycle (see below). The final time designates a ramp between the final value and the first value. |
| 56 | </para> |
| 57 | |
| 58 | <para> |
| 59 | <emphasis>lpshold</emphasis> is similar to <link linkend="loopseg"><citetitle>loopseg</citetitle></link>, but can generate only horizontal segments, i.e. holds values for each time interval placed between <emphasis>ktimeN</emphasis> and <emphasis>ktimeN+1</emphasis>. It can be useful, among other things, for melodic control, like old analog sequencers. |
| 60 | </para> |
| 61 | </refsect1> |
| 62 | |
| 63 | <refsect1> |
| 64 | <title>Examples</title> |
| 65 | <para> |
| 66 | Here is an example of the lpshold opcode. It uses the file <ulink url="examples/lpshold.csd"><citetitle>lpshold.csd</citetitle></ulink>. |
| 67 | |
| 68 | <example> |
| 69 | <title>Example of the lpshold opcode.</title> |
| 70 | |
| 71 | |
| 72 | |
| 73 | <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> |
| 74 | <xi:include href="examples-xml/lpshold.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 75 | </example> |
| 76 | </para> |
| 77 | </refsect1> |
| 78 | |
| 79 | <refsect1> |
| 80 | <title>See also</title> |
| 81 | <para><link linkend="SiggenLineexp"><citetitle>Linear and Exponential Generators</citetitle></link></para> |
| 82 | </refsect1> |
| 83 | |
| 84 | <refsect1> |
| 85 | <title>Credits</title> |
| 86 | <para>Author: &namegabriel;</para> |
| 87 | <para>New in Version 4.13</para> |
| 88 | </refsect1> |
| 89 | </refentry> |