45 lines
958 B
Text
45 lines
958 B
Text
|
class:: AudioIn
|
||
|
summary:: Read audio input.
|
||
|
related:: Classes/In, Classes/SoundIn
|
||
|
categories:: UGens>InOut
|
||
|
|
||
|
|
||
|
Description::
|
||
|
|
||
|
Reads audio from the sound input hardware.
|
||
|
|
||
|
note::
|
||
|
This is provided for backwards compatibility with SC2 code. For normal use link::Classes/SoundIn::, which has bus numbers beginning at 0, as AudioIn may be deprecated and removed at some point in the future.
|
||
|
::
|
||
|
|
||
|
classmethods::
|
||
|
|
||
|
method::ar
|
||
|
|
||
|
argument::channel
|
||
|
|
||
|
Input channel number to read. Channel numbers begin at 1.
|
||
|
|
||
|
argument::mul
|
||
|
|
||
|
argument::add
|
||
|
|
||
|
Examples::
|
||
|
Patching input to output
|
||
|
code::
|
||
|
// patching input to output
|
||
|
|
||
|
// beware of the feedback
|
||
|
|
||
|
(
|
||
|
ServerOptions.inDevices.postln; // post available audio input devices
|
||
|
s.meter; // display level meters for monitoring
|
||
|
SynthDef("help-AudioIn", {
|
||
|
var input = AudioIn.ar(1); // first input
|
||
|
// delay output to tame feedback in case of microphones are configured:
|
||
|
Out.ar(0, CombN.ar(input * -25.dbamp, 0.5, 0.5, 0.001))
|
||
|
}).play
|
||
|
)
|
||
|
::
|
||
|
|