FAQ
 
 
Cover  \ Exhibition  \ Learning  \ Reference  \ Download  \ Discourse   
      Language \ Environment \ Libraries \ Comparison
 
   
   
Abridged (A-Z) \ Complete (A-Z)  
   
  Reference for Processing (BETA) version 91+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.  
Name  

PSound

   
Examples  
PSound soundA; 
 
void setup() { 
  soundA = loadSound("clong.wav"); 
  soundA.loop(); 
  framerate(24); 
} 
 
void draw() { 
  println(soundA.time()); 
} 
 

Description   Class for storing and playing sounds of the .wav format.
   
Methods  
play()
  Plays the sound once

loop()
  Plays the sound continuously

noLoop()
  Stops the sound from looping

pause()
  Pauses the sound playback

stop()
  Stops the sound playback

volume()
  Sets the volume of the sound playback

duration()
  Returns the total length of the sound in seconds

time()
  Returns the current position of sound playback in seconds

   
   
Constructors  
PSound(file)
   
Parameters  
file   String: name of the image file to load

   
Usage   Web & Application
   
 
 






   
 
Updated: Fri Jul 15 16:36:01 PDT 2005
 
 








Creative Commons License
 
  Processing is an open project initiated by Ben Fry and Casey Reas  
  © Info