All Implemented Interfaces:
Modulator

This is a simple Pulse oscillator.

  • Constructor Summary

    Constructors

  • Method Summary

    void

    set(float freq, float width, float amp, float add, float pos)

    Set multiple parameters at once

    void

    width(float width)

    Changes the pulse width of the pulse oscillator.

    Methods inherited from class processing.sound.Oscillator

    amp, freq, freq, getModulator, play, play, play, play, set, set, stop

  • Constructor Details

    • Pulse

      Parameters:
      parent - typically use "this"
  • Method Details

    • width

      public void width(float width)

      Changes the pulse width of the pulse oscillator. Allowed values are between 0.0 and 1.0.

      Parameters:
      width - The relative pulse width of the oscillator as a float value between 0.0 and 1.0 (exclusive)
    • set

      public void set(float freq, float width, float amp, float add, float pos)

      Set multiple parameters at once

      Parameters:
      freq - The frequency value of the oscillator in Hz.
      width - The pulse width of the oscillator as a value between 0.0 and 1.0.
      amp - The amplitude of the oscillator as a value between 0.0 and 1.0.
      add - Offset the output of the oscillator by given value
      pos - The panoramic position of the oscillator as a float from -1.0 to 1.0.