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: 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: 9.0px Monaco
; color: #606060}
13 p
.p4
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
; color: #0000ff}
14 p
.p5
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; min-height: 12.0px}
15 p
.p6
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #bf0000}
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: #000000; min-height: 12.0px}
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: #000000}
21 span
.s3
{color: #bf0000}
22 span
.s4
{font: 12.0px Helvetica
; color: #0000ff}
23 span
.s5
{color: #0000bf}
24 span
.Apple-tab-span
{white-space:pre
}
28 <p class=
"p1"><span class=
"s1"><b>SoundIn
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b></span><b>read audio from hardware inputs
</b></p>
29 <p class=
"p2"><br></p>
30 <p class=
"p1"><b>SoundIn.ar(bus, mul, add)
</b></p>
31 <p class=
"p2"><br></p>
32 <p class=
"p1">SoundIn is a convenience UGen to read audio from the input of your computer or soundcard. It is a wrapper UGen based on
<b>In
</b>, which offsets the index such that
0 will always correspond to the first input regardless of the number of inputs present.
</p>
33 <p class=
"p1"><b>bus
</b> - the channel (or array of channels) to read in. These start at
0, which will correspond to the first audio input.
</p>
34 <p class=
"p2"><br></p>
35 <p class=
"p1"><b>N.B.
</b> On Intel based Macs, reading the built-in microphone or input may require creating an aggregate device in AudioMIDI Setup.
</p>
36 <p class=
"p2"><br></p>
37 <p class=
"p3">"open -a 'Audio MIDI Setup'"<span class=
"s2">.unixCmd;
</span><span class=
"s3">// execute this to launch it
</span></p>
38 <p class=
"p2"><br></p>
39 <p class=
"p4"><span class=
"s2"><b>See also:
</b> <a href=
"In.html"><span class=
"s4">In
</span></a>,
<a href=
"../../ServerArchitecture/ServerOptions.html"><span class=
"s4">ServerOptions
</span></a></span></p>
40 <p class=
"p2"><br></p>
41 <p class=
"p5"><br></p>
42 <p class=
"p6">// world's most expensive patchcord (use headphones to avoid feedback)
</p>
43 <p class=
"p7">{
<span class=
"s5">SoundIn
</span>.ar(
0) }.play;
</p>
44 <p class=
"p8"><br></p>
45 <p class=
"p6">// stereo version
</p>
46 <p class=
"p9">{
<span class=
"s5">SoundIn
</span>.ar([
0,
1]) }.play;
</p>
47 <p class=
"p5"><br></p>
48 <p class=
"p6">// scope input; silent output
</p>
49 <p class=
"p7"><span class=
"s5">Server
</span>.internal.boot;
</p>
50 <p class=
"p7">{
<span class=
"s5">Amplitude
</span>.kr(
<span class=
"s5">SoundIn
</span>.ar(
0)); }.scope;
</p>