Difference between revisions of "audio feedback"

From Noah.org
Jump to navigationJump to search
m
m
Line 3: Line 3:
 
[[Category:Audio]]
 
[[Category:Audio]]
  
<pre>
+
Be ready to hit the Mute button of your master volume control before you evaluate this code in '''SuperCollider'''.
AudioIn.ar(channel, mul, add)
+
 
</pre>
+
This reads audio from the sound input hardware (microphone input by default on a laptop). Channel numbers begin at 1.
Reads audio from the sound input hardware.
+
 
channel - input channel number to read.  
 
Channel numbers begin at 1.
 
 
<pre>
 
<pre>
 
// mono: patch input to output
 
// mono: patch input to output
 
(
 
(
 
SynthDef("help-AudioIn",{ arg out=0;
 
SynthDef("help-AudioIn",{ arg out=0;
Out.d.......dar(out,
+
Out.ar(out,
 
AudioIn.ar(1)
 
AudioIn.ar(1)
 
)
 
)

Revision as of 07:36, 20 June 2016


Be ready to hit the Mute button of your master volume control before you evaluate this code in SuperCollider.

This reads audio from the sound input hardware (microphone input by default on a laptop). Channel numbers begin at 1.

// mono: patch input to output
(
SynthDef("help-AudioIn",{ arg out=0;
	Out.ar(out,
		AudioIn.ar(1)
	)
}).play;
)
// stereo -- patch input to output

(
SynthDef("help-AudioIn",{ arg out=0;
	Out.ar(out,
		AudioIn.ar([1,2])
	)
}).play;
)