- Processing
- p5.js
- Processing.py

- Processing Foundation

This reference is for Processing 3.0+. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.

Name | ### SoundFile
Examples |
    import processing.sound.*;
    SoundFile file;

    void setup() {
      size(640, 360);
      background(255);

      // Load a soundfile from the /data folder of the sketch and play it back
      file = new SoundFile(this, "sample.mp3");
      file.play();
    }

    void draw() {
    }
Description | This is a Soundfile Player which allows to play back and manipulate soundfiles of various formats.
Methods |
play() | Play the soundfile
loop() | Loop the soundfile
cue() | Set the starting position of the soundfile
jump() | Jump to a specific position in the file while continuing to play
stop() | Stop the soundfile
rate() | Change the playback rate of the soundfile
amp() | Change the amplitude/volume of the player
add() | Offset the output of the player by given value
pan() | Move the soundfile in a stereo panorama
set() | Set multiple parameters at once
duration() | Returns the duration of the soundfile
sampleRate() | Returns the sample rate of the soundfile
frames() | Returns the number of frames/samples of the soundfile
channels() | Returns the number of channels of the soundfile
Constructor |
    SoundFile(parent, path)
Parameters |
parent | PApplet: typically use "this"
path | Full Path to file or filename for data path

Updated on June 20, 2015 10:37:40pm UTC