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.42">
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: #a71e12}
15 p
.p6
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #a71e12; 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
; min-height: 12.0px}
18 span
.s1
{color: #0000ff}
19 span
.s2
{color: #0019b7}
20 span
.Apple-tab-span
{white-space:pre
}
24 <p class=
"p1"><b>CombL
<span class=
"Apple-tab-span"> </span>comb delay line with linear interpolation
</b></p>
25 <p class=
"p2"><br></p>
26 <p class=
"p3"><b>CombL.ar(in, maxdelaytime, delaytime, decaytime, mul, add)
</b></p>
27 <p class=
"p3"><b>CombL.kr(in, maxdelaytime, delaytime, decaytime, mul, add)
</b></p>
28 <p class=
"p4"><br></p>
29 <p class=
"p3">Comb delay line with linear interpolation. See also
<a href=
"CombN.html"><span class=
"s1">CombN
</span></a> which uses no interpolation, and
<a href=
"CombC.html"><span class=
"s1">CombC
</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=
"BufCombL.html"><span class=
"s1">BufCombL
</span></a>.
</p>
32 <p class=
"p4"><br></p>
33 <p class=
"p3"><b>in
</b> - the input signal.
</p>
34 <p class=
"p3"><b>maxdelaytime
</b> - the maximum delay time in seconds. used to initialize the delay buffer size.
</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">coefficient will be negative, thus emphasizing only odd harmonics at an octave lower.
</p>
38 <p class=
"p4"><br></p>
39 <p class=
"p5">// These examples compare the variants, so that you can hear the difference in interpolation
</p>
40 <p class=
"p6"><br></p>
41 <p class=
"p5">// Comb used as a resonator. The resonant fundamental is equal to
<span class=
"Apple-converted-space"> </span></p>
42 <p class=
"p5">// reciprocal of the delay time.
</p>
43 <p class=
"p7">{
<span class=
"s2">CombN
</span>.ar(
<span class=
"s2">WhiteNoise
</span>.ar(
0.01),
0.01,
<span class=
"s2">XLine
</span>.kr(
0.0001,
0.01,
20),
0.2) }.play;
</p>
44 <p class=
"p8"><br></p>
45 <p class=
"p7">{
<span class=
"s2">CombL
</span>.ar(
<span class=
"s2">WhiteNoise
</span>.ar(
0.01),
0.01,
<span class=
"s2">XLine
</span>.kr(
0.0001,
0.01,
20),
0.2) }.play;
</p>
46 <p class=
"p8"><br></p>
47 <p class=
"p7">{
<span class=
"s2">CombC
</span>.ar(
<span class=
"s2">WhiteNoise
</span>.ar(
0.01),
0.01,
<span class=
"s2">XLine
</span>.kr(
0.0001,
0.01,
20),
0.2) }.play;
</p>
48 <p class=
"p8"><br></p>
49 <p class=
"p5">// with negative feedback:
</p>
50 <p class=
"p7">{
<span class=
"s2">CombN
</span>.ar(
<span class=
"s2">WhiteNoise
</span>.ar(
0.01),
0.01,
<span class=
"s2">XLine
</span>.kr(
0.0001,
0.01,
20), -
0.2) }.play;
</p>
51 <p class=
"p8"><br></p>
52 <p class=
"p7">{
<span class=
"s2">CombL
</span>.ar(
<span class=
"s2">WhiteNoise
</span>.ar(
0.01),
0.01,
<span class=
"s2">XLine
</span>.kr(
0.0001,
0.01,
20), -
0.2) }.play;
</p>
53 <p class=
"p8"><br></p>
54 <p class=
"p7">{
<span class=
"s2">CombC
</span>.ar(
<span class=
"s2">WhiteNoise
</span>.ar(
0.01),
0.01,
<span class=
"s2">XLine
</span>.kr(
0.0001,
0.01,
20), -
0.2) }.play;
</p>
55 <p class=
"p8"><br></p>
56 <p class=
"p5">// used as an echo.
<span class=
"Apple-converted-space"> </span></p>
57 <p class=
"p7">{
<span class=
"s2">CombL
</span>.ar(
<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,
0.2,
3) }.play;
</p>