File: gen08.html

package info (click to toggle)
csound-doc 3.47b2-2
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 1,492 kB
  • ctags: 272
  • sloc: makefile: 36
file content (76 lines) | stat: -rw-r--r-- 2,941 bytes parent folder | download | duplicates (6)
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
<HTML>
<TITLE>GEN08</TITLE>
<CENTER><P><A NAME="GEN08"></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="./gen06.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./gen09.html">Next</A> 
<HR></P></CENTER>

<H2>GEN08</H2>

<PRE><TT>     <B>f</B>   #    time    size    8    a    n1    b    n2    c    n3    d  .  .  .    </TT>
</PRE>

<P>
<HR></P>

<H4><U>DESCRIPTION</U></H4>

<P>This subroutine will generate a piecewise cubic spline curve, the smoothest
possible through all specified points. </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>... - ordinate values of the function. </P>

<P><I>n1, n2, n3</I> ... - length of each segment measured in stored values.
May not be zero, but may be fractional. A particular segment may or may
not actually store any values; stored values will be generated at integral
points from the beginning of the function. The sum n1 + n2 + ... will normally
equal <I>size</I> for fully specified functions.</P>

<P>Note:</P>

<P><B>GEN08</B> constructs a stored table from segments of cubic polynomial
functions. Each segment runs between two specified points but depends as
well on their neighbors on each side. Neighboring segments will agree in
both value and slope at their common point. (The common slope is that of
a parabola through that point and its two neighbors). The slope at the
two ends of the function is constrained to be zero (flat).</P>

<P><I>Hint:</I> to make a discontinuity in slope or value in the function
as stored, arrange a series of points in the interval between two stored
values; likewise for a non-zero boundary slope. </P>

<H4><B><U>EXAMPLES:</U></B></H4>

<PRE><TT>     f    1    0    65    8    0    16    0    16    1    16    0    16    0  </TT>
</PRE>

<P>This example creates a curve with a smooth hump in the middle, going
briefly negative outside the hump then flat at its ends.</P>

<PRE><TT>     f    2    0    65    8    0    16    0   .1    0    15.9    1    15.9    0    .1    0    16    0  </TT>
</PRE>

<P>This example is similar, but does not go negative. </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="./gen06.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./gen09.html">Next</A> 
<HR></P></CENTER>


<P><CENTER>
<B><I><FONT COLOR="#006600">HTML Csound Manual - <FONT SIZE=-1>&copy;
Jean Pich&eacute; &amp; Peter J. Nix, 1994-97</FONT></FONT></I></B>&nbsp;
</CENTER>
</HTML>