Name

stop()

Class

SqrOsc

Description

Stop the oscillator from playing back

Examples

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

Syntax

  • oscillator.stop()

Return

  • void