| 1 |
|
| 2 |
<refentry id="loopsegp"> |
| 3 |
<indexterm id="Indexloopsegp"><primary>loopsegp</primary></indexterm> |
| 4 |
<refentryinfo><title>Signal Generators:Linear and Exponential Generators</title></refentryinfo> |
| 5 |
<refmeta> |
| 6 |
<refentrytitle>loopsegp</refentrytitle> |
| 7 |
</refmeta> |
| 8 |
|
| 9 |
<refnamediv> |
| 10 |
<refname>loopsegp</refname> |
| 11 |
<refpurpose> |
| 12 |
Control signals based on linear segments. |
| 13 |
</refpurpose> |
| 14 |
</refnamediv> |
| 15 |
|
| 16 |
<refsect1> |
| 17 |
<title>Description</title> |
| 18 |
<para> |
| 19 |
Generate control signal consisiting of linear segments delimited |
| 20 |
by two or more specified points. The entire envelope can be looped |
| 21 |
at time-variant rate. Each segment coordinate can also be varied |
| 22 |
at k-rate. |
| 23 |
</para> |
| 24 |
</refsect1> |
| 25 |
<refsect1> |
| 26 |
<title>Syntax</title> |
| 27 |
<synopsis>ksig <command>loopsegp</command> kphase, kvalue0, kdur0, kvalue1 \ |
| 28 |
[, kdur1, ... , kdurN-1, kvalueN]</synopsis> |
| 29 |
</refsect1> |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
<refsect1> |
| 39 |
<title>Performance</title> |
| 40 |
<para> |
| 41 |
<emphasis>ksig</emphasis> - output signal |
| 42 |
</para> |
| 43 |
<para> |
| 44 |
<emphasis>kphase</emphasis> - point of the sequence read, expressed as a fraction of a cycle (0 to 1) |
| 45 |
</para> |
| 46 |
<para> |
| 47 |
<emphasis>kvalue0</emphasis> ...<emphasis>kvalueN</emphasis> - values of points |
| 48 |
</para> |
| 49 |
<para> |
| 50 |
<emphasis>kdur0</emphasis> ...<emphasis>kdurN-1</emphasis> - duration of points expessed in fraction of a cycle |
| 51 |
</para> |
| 52 |
<para> |
| 53 |
<emphasis>loopsegp</emphasis> opcode is similar to <link linkend="loopseg"><citetitle>loopseg</citetitle></link>; the only difference is that, instead of frequency, a time-variant phase is required. If you use <link linkend="phasor"><citetitle>phasor</citetitle></link> to get the phase value, you will have a behaviour identical to <link linkend="loopseg"><citetitle>loopseg</citetitle></link>, but interesting results can be achieved when using phases having non-linear motions, making <emphasis>loopsegp</emphasis> more powerful and general than <link linkend="loopseg"><citetitle>loopseg</citetitle></link>. |
| 54 |
</para> |
| 55 |
|
| 56 |
</refsect1> |
| 57 |
|
| 58 |
<refsect1> |
| 59 |
<title>Examples</title> |
| 60 |
<para> |
| 61 |
Here is an example of the loopsegp opcode. It uses the file <ulink url="examples/loopsegp.csd"><citetitle>loopsegp.csd</citetitle></ulink>. |
| 62 |
<example> |
| 63 |
<title>Example of the loopsegp opcode.</title> |
| 64 |
<xi:include href="examples-xml/loopsegp.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 65 |
</example> |
| 66 |
</para> |
| 67 |
</refsect1> |
| 68 |
|
| 69 |
<refsect1> |
| 70 |
<title>See also</title> |
| 71 |
<para><link linkend="SiggenLineexp"><citetitle>Linear and Exponential Generators</citetitle></link></para> |
| 72 |
</refsect1> |
| 73 |
|
| 74 |
<refsect1> |
| 75 |
<title>Credits</title> |
| 76 |
<para>Written by &namegabriel;.</para> |
| 77 |
<para>New in Csound 5. (Previously available only on CsoundAV)</para> |
| 78 |
</refsect1> |
| 79 |
</refentry> |
| 80 |
|
| 81 |
|