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.44">
9 <style type=
"text/css">
10 p
.p1
{margin: 0.0px 0.0px 0.0px 0.0px; font: 18.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
}
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: 9.0px Monaco
; color: #902a19}
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: 9.0px Monaco
; min-height: 12.0px}
17 span
.s1
{color: #0018f7}
18 span
.s2
{color: #091fb1}
19 span
.Apple-tab-span
{white-space:pre
}
23 <p class=
"p1"><b>BufAllpassL
<span class=
"Apple-tab-span"> </span>buffer based all pass delay line with linear interpolation
</b></p>
24 <p class=
"p2"><br></p>
25 <p class=
"p3"><b>BufAllpassL.ar(buf, in, delaytime, decaytime, mul, add)
</b></p>
26 <p class=
"p3"><b>BufAllpassL.kr(buf, in, delaytime, decaytime, mul, add)
</b></p>
27 <p class=
"p4"><br></p>
28 <p class=
"p4"><br></p>
29 <p class=
"p3">All pass delay line with linear interpolation which uses a buffer for its internal memory. See also
<a href=
"BufAllpassN.html"><span class=
"s1">BufAllpassN
</span></a> which uses no interpolation, and
<a href=
"BufAllpassC.html"><span class=
"s1">BufAllpassC
</span></a> which uses cubic interpolation. Cubic interpolation is more computationally expensive than linear, but more accurate.
</p>
30 <p class=
"p4"><br></p>
31 <p class=
"p3">See also
<a href=
"AllpassL.html"><span class=
"s1">AllpassL
</span></a>.
</p>
32 <p class=
"p4"><br></p>
33 <p class=
"p3"><b>buf
</b> - buffer number.
</p>
34 <p class=
"p3"><b>in
</b> - the input signal.
</p>
35 <p class=
"p3"><b>delaytime
</b> - delay time in seconds.
</p>
36 <p class=
"p3"><b>decaytime
</b> - time for the echoes to decay by
60 decibels. If this time is negative then the feedback
</p>
37 <p class=
"p3"><b>Warning:
</b> For reasons of efficiency, the effective
38 buffer size is limited to the previous power of two. So, if
44100
39 samples are allocated, the maximum delay would be
32768 samples.
</p>
40 <p class=
"p3">coefficient will be negative, thus emphasizing only odd harmonics at an octave lower.
</p>
41 <p class=
"p4"><br></p>
42 <p class=
"p5">// allocate buffer
</p>
43 <p class=
"p6">b =
<span class=
"s2">Buffer
</span>.alloc(s,
44100,
1);
</p>
44 <p class=
"p7"><br></p>
45 <p class=
"p5">// Since the allpass delay has no audible effect as a resonator on
</p>
46 <p class=
"p5">// steady state sound ...
<span class=
"Apple-converted-space"> </span></p>
47 <p class=
"p7"><br></p>
48 <p class=
"p6">{
<span class=
"s2">BufAllpassC
</span>.ar(b,
<span class=
"s2">WhiteNoise
</span>.ar(
0.1),
<span class=
"s2">XLine
</span>.kr(
0.0001,
0.01,
20),
0.2) }.play;
</p>
49 <p class=
"p7"><br></p>
50 <p class=
"p5">// ...these examples add the input to the effected sound and compare variants so that you can hear
</p>
51 <p class=
"p5">// the effect of the phase comb:
</p>
52 <p class=
"p7"><br></p>
55 <p class=
"p6"><span class=
"Apple-tab-span"> </span>z =
<span class=
"s2">WhiteNoise
</span>.ar(
0.2);
</p>
56 <p class=
"p6"><span class=
"Apple-tab-span"> </span>z +
<span class=
"s2">BufAllpassN
</span>.ar(b, z,
<span class=
"s2">XLine
</span>.kr(
0.0001,
0.01,
20),
0.2)
</p>
57 <p class=
"p6">}.play)
</p>
58 <p class=
"p7"><br></p>
61 <p class=
"p6"><span class=
"Apple-tab-span"> </span>z =
<span class=
"s2">WhiteNoise
</span>.ar(
0.2);
</p>
62 <p class=
"p6"><span class=
"Apple-tab-span"> </span>z +
<span class=
"s2">BufAllpassL
</span>.ar(b, z,
<span class=
"s2">XLine
</span>.kr(
0.0001,
0.01,
20),
0.2)
</p>
63 <p class=
"p6">}.play)
</p>
64 <p class=
"p7"><br></p>
67 <p class=
"p6"><span class=
"Apple-tab-span"> </span>z =
<span class=
"s2">WhiteNoise
</span>.ar(
0.2);
</p>
68 <p class=
"p6"><span class=
"Apple-tab-span"> </span>z +
<span class=
"s2">BufAllpassC
</span>.ar(b, z,
<span class=
"s2">XLine
</span>.kr(
0.0001,
0.01,
20),
0.2)
</p>
69 <p class=
"p6">}.play)
</p>
70 <p class=
"p7"><br></p>
71 <p class=
"p5">// used as an echo - doesn't really sound different than Comb,
</p>
72 <p class=
"p5">// but it outputs the input signal immediately (inverted) and the echoes
</p>
73 <p class=
"p5">// are lower in amplitude.
</p>
74 <p class=
"p6">{
<span class=
"s2">BufAllpassL
</span>.ar(b,
<span class=
"s2">Decay
</span>.ar(
<span class=
"s2">Dust
</span>.ar(
1,
0.5),
0.2,
<span class=
"s2">WhiteNoise
</span>.ar),
0.2,
3) }.play;
</p>