duration() {
    // Return Duration
    if (this.buffer) {
      return this.buffer.duration;
    } else {
      return 0;
    }
  }
Returns the duration of a sound file in seconds.

@method duration
@for p5.SoundFile
@return {Number} The duration of the soundFile in seconds.