1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8">
5 <meta http-equiv=
"Content-Style-Type" content=
"text/css">
7 <meta name=
"Generator" content=
"Cocoa HTML Writer">
8 <meta name=
"CocoaVersion" content=
"824.48">
9 <style type=
"text/css">
10 p
.p1
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
}
11 p
.p2
{margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica
; min-height: 22.0px}
12 p
.p3
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
; color: #0021e7}
13 p
.p4
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
; min-height: 14.0px}
14 p
.p5
{margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica
}
15 p
.p6
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
}
16 p
.p7
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco
; min-height: 16.0px}
17 p
.p8
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; min-height: 12.0px}
18 p
.p9
{margin: 0.0px 0.0px 0.0px 85.0px; text-indent: -85.0px; font: 12.0px Helvetica
}
19 span
.s1
{font: 18.0px Helvetica
}
20 span
.s2
{color: #000000}
21 span
.s3
{color: #002eaf}
22 span
.s4
{color: #002fe0}
23 span
.s5
{color: #0021e7}
24 span
.s6
{color: #0039da}
25 span
.s7
{color: #003eea}
26 span
.s8
{color: #0024f8}
27 span
.s9
{color: #001bb9}
28 span
.s10
{color: #606060}
29 span
.Apple-tab-span
{white-space:pre
}
33 <p class=
"p1"><span class=
"s1"><b>Wavetable
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b></span><b>sampled audio buffer in wavetable format
</b></p>
34 <p class=
"p2"><br></p>
35 <p class=
"p3"><span class=
"s2"><b>Inherits from:
</b><a href=
"../Core/Object.html"><b>Object
</b></a><b> :
</b><a href=
"Collection.html"><b>Collection
</b></a></span><span class=
"s3"><b> :
</b></span><span class=
"s2"><b> </b><a href=
"SequenceableCollection.html"><b>SequenceableCollection
</b></a></span><span class=
"s4"><b> :
</b><a href=
"ArrayedCollection.html"><span class=
"s5"><b>ArrayedCollection
</b></span></a></span><span class=
"s6"> :
<a href=
"RawArray.html"><span class=
"s7"><b>RawArray
</b></span></a></span><span class=
"s2"> :
<a href=
"FloatArray.html"><span class=
"s8"><b>FloatArray
</b></span></a></span></p>
36 <p class=
"p4"><br></p>
37 <p class=
"p1">A Wavetable is a FloatArray in a special format used by SuperCollider's interpolating
</p>
38 <p class=
"p1">oscillators. Wavetables cannot be created by
<b>new
</b>.
</p>
39 <p class=
"p4"><br></p>
40 <p class=
"p1">see also:
<a href=
"Signal.html"><span class=
"s8">Signal
</span></a></p>
41 <p class=
"p4"><br></p>
42 <p class=
"p5"><b>Creation
</b></p>
43 <p class=
"p4"><br></p>
44 <p class=
"p1"><b>*sineFill(size, amplitudes, phases)
</b></p>
45 <p class=
"p4"><br></p>
46 <p class=
"p1">Fill a Wavetable of the given size with a sum of sines at the given amplitudes and phases.
</p>
47 <p class=
"p1">The Wavetable will be normalized.
</p>
48 <p class=
"p1"><b>size
</b> - must be a power of
2.
</p>
49 <p class=
"p1"><b>amplitudes
</b> - an Array of amplitudes for each harmonic beginning with the fundamental.
</p>
50 <p class=
"p1"><b>phases
</b> - an Array of phases in radians for each harmonic beginning with the fundamental.
</p>
51 <p class=
"p4"><br></p>
52 <p class=
"p6"><span class=
"s9">Wavetable
</span>.sineFill(
512,
1.0/[
1,
2,
3,
4,
5,
6]).plot;
</p>
53 <p class=
"p7"><br></p>
54 <p class=
"p4"><br></p>
55 <p class=
"p1"><b>*chebyFill(size, amplitudes, phases)
</b></p>
56 <p class=
"p4"><br></p>
57 <p class=
"p1">Fill a Wavetable of the given size with a sum of Chebyshev polynomials at the given amplitudes
</p>
58 <p class=
"p1">for use in waveshaping by the Shaper ugen.
</p>
59 <p class=
"p1">The Wavetable will be normalized.
</p>
60 <p class=
"p1"><b>size
</b> - must be a power of
2 plus
1, eventual wavetable is next power of two size up.
</p>
61 <p class=
"p1"><b>amplitudes
</b> - an Array of amplitudes for each Chebyshev polynomial beginning with order
1.
</p>
62 <p class=
"p4"><br></p>
63 <p class=
"p6"><span class=
"s9">Wavetable
</span>.chebyFill(
513, [
1]).plot;
</p>
64 <p class=
"p8"><br></p>
65 <p class=
"p6"><span class=
"s9">Wavetable
</span>.chebyFill(
513, [
0,
1]).plot;
</p>
66 <p class=
"p8"><br></p>
67 <p class=
"p6"><span class=
"s9">Wavetable
</span>.chebyFill(
513, [
0,
0,
1]).plot;
</p>
68 <p class=
"p8"><br></p>
69 <p class=
"p6"><span class=
"s9">Wavetable
</span>.chebyFill(
513, [
0.3, -
0.8,
1.1]).plot;
</p>
70 <p class=
"p7"><br></p>
71 <p class=
"p7"><br></p>
72 <p class=
"p7"><br></p>
73 <p class=
"p5"><b>Instance Methods
</b></p>
74 <p class=
"p4"><br></p>
75 <p class=
"p1"><b>plot(name, bounds, minval, maxval, parent)
</b></p>
76 <p class=
"p4"><br></p>
77 <p class=
"p1">Plot the Wavetable in a window. The arguments are not required and if not given defaults will be used.
</p>
78 <p class=
"p1"><b>name
</b> - a String, the name of the window.
</p>
79 <p class=
"p1"><b>bounds
</b> - a Rect giving the bounds of the window.
</p>
80 <p class=
"p9"><b>minval
</b> - the minimum value in the plot. Defaults to the highest value in the data.
</p>
81 <p class=
"p9"><b>maxval
</b> - the maximum value in the plot. Defaults to the lowest value in the data.
</p>
82 <p class=
"p9"><b>parent
</b> - a window to place the plot in. If nil, one will be created for you
</p>
83 <p class=
"p4"><br></p>
84 <p class=
"p6"><span class=
"s9">Wavetable
</span>.sineFill(
512, [
0.5]).plot;
</p>
85 <p class=
"p8"><br></p>
86 <p class=
"p6"><span class=
"s9">Wavetable
</span>.sineFill(
512, [
1]).plot(
<span class=
"s10">"Table 1"</span>,
<span class=
"s9">Rect
</span>(
50,
50,
150,
450));
</p>
87 <p class=
"p8"><br></p>
88 <p class=
"p7"><br></p>
89 <p class=
"p4"><br></p>
90 <p class=
"p1"><b>asSignal
</b></p>
91 <p class=
"p4"><br></p>
92 <p class=
"p1">Convert the Wavetable into a Signal.
</p>
93 <p class=
"p4"><br></p>
94 <p class=
"p6"><span class=
"s9">Wavetable
</span>.sineFill(
512, [
1]).asSignal.plot;
</p>
95 <p class=
"p7"><br></p>