mirror of
https://github.com/processing/processing4.git
synced 2026-02-23 07:15:39 +01:00
repaired Filter + took out res + introduced Bandwidth for BPass. fixed some public/private bugs
This commit is contained in:
@@ -6,7 +6,7 @@ In this example it is started and stopped by clicking into the renderer window.
|
||||
import processing.sound.*;
|
||||
|
||||
WhiteNoise noise;
|
||||
BandPass bPass;
|
||||
BandPass bandPass;
|
||||
|
||||
float amp=0.0;
|
||||
|
||||
@@ -16,14 +16,15 @@ void setup() {
|
||||
|
||||
// Create the noise generator + Filter
|
||||
noise = new WhiteNoise(this);
|
||||
bPass = new BandPass(this);
|
||||
bandPass = new BandPass(this);
|
||||
|
||||
noise.play(0.5);
|
||||
bPass.process(noise, 100);
|
||||
bandPass.process(noise, 100);
|
||||
}
|
||||
|
||||
void draw() {
|
||||
|
||||
bPass.freq(map(mouseX, 0, 350, 20, 10000));
|
||||
bandPass.freq(map(mouseX, 0, width, 20, 10000));
|
||||
|
||||
bPass.res(map(mouseY, 0, 350, 0.05, 1.0));
|
||||
bandPass.bw(map(mouseY, 0, height, 100, 1000));
|
||||
}
|
||||
|
||||
@@ -17,10 +17,11 @@ void setup() {
|
||||
// Create the noise generator + filter
|
||||
noise = new WhiteNoise(this);
|
||||
highPass = new HighPass(this);
|
||||
|
||||
noise.play(0.5);
|
||||
highPass.process(noise, 100);
|
||||
}
|
||||
|
||||
void draw() {
|
||||
highPass.freq(map(mouseX, 0, 350, 20, 10000));
|
||||
highPass.freq(map(mouseX, 0, width, 80, 10000));
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ In this example it is started and stopped by clicking into the renderer window.
|
||||
import processing.sound.*;
|
||||
|
||||
WhiteNoise noise;
|
||||
LowPass lPass;
|
||||
LowPass lowPass;
|
||||
|
||||
float amp=0.0;
|
||||
|
||||
@@ -16,11 +16,11 @@ void setup() {
|
||||
|
||||
// Create the noise generator + filter
|
||||
noise = new WhiteNoise(this);
|
||||
lPass = new LowPass(this);
|
||||
lowPass = new LowPass(this);
|
||||
noise.play(0.2);
|
||||
lPass.process(noise, 800);
|
||||
lowPass.process(noise, 800);
|
||||
}
|
||||
|
||||
void draw() {
|
||||
lPass.freq(map(mouseX, 0, 350, 800, 10000));
|
||||
lowPass.freq(map(mouseX, 0, width, 80, 10000));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user