<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>trigseq</title> <link rel="stylesheet" href="csound.css" type="text/css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /> <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" /> <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" /> <link rel="prev" href="trigger.html" title="trigger" /> <link rel="next" href="trirand.html" title="trirand" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">trigseq</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="trigger.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="trirand.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry" title="trigseq"> <a id="trigseq"></a> <div class="titlepage"></div> <a id="IndexTrigseq" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">trigseq</span> </h2> <p>trigseq — Accepts a trigger signal as input and outputs a group of values. </p> </div> <div class="refsect1" title="Description"> <a id="id3301690"></a> <h2>Description</h2> <p> Accepts a trigger signal as input and outputs a group of values. </p> </div> <div class="refsect1" title="Syntax"> <a id="id3301702"></a> <h2>Syntax</h2> <pre class="synopsis"><span class="command"><strong>trigseq</strong></span> ktrig_in, kstart, kloop, kinitndx, kfn_values, kout1 [, kout2] [...]</pre> </div> <div class="refsect1" title="Performance"> <a id="id3301909"></a> <h2>Performance</h2> <p> <span class="emphasis"><em>ktrig_in</em></span> -- input trigger signal </p> <p> <span class="emphasis"><em>kstart</em></span> -- start index of looped section </p> <p> <span class="emphasis"><em>kloop</em></span> -- end index of looped section </p> <p> <span class="emphasis"><em>kinitndx</em></span> -- initial index </p> <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> <table border="0" summary="Note: Note"> <tr> <td rowspan="2" align="center" valign="top" width="25"> <img alt="[Note]" src="images/note.png" /> </td> <th align="left">Note</th> </tr> <tr> <td align="left" valign="top"> <p> Although <span class="emphasis"><em>kinitndx</em></span> is listed as k-rate, it is in fact accessed only at init-time. So if you are using a k-rate argument, it must be assigned with <a class="link" href="init.html" title="init"><em class="citetitle">init</em></a>. </p> </td> </tr> </table> </div> <p> <span class="emphasis"><em>kfn_values</em></span> -- number of a table containing a sequence of groups of values </p> <p> <span class="emphasis"><em>kout1</em></span> -- output values </p> <p> <span class="emphasis"><em>kout2, ...</em></span> (optional) -- more output values </p> <p> This opcode handles timed-sequences of groups of values stored into a table. </p> <p> <span class="emphasis"><em>trigseq</em></span> accepts a trigger signal (<span class="emphasis"><em>ktrig_in</em></span>) as input and outputs group of values (contained in the <span class="emphasis"><em>kfn_values</em></span> table) each time <span class="emphasis"><em>ktrig_in</em></span> assumes a non-zero value. Each time a group of values is triggered, table pointer is advanced of a number of positions corresponding to the number of group-elements, in order to point to the next group of values. The number of elements of groups is determined by the number of <span class="emphasis"><em>koutX</em></span> arguments. </p> <p> It is possible to start the sequence from a value different than the first, by assigning to <span class="emphasis"><em>kinitndx</em></span> an index different than zero (which corresponds to the first value of the table). Normally the sequence is looped, and the start and end of loop can be adjusted by modifying <span class="emphasis"><em>kstart</em></span> and <span class="emphasis"><em>kloop</em></span> arguments. User must be sure that values of these arguments (as well as <span class="emphasis"><em>kinitndx</em></span>) correspond to valid table numbers, otherwise Csound will crash because no range-checking is implemented. </p> <p> It is possible to disable loop (one-shot mode) by assigning the same value both to <span class="emphasis"><em>kstart</em></span> and <span class="emphasis"><em>kloop</em></span> arguments. In this case, the last read element will be the one corresponding to the value of such arguments. Table can be read backward by assigning a negative <span class="emphasis"><em>kloop</em></span> value. </p> <p> <span class="emphasis"><em>trigseq</em></span> is designed to be used together with <a class="link" href="seqtime.html" title="seqtime"><em class="citetitle">seqtime</em></a> or <a class="link" href="trigger.html" title="trigger"><em class="citetitle">trigger</em></a> opcodes. </p> </div> <div class="refsect1" title="See Also"> <a id="id3302699"></a> <h2>See Also</h2> <p> <a class="link" href="seqtime.html" title="seqtime"><em class="citetitle">seqtime</em></a>, <a class="link" href="trigger.html" title="trigger"><em class="citetitle">trigger</em></a> </p> </div> <div class="refsect1" title="Credits"> <a id="id3302725"></a> <h2>Credits</h2> <p>Author: Gabriel Maldonado</p> <p>November 2002. Added a note about the <span class="emphasis"><em>kinitndx</em></span> parameter, thanks to Rasmus Ekman.</p> <p>January 2003. Thanks to a note from Øyvind Brandtsegg, I corrected the credits.</p> <p>New in version 4.06</p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="trigger.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="OpcodesTop.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="trirand.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">trigger </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> trirand</td> </tr> </table> </div> </body> </html>