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=
"949.43">
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: 12.0px Helvetica
; min-height: 14.0px}
12 p
.p3
{margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica
}
13 p
.p4
{margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica
; min-height: 17.0px}
14 p
.p5
{margin: 0.0px 0.0px 0.0px 56.0px; text-indent: -56.0px; font: 12.0px Helvetica
}
15 p
.p6
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco
; min-height: 16.0px}
16 p
.p7
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica
}
17 p
.p8
{margin: 0.0px 0.0px 0.0px 28.0px; text-indent: -28.0px; font: 12.0px Helvetica
}
18 p
.p9
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
}
19 span
.s1
{font: 18.0px Helvetica
}
20 span
.s2
{color: #0000ff}
21 span
.s3
{font: 12.0px Helvetica
}
22 span
.s4
{color: #001bb9}
23 span
.Apple-tab-span
{white-space:pre
}
27 <p class=
"p1"><span class=
"s1"><b>InterplEnv
<span class=
"Apple-tab-span"> </span><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>envelope specification
</b></p>
28 <p class=
"p2"><br></p>
29 <p class=
"p1"><b>superclass:
</b><a href=
"../Core/Object.html"><span class=
"s2"><b>Object
</b></span></a></p>
30 <p class=
"p2"><br></p>
31 <p class=
"p1">An InterplEnv is a specification for a segmented envelope. InterplEnvs can be used both server-side, by an
<b>IEnvGen
</b>within a SynthDef, and clientside, with methods such as
<b>at
</b>. An InterplEnv can have any number of segments. An InterplEnv can have several shapes for its segments.
</p>
32 <p class=
"p2"><br></p>
33 <p class=
"p3"><b>Differences between InterplEnv and
</b><a href=
"Env.html"><span class=
"s2">Env
</span></a></p>
34 <p class=
"p2"><br></p>
35 <p class=
"p1">InterplEnvs do not have release or loop nodes.
<span class=
"Apple-converted-space"> </span>They are of a fixed duration. Mostly, it is meant to be used with IEnvGen, where 'times' are actually an
<b>index into the envelope
</b> shape.
</p>
36 <p class=
"p4"><br></p>
37 <p class=
"p3"><b>Basic Creation
</b></p>
38 <p class=
"p2"><br></p>
39 <p class=
"p1">*
<b>new(levels, times, curves, offset =
0.0)
</b></p>
40 <p class=
"p2"><br></p>
41 <p class=
"p1"><span class=
"Apple-tab-span"> </span>Create a new envelope specification.
</p>
42 <p class=
"p1"><span class=
"Apple-tab-span"> </span><b>levels
</b> - an array of levels. The first level is the initial value of the envelope.
</p>
43 <p class=
"p5"><span class=
"Apple-tab-span"> </span><b>times
</b> - an array of durations of segments in seconds. There should be one fewer duration than there are levels.
</p>
44 <p class=
"p1"><span class=
"Apple-tab-span"> </span><b>curve
</b> - this parameter determines the shape of the envelope segments.
</p>
45 <p class=
"p1"><span class=
"Apple-tab-span"> </span>The possible values are:
</p>
46 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>'step' - flat segments
</p>
47 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>'linear' - linear segments, the default
</p>
48 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>'exponential' - natural exponential growth and decay. In this case, the levels must all be nonzero
</p>
49 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>and the have the same sign.
</p>
50 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>'sine' - sinusoidal S shaped segments.
</p>
51 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>'welch' - sinusoidal segments shaped like the sides of a Welch window.
</p>
52 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>a Float - a curvature value for all segments.
</p>
53 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>An Array of Floats - curvature values for each segments.
</p>
54 <p class=
"p1"><b><span class=
"Apple-tab-span"> </span>offset
</b> - used to offset an envelope into negative starttimes.
<span class=
"Apple-converted-space"> </span></p>
55 <p class=
"p2"><br></p>
56 <p class=
"p3"><b>Instance Methods
</b></p>
57 <p class=
"p6"><span class=
"s3"><span class=
"Apple-tab-span"> </span></span><span class=
"Apple-tab-span"> </span></p>
58 <p class=
"p1"><b>plot(size)
</b></p>
59 <p class=
"p2"><br></p>
60 <p class=
"p1"><span class=
"Apple-tab-span"> </span>Plot this envelope's shape in a window.
</p>
61 <p class=
"p7"><span class=
"Apple-tab-span"> </span><b>size
</b> - The size of the plot. The default is
400.
</p>
62 <p class=
"p6"><span class=
"Apple-tab-span"> </span></p>
63 <p class=
"p2"><span class=
"Apple-tab-span"> </span></p>
64 <p class=
"p1"><b>asArray
</b></p>
65 <p class=
"p2"><br></p>
66 <p class=
"p8"><span class=
"Apple-tab-span"> </span>Converts the Env to an Array in a specially ordered format. This allows for Env parameters to be settable arguments in a
<a href=
"../ServerArchitecture/SynthDef.html"><span class=
"s2">SynthDef
</span></a>. See example above under *
<b>newClear
</b>.
</p>
67 <p class=
"p2"><span class=
"Apple-tab-span"> </span></p>
68 <p class=
"p3"><b>Client-side Access and Stream Support
</b></p>
69 <p class=
"p6"><br></p>
70 <p class=
"p1"><b>at(time)
</b></p>
71 <p class=
"p2"><br></p>
72 <p class=
"p1"><span class=
"Apple-tab-span"> </span>Returns the value of the InterplEnv at
<b>time
</b>.
</p>
73 <p class=
"p2"><span class=
"Apple-tab-span"> </span></p>
74 <p class=
"p9"><span class=
"s3"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span><span class=
"s4">InterplEnv
</span>([
0,
1,
0.707], [
0.2,
1.3], [\lin, \sin]).at(
0.5);
</p>
75 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>