Name

sampleRate()

Class

Sound

Description

Get or set the internal sample rate of the synthesis engine.

Examples

  • import processing.sound.*;
    Sound s;
    
    void setup() {
      size(200, 200);
    
      // Create a Sound object for controlling the synthesis engine sample rate.
      s = new Sound(this);
      s.sampleRate(22050);
    }
    

Syntax

  • Sound.sampleRate()
  • Sound.sampleRate(sampleRate)

Parameters

  • sampleRate(int)the sample rate to be used by the synthesis engine (default 44100)

Return

  • int