Name

OscWhiteNoise

Examples

import net.fladdict.oscillator.*;

Oscillator osc = new OscWhiteNoise(30,50);

for(int i=0; i<100; i++){
float oldPos = osc.getValue();
osc.update();
float newPos = osc.getValue();
line(i-1, oldPos, i, newPos);
}

Description

Kind of a special oscillator that returns random value between -amplitude and amplitude. Because it is random, OscWhiteNoise class doesn't have setter / getter of period & its offset, and update() method.

Methods

basic methods

  • update()
  • It is just a dummy method for compatibility. Doesnt have any function.
  • getValue()
  • Returns current value of wave

intermediate methods

advanced methods

Constructors

  • OscWhiteNoise(Amplitude, AmplitudeOffset)

Parameters

  • Amplitude
  • int or float: Amplitude of this wave.
  • AmplitudeOffset
  • int or float: Offset of amplitude.

Usage

  • Web & Application