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: 12.0px Helvetica
; color: #0021e7}
13 p
.p4
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco
; color: #0034a8; min-height: 16.0px}
14 p
.p5
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #000000}
15 p
.p6
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; min-height: 12.0px}
16 p
.p7
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
}
17 p
.p8
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #9d1c12}
18 span
.s1
{font: 18.0px Helvetica
}
19 span
.s2
{text-decoration: underline
}
20 span
.s3
{color: #606060}
21 span
.s4
{color: #3d6d1d}
22 span
.s5
{color: #000000}
23 span
.s6
{text-decoration: underline
; color: #002fe0}
24 span
.s7
{color: #0026b4}
25 span
.s8
{color: #001bb9}
26 span
.Apple-tab-span
{white-space:pre
}
30 <p class=
"p1"><span class=
"s1"><b>ampdb
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b></span><b>convert linear amplitude to decibels
</b></p>
31 <p class=
"p2"><br></p>
32 <p class=
"p1"><b>a.ampdb
</b></p>
33 <p class=
"p1"><b>ampdb(a)
</b></p>
34 <p class=
"p2"><br></p>
35 <p class=
"p2"><br></p>
36 <p class=
"p3"><span class=
"s2"><a href=
"../Math/SimpleNumber.html">SimpleNumber
</a></span></p>
37 <p class=
"p4"><br></p>
38 <p class=
"p5">0.1.ampdb;
</p>
39 <p class=
"p5">(ampdb(
0.1).asString ++
<span class=
"s3">" decibels"</span>);
</p>
40 <p class=
"p6"><br></p>
41 <p class=
"p6"><br></p>
42 <p class=
"p3"><span class=
"s2"><a href=
"../Collections/SequenceableCollection.html">SequenceableCollection
</a></span></p>
43 <p class=
"p6"><br></p>
44 <p class=
"p7">[
0.001,
0.01,
0.1,
1,
10].ampdb;
</p>
45 <p class=
"p6"><br></p>
46 <p class=
"p3"><span class=
"s2"><a href=
"../Core/Symbol.html">Symbol
</a></span></p>
47 <p class=
"p6"><br></p>
48 <p class=
"p8"><span class=
"s4">\foo
</span><span class=
"s5">.ampdb;
</span>// returns itself. this is used in Envelopes see
<a href=
"../Control/Env.html"><span class=
"s6">Env
</span></a>.
</p>
49 <p class=
"p6"><br></p>
50 <p class=
"p4"><br></p>
51 <p class=
"p3"><span class=
"s2"><a href=
"../Core/Kernel/Function.html">Function
</a></span></p>
52 <p class=
"p4"><br></p>
53 <p class=
"p7">f = ampdb({
<span class=
"s7">|x|
</span> sin(x) +
1 });
</p>
54 <p class=
"p7">f.value((
0.
.1000).normalize(
0,
8pi)).plot;
</p>
55 <p class=
"p6"><br></p>
56 <p class=
"p3"><span class=
"s2"><a href=
"../UGens/UGen.html">UGen
</a></span></p>
57 <p class=
"p6"><br></p>
60 <p class=
"p7"><span class=
"Apple-tab-span"> </span><span class=
"s8">var
</span> a =
<span class=
"s8">LFSaw
</span>.ar(
100).range(
0.0001,
10);
</p>
61 <p class=
"p7"><span class=
"Apple-tab-span"> </span>[a, a.ampdb]
</p>
62 <p class=
"p7">}.plot(minval: -
60, maxval:
10)
</p>