Name

stop()

Class

TriOsc

Description

Stop the oscillator from playing back

Examples

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

Syntax

  • oscillator.stop()

Return

  • void