Name

OscConstant

Examples

import net.fladdict.oscillator.*;

Oscillator osc = new OscConstant(50);

for(int i=0; i<100; i++){
  osc.update();
  point(i, osc.getValue());
}

Description

Kind of a special oscillator that returns just a fixed number like 6, 5, and so on. Basically this class is used intenally. When you define oscillator's property(e.g. amplitude), you usually use number, however inside of oscillator, it is converted to OscConstant object that contains same number. Why? Because now all internal property is wrapped with subclass of Oscillator class, say, we can also OscSin oscillator as an amplitude. It enables you to produce more and more complex wave form.

Methods

basic methods

Constructors

  • OscConstant(fixedValue)

Parameters

  • fixedValue
  • int or float: Just a fixed value like 6, 3, 12, etc...

Usage

  • Web & Application