public void setup() {
    size(200, 200);
    // Start Sonia engine.
    Sonia.start(this);

    // Create a new sample object.
    tone = new Sample("tone.wav");

    // Loop the sound forever
    // (well, at least until stop() is called)
    tone.repeat();
    smooth();
  }
 // Close the sound engine
 public void stop() {
   Sonia.stop();
   super.stop();
 }