Package processing.sound
Class AudioIn
java.lang.Object
processing.sound.SoundObject
processing.sound.AudioIn
AudioIn lets you grab the audio input from your sound card.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
play()
Starts the generatorvoid
play
(float amp) void
play
(float amp, float add) void
play
(float amp, float add, float pos) Start capturing the input stream and route it to the audio outputvoid
set
(float amp, float pos) Set amplitude and pan position with one method.void
set
(float amp, float add, float pos) void
start()
void
start
(float amp) void
start
(float amp, float add) void
start
(float amp, float add, float pos) Start the input stream without routing it to the audio output.void
stop()
Stop capturing sound from this audio input.Methods inherited from class processing.sound.SoundObject
add, amp, channels, getUnitGenerator, isPlaying, pan
-
Constructor Details
-
AudioIn
-
AudioIn
- Parameters:
parent
- typically use "this"in
- input channel number (optional, default 0)
-
-
Method Details
-
play
public void play()Description copied from class:SoundObject
Starts the generator- Overrides:
play
in classSoundObject
-
play
public void play(float amp) -
play
public void play(float amp, float add) -
play
public void play(float amp, float add, float pos) Start capturing the input stream and route it to the audio output- Parameters:
amp
- the volume to grab the input at as a value from 0.0 (complete silence) to 1.0 (full volume)pos
- pan the audio input in a stereo panorama. Allowed values are between -1.0 (left) and 1.0 (right)
-
start
public void start() -
start
public void start(float amp) -
start
public void start(float amp, float add) -
start
public void start(float amp, float add, float pos) Start the input stream without routing it to the audio output. This is useful if you only want to perform audio analysis based on the microphone input.- Parameters:
amp
- the volume to grab the input at as a value from 0.0 (complete silence) to 1.0 (full volume)add
- offset the audio input by the given valuepos
- pan the audio input in a stereo panorama. Allowed values are between -1.0 (left) and 1.0 (right)
-
set
public void set(float amp, float pos) Set amplitude and pan position with one method.- Parameters:
amp
- the volume to grab the input at as a value from 0.0 (complete silence) to 1.0 (full volume)pos
- pan the audio input in a stereo panorama. Allowed values are between -1.0 (left) and 1.0 (right)
-
set
public void set(float amp, float add, float pos) -
stop
public void stop()Stop capturing sound from this audio input.- Overrides:
stop
in classSoundObject
-