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
|
<HTML>
<TITLE>GEN05</TITLE>
<CENTER><P><A NAME="GEN05"></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="./GENS.html">Top of this section</A></B> - <A HREF="./gen04.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./gen06.html">Next</A>
<HR></P></CENTER>
<H2>GEN05, GEN07</H2>
<PRE><TT> <B>f</B> # time size 5 a n1 b n2 c . . .
<B>f</B> # time size 7 a n1 b n2 c . . . </TT>
</PRE>
<P>
<HR></P>
<H4><U>DESCRIPTION</U></H4>
<P>These subroutines are used to construct functions from segments of exponential
curves (<B>GEN05)</B> or straight lines (<B>GEN07</B>). </P>
<H4><U>INITIALIZATION</U></H4>
<P><I>size </I>- number of points in the table. Must be a power of 2 or
power-of-2 plus 1 ( <A HREF="./../NumScore/f-stat.html">see f statement</A>).
</P>
<P><I>a, b, c,</I> etc. - ordinate values, in odd-numbered pfields p5,
p7, p9, . . . For <B>GEN05</B> these must be nonzero and must be alike
in sign. No such restrictions exist for <B>GEN07</B>. </P>
<P><I>n1, n2</I>, etc. - length of segment (no. of storage locations),
in even-numbered pfields. Cannot be negative, but a zero is meaningful
for specifying discontinuous waveforms (e.g. in the example below). The
sum n1 + n2 + .... will normally equal <I>size</I> for fully specified
functions. If the sum is smaller, the function locations not included will
be set to zero; if the sum is greater, only the first <I>size</I> locations
will be stored. </P>
<P><B>Note:</B> </P>
<P>If p4 is positive, functions are post-normalized (rescaled to a maximum
absolute value of 1 after generation). A negative p4 will cause rescaling
to be skipped. </P>
<P>Discrete-point linear interpolation implies an increase or decrease
along a segment by equal differences between adjacent locations; exponential
interpolation implies that the progression is by equal ratio. In both forms
the interpolation from <I>a</I> to <I>b</I> is such as to assume that the
value <I>b</I> will be attained in the n + 1th location. For discontinuous
functions, and for the segment encompassing the end location, this value
will not actually be reached, although it may eventually appear as a result
of final scaling. </P>
<H4><B><U>EXAMPLE:</U></B></H4>
<P><TT>f 1 0 256 7 0 128 1 0 -1 128 0 </TT></P>
<P>This describes a single-cycle sawtooth whose discontinuity is mid-way
in the stored function. </P>
<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="./GENS.html">Top of this section</A></B> - <A HREF="./gen04.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./gen06.html">Next</A>
<HR></P></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>
|