1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
<HTML>
<TITLE>IGOTO</TITLE>
<CENTER><A NAME="igoto"></A>
<HR><B><A HREF="../REFER.html">QUICK-REF</A></B> - <B><A HREF="../TITLE.html"><FONT SIZE=+1>C</FONT>soundManual</A></B>
- <B><A HREF="SYNTAX.html">Top of this section</A></B> - <A HREF="./progctr.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./reinit.html">Next</A>
<HR></CENTER>
<H2>
igoto, tigoto, kgoto, goto, if, timout</H2>
<PRE> <B>igoto</B> label
<B>tigoto</B> label
<B>kgoto</B> label
<B>goto</B> label
<B>if</B> ia R ib <B>igoto</B> label
<B>if</B> ka R kb <B>kgoto</B> label
<B>if</B> ia R ib <B>goto</B> label
<B>timout</B> istrt, idur, label</PRE>
<HR>
<H4>
<U>DESCRIPTION</U></H4>
where <I>label</I> is in the same instrument block and is not an expression,
and where <I>R</I> is one of the Relational operators (>, <, >=, <=,
==, !=) (and = for convenience, <A HREF="./cond.html">see also
under Conditional values</A>).
<P>These statements are used to control the order in which statements in
an instrument block are to be executed. <B>I</B>-time and <B>P</B>-time
passes can be controlled separately as follows:
<P><B>igoto</B> - During the I-time pass only, unconditionally transfer
control to the statement labeled by <I>label</I>.
<P><B>tigoto</B> - similar to igoto, but effective only during an I-time
pass at which a new note is being 'tied' onto a previously held note (
<A HREF="../NumScore/i-stat.html">see I Statement</A>); no-op when
a tie has not taken place. Allows an instrument to skip initialization
of units according to whether a proposed tie was in fact successful (see
also <B><A HREF="./assign.html">tival</A></B>, <B><A HREF="../Modifier/delayr.html">delay</A></B>).
<P><B>kgoto</B> - During the P-time passes only, unconditionally transfer
control to the statement labeled by <I>label</I>.
<P><B>goto</B> - (combination of <B>igoto</B> and <B>kgoto</B>) Transfer
control to <I>label</I> on every pass.
<P><B>if...igoto</B> - conditional branch at I-time, depending on the truth
value of the logical expression ia R ib. The branch is taken only if the
result is true.
<P><B>if...kgoto</B> - conditional branch during P-time, depending on the
truth value of the logical expression ka R kb. The branch is taken only
if the result is true.
<P><B>if...goto</B> - combination of the above. Condition tested on every
pass.
<P><B>timout</B> - conditional branch during P-time, depending on elapsed
note time. <I>istrt</I> and <I>idur</I> specify time in seconds. The branch
to <I>label</I> will become effective at time <I>istrt</I>, and will remain
so for just <I>idur</I> seconds. Note that <B>timout</B> can be reinitialized
for multiple activation within a single note ( <A HREF="./reinit.html">see example
under reinit)</A>.
<H4>
<U>EXAMPLE:</U></H4>
<PRE> if k3 > p5 + 10 kgoto next</PRE>
<CENTER><P>
<HR><B><A HREF="../REFER.html">QUICK-REF</A></B> - <B><A HREF="../TITLE.html"><FONT SIZE=+1>C</FONT>soundManual</A></B>
- <B><A HREF="SYNTAX.html">Top of this section</A></B> - <A HREF="./progctr.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./reinit.html">Next</A>
<HR></CENTER>
<P><CENTER>
<B><I><FONT COLOR="#006600">HTML Csound Manual - <FONT SIZE=-1>©
Jean Piché & Peter J. Nix, 1994-97</FONT></FONT></I></B>
</CENTER>
</HTML>
|