Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ddf.minim.signals
Class PinkNoise

    java.lang.Object
      ddf.minim.signals.PinkNoise

All Implemented Interfaces:
  AudioSignal

    public class PinkNoise

extends java.lang.Object
implements AudioSignal

PinkNoise generates a pink noise signal.

Author:
  Damien Di Fede
See Also:
  Pink Noise

Field Summary
`protected float` | `amp`
`protected float` | `leftScale`
`protected float` | `pan`
`protected float` | `rightScale`

Constructor Summary
`PinkNoise()` Constructs a pink noise signal with an amplitude of 1.
`PinkNoise(float amp)` Constructs a pink noise signal with an amplitude of `amp`.

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 of the signal to `a`.
`void` | `setPan(float p)` Sets the pan of the signal to `p`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### amp

    protected float amp

### pan

    protected float pan

### leftScale

    protected float leftScale

### rightScale

    protected float rightScale

Constructor Detail

### PinkNoise

    public PinkNoise()

  Constructs a pink noise signal with an amplitude of 1.

### PinkNoise

    public PinkNoise(float amp)

  Constructs a pink noise signal with an amplitude of `amp`. `amp` should be between 0 and 1.

  Parameters:
    `amp` -

Method Detail

### setAmp

    public void setAmp(float a)

  Sets the amplitude of the signal to `a`.

  Parameters:
    `a` - the new amplitude, it will be constrained to [0, 1].

### setPan

    public void setPan(float p)

  Sets the pan of the signal to `p`.

  Parameters:
    `p` - the new pan, it will be constrained to [-1, 1]

### generate

    public void generate(float[] signal)

  Description copied from interface: `AudioSignal`
  Fills `signal` with values in the range of [-1, 1]. `signal` represents a mono audio signal.

  Specified by:
    `generate` in interface `AudioSignal`
  Parameters:
    `signal` - the float array to fill

### generate

    public void generate(float[] left,
                         float[] right)

  Description copied from interface: `AudioSignal`
  Fills `left` 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.

  Specified by:
    `generate` in interface `AudioSignal`
  Parameters:
    `left` - the left channel
    `right` - the right channel

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD