Name

set()

Class

BrownNoise

Description

Set the amplitude and panoramic position with one method.

Examples

  • import processing.sound.*;
    BrownNoise noise;
    
    void setup() {
      size(640, 360);
      background(255);
        
      // Create the noise generator
      noise = new BrownNoise(this);
      noise.play();
    }      
    
    void draw() {
    }
    
    void mousePressed() {
      float amp=0.5;
      float add=0.0;
      float pos=1;
      noise.set(amp, add, pos);
    }
    
    

Syntax

  • noise.set(amp, pos)
  • noise.set(amp, add, pos)

Parameters

  • amp(float)The amplitude of the noise as a value between 0.0 and 1.0.
  • pos(float)The panoramic position of the noise as a float from -1.0 to 1.0.

Return

  • void