|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectddf.minim.signals.WhiteNoise
public class WhiteNoise
White noise is a signal that contains all frequencies in equal amounts.
| Field Summary | |
|---|---|
protected float |
amp
|
protected float |
leftScale
|
protected float |
pan
|
protected float |
rightScale
|
| Constructor Summary | |
|---|---|
WhiteNoise()
Constructs a white noise generator with an amplitude of 1. |
|
WhiteNoise(float amp)
Constructs a white noise generator with the given amplitude. |
|
| Method Summary | |
|---|---|
void |
generate(float[] signal)
Fills signal with values in the range of [-1, 1]. |
void |
generate(float[] left,
float[] right)
Fills left and right with values in the range
of [-1, 1]. |
void |
setAmp(float a)
Sets the amplitude to a. |
void |
setPan(float p)
Sets the pan to |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected float amp
protected float pan
protected float leftScale
protected float rightScale
| Constructor Detail |
|---|
public WhiteNoise()
public WhiteNoise(float amp)
amp
should be between 0 and 1.
amp - the amplitude| Method Detail |
|---|
public void setAmp(float a)
a. This value will be constrained to [0, 1].
a - the new amplitudepublic void setPan(float p)
p - the new panpublic void generate(float[] signal)
AudioSignalsignal with values in the range of [-1, 1].
signal represents a mono audio signal.
generate in interface AudioSignalsignal - the float array to fill
public void generate(float[] left,
float[] right)
AudioSignalleft and right with values in the range
of [-1, 1]. left represents the left channel of a stereo
signal, right represents the right channel of that same
stereo signal.
generate in interface AudioSignalleft - the left channelright - the right channel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||