File: table.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 (96 lines) | stat: -rw-r--r-- 5,212 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
91
92
93
94
95
96
<HTML>
<TITLE>TABLE</TITLE>
<CENTER><A NAME="table"></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="./SIG_GENS.html#">Top of this section</A></B> - <A HREF="./phasor.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./oscil.html">Next</A>&nbsp;
<HR></CENTER>

<H2>
table, tablei, oscil1, oscil1i</H2>

<PRE>&nbsp;&nbsp;&nbsp;&nbsp; ir&nbsp;&nbsp; <B>table</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; indx, ifn[, ixmode][, ixoff][, iwrap]
&nbsp;&nbsp;&nbsp;&nbsp; ir&nbsp;&nbsp; <B>tablei</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; indx, ifn[, ixmode][, ixoff][, iwrap]
&nbsp;&nbsp;&nbsp;&nbsp; kr&nbsp;&nbsp; <B>table</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kndx, ifn[, ixmode][, ixoff][, iwrap]
&nbsp;&nbsp;&nbsp;&nbsp; kr&nbsp;&nbsp; <B>tablei</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kndx, ifn[, ixmode][, ixoff][, iwrap]
&nbsp;&nbsp;&nbsp;&nbsp; ar&nbsp;&nbsp; <B>table</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; andx, ifn[, ixmode][, ixoff][, iwrap]
&nbsp;&nbsp;&nbsp;&nbsp; ar&nbsp;&nbsp; <B>tablei</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; andx, ifn[, ixmode][, ixoff][, iwrap]
&nbsp;&nbsp;&nbsp;&nbsp; kr&nbsp;&nbsp; <B>oscil1</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; idel, kamp, idur, ifn
&nbsp;&nbsp;&nbsp;&nbsp; kr&nbsp;&nbsp; <B>oscil1i</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; idel, kamp, idur, ifn&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; ar&nbsp;&nbsp; <B>osciln</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kamp, ifrq, ifn, itimes</PRE>

<HR>
<H4>
<U>DESCRIPTION</U></H4>
Table values are accessed by direct indexing or by incremental sampling.
<H4>
<U>INITIALIZATION</U></H4>
<I>ifn</I> - function table number. <B>tablei, oscil1i</B> require the
extended guard point.

<P><I>ixmode</I> (optional) - ndx data mode. 0 = raw ndx, 1 = normalized
(0 to 1). The default value is 0.

<P><I>ixoff</I> (optional) - amount by which ndx is to be offset. For a
table with origin at center, use tablesize/2 (raw) or .5 (normalized).
The default value is 0.

<P><I>iwrap</I> (optional) - wraparound ndx flag. 0 = nowrap (ndx &lt;
0 treated as ndx=0; ndx > tablesize sticks at ndx=size), 1 = wraparound.
The default value is 0.

<P><I>idel</I> - delay in seconds before <B>oscil1</B> incremental sampling
begins.

<P><I>idur</I> - duration in seconds to sample through the <B>oscil1</B>
table just once. A zero or negative value will cause all initialization
to be skipped.

<P><I>ifrq, itimes </I>- rate and number of times through the stored table.
<H4>
<U>PERFORMANCE</U></H4>
<B>table</B> invokes table lookup on behalf of init, control or audio indices.
These indices can be raw entry numbers (0,l,2...size - 1) or scaled values
(0 to 1-e). Indices are first modified by the offset value then checked
for range before table lookup (see <I>iwrap</I>). If ndx is likely to be
full scale, or if interpolation is being used, the table should have an
extended guard point. <B>table</B> indexed by a periodic phasor ( <A HREF="./phasor.html">see
phasor</A>) will simulate an oscillator.

<P><B>oscil1</B> accesses values by sampling once through the function
table at a rate determined by <I>idur</I>. For the first <I>idel</I> seconds,
the point of scan will reside at the first location of the table; it will
then begin moving through the table at a constant rate, reaching the end
in another <I>idur</I> seconds; from that time on (i.e. after <I>idel</I>
+ <I>idur</I> seconds) it will remain pointing at the last location. Each
value obtained from sampling is then multiplied by an amplitude factor
<I>kamp</I> before being written into the result.

<P><B>osciln</B> will sample several times through the stored table at
a rate of <I>ifrq</I> times per second, after which it will output zeros.
Generates audio signals only, with output values scaled by <I>kamp.</I>

<P><B>tablei</B> and <B>oscil1i</B> are interpolating units in which the
fractional part of ndx is used to interpolate between adjacent table entries.
The smoothness gained by interpolation is at some small cost in execution
time (see also <B><A HREF="./oscil.html">oscili, etc</A></B>.), but the interpolating
and non-interpolating units are otherwise interchangeable. Note that when
<B>tablei</B> uses a periodic index whose modulo <I>n</I>is less than the
power of 2 table length, the interpolation process requires that there
be an (<I>n</I>+ 1)th table value that is a repeat of the 1st ( <A HREF="../NumScore/f-stat.html">see
F statement in Score</A>).
<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="./SIG_GENS.html#">Top of this section</A></B> - <A HREF="./phasor.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./oscil.html">Next</A>&nbsp;
<HR></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>