| 1 | |
| 2 | <refentry id="trigexpseg"> |
| 3 | <indexterm id="Indextrigexpseg"><primary>trigexpseg</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Generators:Linear and Exponential Generators</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>trigexpseg</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>trigexpseg</refname> |
| 13 | <refpurpose> |
| 14 | Triggers a series of exponential segments between specified points. |
| 15 | </refpurpose> |
| 16 | </refnamediv> |
| 17 | |
| 18 | <refsect1> |
| 19 | <title>Description</title> |
| 20 | <para> |
| 21 | Triggers a series of exponential segments between specified points. |
| 22 | </para> |
| 23 | </refsect1> |
| 24 | |
| 25 | <refsect1> |
| 26 | <title>Syntax</title> |
| 27 | <synopsis>ares <command>trigexpseg</command> kTrig, ia, idur1, ib [, idur2] [, ic] [...]</synopsis> |
| 28 | |
| 29 | <synopsis>kres <command>trigexpseg</command> kTrig, ia, idur1, ib [, idur2] [, ic] [...]</synopsis> |
| 30 | </refsect1> |
| 31 | |
| 32 | <refsect1> |
| 33 | <title>Initialization</title> |
| 34 | <para> |
| 35 | <emphasis>ia</emphasis> -- starting value. Zero is illegal for exponentials. |
| 36 | </para> |
| 37 | |
| 38 | <para> |
| 39 | <emphasis>ib, ic</emphasis>, etc. -- value after <emphasis>dur1</emphasis> seconds, etc. For exponentials, must be non-zero and must agree in sign with <emphasis>ia</emphasis>. |
| 40 | </para> |
| 41 | |
| 42 | <para> |
| 43 | <emphasis>idur1</emphasis> -- duration in seconds of first segment |
| 44 | </para> |
| 45 | |
| 46 | <para> |
| 47 | <emphasis>idur2, idur3</emphasis>, etc. -- duration in seconds of subsequent segments. |
| 48 | </para> |
| 49 | </refsect1> |
| 50 | |
| 51 | <refsect1> |
| 52 | <title>Performance</title> |
| 53 | |
| 54 | <para> |
| 55 | <emphasis>kTrig</emphasis> -- trigger value. Will trigger playback of envelop when kTrig is equal 1 |
| 56 | </para> |
| 57 | |
| 58 | <para> |
| 59 | These units generate control or audio signals whose values can pass through 2 or more specified points. The sum of <emphasis>dur</emphasis> values may or may not equal the instrument's performance time: a shorter performance will truncate the specified pattern. Triggering the envelop while it is already playing will cause the envelop to jump to the start and play again. This might cause a pop or a click. It is best to wait till the envelope has ended before retriggering it. |
| 60 | </para> |
| 61 | |
| 62 | </refsect1> |
| 63 | |
| 64 | <refsect1> |
| 65 | <title>Examples</title> |
| 66 | <para> |
| 67 | Here is an example of the trigexpseg opcode. It uses the file <ulink url="examples/trigexpseg.csd"><citetitle>trigexpseg.csd</citetitle></ulink>. |
| 68 | |
| 69 | <example> |
| 70 | <title>Example of the trigexpseg opcode.</title> |
| 71 | |
| 72 | |
| 73 | |
| 74 | <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> |
| 75 | <xi:include href="examples-xml/trigexpseg.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 76 | </example> |
| 77 | </para> |
| 78 | </refsect1> |
| 79 | |
| 80 | <refsect1> |
| 81 | <title>See also</title> |
| 82 | <para><link linkend="SiggenLineexp"><citetitle>Linear and Exponential Generators</citetitle></link></para> |
| 83 | </refsect1> |
| 84 | |
| 85 | <refsect1> |
| 86 | <title>Credits</title> |
| 87 | <para> |
| 88 | <simplelist> |
| 89 | <member>Author: Rory Walsh</member> |
| 90 | <member>2021</member> |
| 91 | </simplelist> |
| 92 | </para> |
| 93 | </refsect1> |
| 94 | </refentry> |