File: gen13.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 (90 lines) | stat: -rw-r--r-- 3,958 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<HTML>
<TITLE>GEN13</TITLE>
<CENTER><P><A NAME="GEN13"></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="./gen12.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./gen15.html">Next</A> 
<HR></P></CENTER>

<H2>GEN13, GEN14</H2>

<PRE><TT>     <B>f</B>    #    time    size    13    xint    xamp    h0    h1   h2  .  .  .  hn 
     <B>f</B>    #    time    size    14    xint    xamp    h0    h1   h2  .  .  .  hn </TT>
</PRE>

<P>
<HR></P>

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

<P>These subroutines use Chebyshev coefficients to generate stored polynomial
functions which, under waveshaping, can be used to split a sinusoid into
harmonic partials having a predefinable spectrum. 
<HR></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>).
The normal value is power-of-2 plus 1. </P>

<P><I>xint</I> - provides the left and right values [<I>-xint, +xint</I>]
of the x interval over which the polynomial is to be drawn. These subroutines
both call <B><A HREF="./gen03.html">GEN03</A></B> to draw their functions; the
p5 value here is therefor expanded to a negative-positive p5,p6 pair before
<B><A HREF="./gen03.html">GEN03</A></B> is actually called. The normal value
is 1.</P>

<P><I>xamp </I>- amplitude scaling factor of the sinusoid input that is
expected to produce the following spectrum.</P>

<P><I>h0, h1, h2, .... hn</I> - relative strength of partials 0 (DC), 1
(fundamental), 2 ... that will result when a sinusoid of amplitude <I>xamp
* int(size/2)/xint</I> is waveshaped using this function table. These values
thus describe a frequency spectrum associated with a particular factor
<I>xamp</I> of the input signal.</P>

<P>Note: </P>

<P><B>GEN13</B> is the function generator normally employed in standard
waveshaping. It stores a polynomial whose coefficients derive from the
Chebyshev polynomials of the first kind, so that a driving sinusoid of
strength <I>xamp</I> will exhibit the specified spectrum at output. Note
that the evolution of this spectrum is generally not linear with varying
<I>xamp</I>. However, it is bandlimited (the only partials to appear will
be those specified at generation time); and the partials will tend to occur
and to develop in ascending order (the lower partials dominating at low
<I>xamp</I>, and the spectral richness increasing for higher values of
<I>xamp</I>). A negative <I>hn</I> value implies a 180 degree phase shift
of that partial; the requested full-amplitude spectrum will not be affected
by this shift, although the evolution of several of its component partials
may be. The pattern +,+,-,-,+,+,... for <I>h0,h1,h2..</I>. will minimize
the normalization problem for low <I>xamp</I> values (see above), but does
not necessarily provide the smoothest pattern of evolution. </P>

<P><B>GEN14</B> stores a polynomial whose coefficients derive from Chebyshevs
of the second kind. </P>

<H4><U>EXAMPLE:</U></H4>

<PRE><TT>     f    1    0   1025    13    1   1    0    5    0    3    0   1 </TT>
</PRE>

<P>This creates a function which, under waveshaping, will split a sinusoid
into 3 odd-harmonic partials of relative strength 5:3:1. </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="./gen12.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./gen15.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>