Package wellen.dsp

Class Oscillator

java.lang.Object
wellen.dsp.Oscillator
All Implemented Interfaces:
DSPNodeOutput
Direct Known Subclasses:
OscillatorFunction, Wavetable

public abstract class Oscillator extends Object implements DSPNodeOutput
  • Constructor Details

    • Oscillator

      public Oscillator()
  • Method Details

    • set_waveform

      public abstract void set_waveform(int pWaveform)
    • get_amplitude

      public abstract float get_amplitude()
    • set_amplitude

      public abstract void set_amplitude(float pAmplitude)
    • get_offset

      public abstract float get_offset()
    • set_offset

      public abstract void set_offset(float pOffset)
    • get_frequency

      public abstract float get_frequency()
    • set_frequency

      public abstract void set_frequency(float pFrequency)
    • set_oscillation_speed

      public void set_oscillation_speed(float pFrequency)
      set speed of oscillator in seconds per phase
      Parameters:
      pFrequency - oscillation speed on seconds per phase ( or Hz )
    • set_oscillation_range

      public void set_oscillation_range(float pMin, float pMax)
      set output value range of oscillator in minimum and maximum. this method affects the oscillator’s amplitude and offset. this methods can be particularily helpful when using an oscillator for non-audio applications ( e.g as an LFO that controlls the frequency ).
      Parameters:
      pMin - minimum value of oscillator
      pMax - maximum value of oscillator