beads volume issue
in
Contributed Library Questions
•
1 year ago
Hello,
I am trying get familiar with beads audio library. Now I applied echo effect to simple sine wave generator, but after that volume control does not work, how to fix that problem ?
thanks for answer
-
import beads.*;
AudioContext ac;
WavePlayer wp;Gain g;Glide gainGlide;Glide frequencyGlide;TapIn delayIn;TapOut delayOut;Gain delayGain;
void setup(){size(400, 300);
ac = new AudioContext();gainGlide = new Glide(ac, 0.0, 50);frequencyGlide = new Glide(ac, 20, 50);wp = new WavePlayer(ac, frequencyGlide, Buffer.SINE);
g = new Gain(ac, 1, gainGlide);
g.addInput(wp);delayIn = new TapIn(ac, 2000);delayIn.addInput(wp);delayOut = new TapOut(ac, delayIn, 500.0);delayGain = new Gain(ac, 1, 0.50);delayGain.addInput(delayOut);ac.out.addInput(g);ac.out.addInput(delayGain);ac.start();background(0);
}
void draw(){gainGlide.setValue(mouseX / (float)width);
frequencyGlide.setValue(mouseY);}
1