Name

freq()

Class

SawOsc

Description

Sets the frequency of the oscillator.

Examples

  • import processing.sound.*;
    SawOsc saw;
    
    void setup() {
      size(640, 360);
      background(255);
        
      // Create square wave oscillator.
      saw = new SawOsc(this);
      saw.play();
      saw.freq(200);
    }
    
    void draw() {
    }
    

Syntax

  • oscillator.freq(freq)
  • oscillator.freq(modulator)

Parameters

  • freq(float)the desired oscillator frequency in Hertz

Return

  • void