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: 18.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
}
13 p
.p4
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
; color: #0021e7}
14 p
.p5
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #bf0000}
15 p
.p6
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #000000; min-height: 12.0px}
16 p
.p7
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #000000}
17 p
.p8
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #606060}
18 span
.s1
{color: #000000}
19 span
.s2
{text-decoration: underline
}
20 span
.s3
{color: #0000bf}
21 span
.Apple-tab-span
{white-space:pre
}
25 <p class=
"p1"><b>AudioIn
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>read audio input
</b></p>
26 <p class=
"p2"><br></p>
27 <p class=
"p3"><b>superclass: SoundIn
</b></p>
28 <p class=
"p2"><b></b><br></p>
29 <p class=
"p3"><b>AudioIn.ar(channel, mul, add)
</b></p>
30 <p class=
"p2"><br></p>
31 <p class=
"p3">Reads audio from the sound input hardware.
<b>This is provided for backwards compatibility with SC2 code
</b>. For normal use
<b>SoundIn
</b>, which has bus numbers beginning at
0, as AudioIn may be deprecated and removed at some point in the future.
</p>
32 <p class=
"p2"><br></p>
33 <p class=
"p3">channel - input channel number to read.
<span class=
"Apple-converted-space"> </span></p>
34 <p class=
"p3"><span class=
"Apple-tab-span"> </span>Channel numbers begin at
1.
</p>
35 <p class=
"p2"><br></p>
36 <p class=
"p4"><span class=
"s1"><b>See also:
</b> <a href=
"In.html"><span class=
"s2">In
</span></a>,
<a href=
"../../ServerArchitecture/ServerOptions.html"><span class=
"s2">ServerOptions
</span></a>,
<a href=
"SoundIn.html"><span class=
"s2">SoundIn
</span></a></span></p>
37 <p class=
"p2"><br></p>
38 <p class=
"p5">// beware of the feedback - wear headphones to prevent it.
</p>
39 <p class=
"p6"><br></p>
40 <p class=
"p5">// patching input to output
</p>
42 <p class=
"p8"><span class=
"s3">SynthDef
</span><span class=
"s1">(
</span>"help-AudioIn"<span class=
"s1">,{
</span><span class=
"s3">arg
</span><span class=
"s1"> out=
0;
</span></p>
43 <p class=
"p7"><span class=
"Apple-tab-span"> </span><span class=
"s3">Out
</span>.ar(out,
</p>
44 <p class=
"p7"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s3">AudioIn
</span>.ar(
1)
</p>
45 <p class=
"p7"><span class=
"Apple-tab-span"> </span>)
</p>
46 <p class=
"p7">}).play;
</p>
48 <p class=
"p6"><br></p>
49 <p class=
"p5">// stereo through patching from input to output
</p>
51 <p class=
"p8"><span class=
"s3">SynthDef
</span><span class=
"s1">(
</span>"help-AudioIn"<span class=
"s1">,{
</span><span class=
"s3">arg
</span><span class=
"s1"> out=
0;
</span></p>
52 <p class=
"p7"><span class=
"Apple-tab-span"> </span><span class=
"s3">Out
</span>.ar(out,
</p>
53 <p class=
"p7"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s3">AudioIn
</span>.ar([
1,
2])
</p>
54 <p class=
"p7"><span class=
"Apple-tab-span"> </span>)
</p>
55 <p class=
"p7">}).play;
</p>
57 <p class=
"p6"><br></p>
58 <p class=
"p5">// simpler:
</p>
59 <p class=
"p7">{
<span class=
"s3">AudioIn
</span>.ar([
1,
2]) }.play;
</p>
60 <p class=
"p6"><br></p>
61 <p class=
"p5">// scope output (required internal server)
</p>
62 <p class=
"p7">{
<span class=
"s3">AudioIn
</span>.ar([
1,
2]) }.scope;
</p>
63 <p class=
"p6"><br></p>