Class Pulse

All Implemented Interfaces:
Modulator

public class Pulse extends Oscillator<PulseOscillator>
This is a simple Pulse oscillator.
  • Constructor Details

    • Pulse

      public Pulse(PApplet parent)
      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.