<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="lpshold">
  <refmeta>
    <refentrytitle>lpshold</refentrytitle>
  </refmeta>

  <refnamediv>
    <refname>lpshold</refname>
    <refpurpose>
      Generate control signal consisting of held segments.
      <indexterm id="IndexLpshold"><primary>lpshold</primary></indexterm>
    </refpurpose>
  </refnamediv>
  
  <refsect1>
    <title>Description</title>
    <para>
      Generate control signal consisting of held segments delimited by two or more specified points. The entire envelope is looped at kfreq rate. Each parameter can be varied at k-rate.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis>ksig <command>lpshold</command> kfreq, ktrig, ktime0, kvalue0  [, ktime1] [, kvalue1] [, ktime2] [, kvalue2] [...]</synopsis>
  </refsect1>

  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>ksig</emphasis> -- Output signal
    </para>

    <para>
      <emphasis>kfreq</emphasis> -- Repeat rate in Hz or fraction of Hz
    </para>

    <para>
      <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.
    </para>

    <para>
      <emphasis>ktime0...ktimeN</emphasis> -- Times of points; expressed in fraction of a cycle
    </para>

    <para>
      <emphasis>kvalue0...kvalueN</emphasis> -- Values of points
    </para>

    <para>
      <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.
    </para>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the lpshold opcode. It uses the files <ulink url="examples/lpshold.orc"><citetitle>lpshold.orc</citetitle></ulink> and <ulink url="examples/lpshold.sco"><citetitle>lpshold.sco</citetitle></ulink>.

      <example>
        <title>Example of the lpshold opcode.</title>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/lpshold.orc" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/lpshold.sco" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>
      </example>
    </para>
  </refsect1>


  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="loopseg"><citetitle>loopseg</citetitle></link>
    </para>
  </refsect1>

  <refsect1>
    <title>Credits</title>
    <para>Author: &namegabriel;</para>
    <para>New in Version 4.13</para>
  </refsect1>
</refentry>
