Class Name

SawOsc

Description

This is a simple Saw Wave Oscillator.

Examples

  • import processing.sound.*;
    SawOsc saw;
    
    void setup() {
      size(640, 360);
      background(255);
        
      // Create square wave oscillator.
      saw = new SawOsc(this);
      saw.play();
    }
    
    void draw() {
    	//the image is just for informative purposes
    	//on how the soundwave looks
    }
    
    
    Image output for example 1

Constructors

  • SawOsc(parent)

Parameters

  • parenttypically use "this"

Methods

  • play()Starts the oscillator.
  • set()Set multiple parameters at once.
  • freq()Set the frequency of the oscillator in Hz.
  • amp()Changes the amplitude/volume of the saw oscillator.
  • add()Offset the output of this generator by given value.
  • pan()Move the sound in a stereo panorama.
  • stop()Move the sound in a stereo panorama.