-
-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathBrownNoise.java
More file actions
36 lines (31 loc) · 1.1 KB
/
Copy pathBrownNoise.java
File metadata and controls
36 lines (31 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package processing.sound;
import processing.core.PApplet;
/**
* Brown noise (also called red noise) has higher energy at lower frequencies. Its power density
* decreases 6dB per octave.
*
* Please be aware that, because most of its power resides in the bass frequencies, the subjective
* loudness of brown noise relative to other sounds can vary dramatically depending on how well
* your sound system can reproduce low frequency sounds!
* @webref Noise:BrownNoise
* @webBrief Brown noise (also called red noise) has higher energy at lower frequencies.
* @param parent typically use "this"
**/
public class BrownNoise extends Noise<com.jsyn.unitgen.BrownNoise> {
/**
* @param parent typically use "this"
*/
public BrownNoise(PApplet parent) {
super(parent, new com.jsyn.unitgen.BrownNoise());
this.amplitude = this.noise.amplitude;
// explicitly set amplitude to override default (see amp() below)
this.amp(1.0f);
}
/**
* {@inheritDoc}
*/
public void amp(float amp) {
// the JSyn Brownian noise generator can drift to exceed one, so tone down the volume a bit
super.amp(amp / 16);
}
}