File: gen04.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-- 3,014 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>GEN04</TITLE>
<CENTER><P><A NAME="GEN04"></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="./gen03.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./gen05.html">Next</A> 
<HR></P></CENTER>

<H2>GEN04</H2>

<PRE><TT>     <B>f</B>  #  time  size  4  source#  sourcemode   </TT>
</PRE>

<P>
<HR></P>

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

<P>This subroutine generates a normalizing function by examining the contents
of an existing table. </P>

<H4><U>INITIALIZATION</U></H4>

<P><I>size </I>- number of points in the table. Should be power-of-2 plus
1. Must not exceed (except by 1) the size of the source table being examined;
limited to just half that size if the sourcemode is of type offset (see
below). </P>

<P><I>source #</I> - table number of stored function to be examined. </P>

<P><I>sourcemode</I> - a coded value, specifying how the source table is
to be scanned to obtain the normalizing function. Zero indicates that the
source is to be scanned from left to right. Non-zero indicates that the
source has a bipolar structure; scanning will begin at the mid-point and
progress outwards, looking at pairs of points equidistant from the center.</P>

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

<P>The normalizing function derives from the progressive absolute maxima
of the source table being scanned. The new table is created left-to-right,
with stored values equal to 1/(absolute maximum so far scanned). Stored
values will thus begin with 1/(first value scanned), then get progressively
smaller as new maxima are encountered. For a source table which is normalized
(values &lt;= 1), the derived values will range from 1/(first value scanned)
down to 1. If the first value scanned is zero, that inverse will be set
to 1. </P>

<P>The normalizing function from GEN04 is not itself normalized. </P>

<P><B>GEN04</B> is useful for scaling a table-derived signal so that it
has a consistent peak amplitude. A particular application occurs in waveshaping
when the carrier (or indexing) signal is less than full amplitude. </P>

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

<PRE><TT>     f   2   0   512   4    1   1   </TT>
</PRE>

<P>This creates a normalizing function for use in connection with the <B><A HREF="./gen03.html">GEN03</A></B>
table 1 example. Midpoint bipolar offset is specified. </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="./gen03.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./gen05.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>