Reference+
Name
set()
Class
AudioIn
Description
Set amplitude and pan position with one method.
Examples
import processing.sound.*; AudioIn in; void setup() { size(640, 360); background(255); // Create the Input stream in = new AudioIn(this, 0); in.play(); } void draw() { } void mousePressed() { float amp=0.5; float add=0.0; float pos=1; in.set(amp, add, pos); }
Syntax
audioin.set(amp, pos)
audioin.set(amp, add, pos)
Parameters
amp
(float)
the volume to grab the input at as a value from 0.0 (complete silence) to 1.0 (full volume)pos
(float)
pan the audio input in a stereo panorama. Allowed values are between -1.0 (left) and 1.0 (right)
Return
void
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.