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
|
<HTML>
<TITLE>GEN03</TITLE>
<CENTER><P><A NAME="GEN03"></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="./gen02.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./gen04.html">Next</A>
<HR></P></CENTER>
<H2>GEN03</H2>
<PRE><TT> <B>f</B> # time size 3 xval1 xval2 c0 c1 c2 . . . cn </TT>
</PRE>
<P>
<HR></P>
<H4><U>DESCRIPTION</U></H4>
<P>This subroutine generates a stored function table by evaluating a polynomial
in x over a fixed inter- val and with specified coefficients. </P>
<H4><U>INITIALIZATION</U></H4>
<P><I>size </I>- number of points in the table. Must be a power of 2 or
a power-of-2 plus 1 ( <A HREF="./../NumScore/f-stat.html">see f statement</A>).
</P>
<P><I>xval1, xval2 </I>- left and right values of the x interval over which
the polynomial is defined (<I>xval1</I> < <I>xval2</I>). These will
produce the 1st stored value and the (power-of-2 plus l)th stored value
respectively in the generated function table. </P>
<P><I>c0, c1, c2, ... cn</I> - coefficients of the nth-order polynomial
</P>
<P><I>c0 + c1x + c2x2 + . . . + cnxn</I> </P>
<P>Coefficients may be positive or negative real numbers; a zero denotes
a missing term in the polynomial. The coefficient list begins in p7, providing
a current upper limit of 144 terms.</P>
<P>Note: </P>
<P>The defined segment [fn(<I>xval1</I>),fn(<I>xval2</I>)] is evenly distributed.
Thus a 512-point table over the interval [-1,1] will have its origin at
location 257 (at the start of the 2nd half). Provided the extended guard
point is requested, both fn(-1) and fn(1) will exist in the table.</P>
<P><B>GEN03</B> is useful in conjunction with <B><A HREF="./../Generate/table.html">table
or tablei</A></B> for audio waveshaping (sound modification by non-linear
distortion). Coefficients to produce a particular formant from a sinusoidal
lookup index of known amplitude can be determined at preprocessing time
using algorithms such as Chebyshev formulae. <A HREF="./gen13.html">See also
GEN13</A>.</P>
<H4><B><U>EXAMPLE:</U></B></H4>
<P>f 1 0 1025 3 -1 1 5 4 3 2 2 1 </P>
<P>This calls <B>GEN03</B> to fill a table with a 4th order polynomial
function over the x-interval -1 to 1. The origin will be at the offset
position 512. The function is post-normalized.</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="./gen02.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./gen04.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>
|