Class Name

Pulse

Description

This is a simple Pulse oscillator.

Examples

  • import processing.sound.*;
    Pulse pulse;
    
    void setup() {
      size(640, 360);
      background(255);
        
      // Create and start the sine oscillator.
      pulse = new Pulse(this);
        
      //Start the Pulse Oscillator. 
      pulse.play();
    }
    
    void draw() {
    	//the image is just for informative purposes
    	//on how the soundwave looks
    }
    
    
    Image output for example 1

Constructors

  • Pulse(parent)

Parameters

  • parenttypically use "this"

Methods

  • amp()Change the amplitude/volume of this sound.
  • freq()Sets the frequency of the oscillator.
  • pan()Move the sound in a stereo panorama.
  • play()Starts the oscillator
  • set()Set multiple parameters at once
  • stop()Stop the oscillator from playing back
  • width()Changes the pulse width of the pulse oscillator.