File: gen09.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 (88 lines) | stat: -rw-r--r-- 3,600 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
<HTML>
<TITLE>GEN09</TITLE>
<CENTER><P><A NAME="GEN09"></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="./gen08.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./gen11.html">Next</A> 
<HR></P></CENTER>

<H2>GEN09, GEN10, GEN19</H2>

<PRE><TT>     <B>f</B>   #    time    size   9      pna     stra    phsa    pnb    strb    phsb  .  .  .  
     <B>f</B>   #    time    size  10      str1    str2    str3    str4  .  .  .  .  
     <B>f</B>   #    time    size  19      pna     stra    phsa    dcoa   pnb     strb    phsb   dcob  .  .  .  </TT>
</PRE>

<P>
<HR></P>

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

<P>These subroutines generate composite waveforms made up of weighted sums
of simple sinusoids. The specification of each contributing partial requires
3 pfields using <B>GEN09</B>, 1 using <B>GEN10</B>, and 4 using <B>GEN19</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>pna, pnb</I>, etc. - partial no. (relative to a fundamental that
would occupy <I>size</I> locations per cycle) of sinusoid a, sinusoid b,
etc. Must be positive, but need not be a whole number, i.e., non-harmonic
partials are permitted. Partials may be in any order. </P>

<P><I>stra, strb</I>, etc. - strength of partials <I>pna, pnb</I>, etc.
These are relative strengths, since the composite waveform may be rescaled
later. Negative values are permitted and imply a 180 degree phase shift.
</P>

<P><I>phsa, phsb</I>, etc. - initial phase of partials <I>pna, pnb,</I>
etc., expressed in degrees. </P>

<P><I>dcoa, dcob</I>, etc. - DC offset of partials <I>pna, pnb</I>, etc.
This is applied <I>after</I> strength scaling, i.e. a value of 2 will lift
a 2-strength sinusoid from range [-2,2] to range [0,4] (before later rescaling).
</P>

<P><I>str1, str2, str3,</I> etc. - relative strengths of the fixed harmonic
partial numbers 1,2,3, etc., beginning in p5. Partials not required should
be given a strength of zero. </P>

<P><B>Note:</B> </P>

<P>These subroutines generate stored functions as sums of sinusoids of
different frequencies. The two major restrictions on <B>GEN10</B>&Ntilde;that
the partials be harmonic and in phase&Ntilde;do not apply to <B>GEN09</B>
or <B>GEN19</B>. </P>

<P>In each case the composite wave, once drawn, is then rescaled to unity
if p4 was positive. A negative p4 will cause rescaling to be skipped. </P>

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

<PRE><TT>     f    1    0    1024      9    1    3      0    3    1    0    9   .3333    180 
     f    2    0    1024     19    .5   1    270    1 </TT>
</PRE>

<P>f 1 combines partials l, 3 and 9 in the relative strengths in which
they are found in a square wave, except that partial 9 is upside down.
f 2 creates a rising sigmoid [0 - 2]. Both will be rescaled.</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="./gen08.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./gen11.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>