### 28.2.14 Listening to a digital sound

The playsnd command plays digitized sound data.

- playsnd takes one mandatory argument and up to three optional arguments:
  - A, an audio clip.
  - Optionally, offset, len, a sequence of two integers, or a..b, an interval of real numbers, determining the portion of the clip to be played (by default, the entire clip is played).
  - Optionally, r, a positive integer (by default, r=1).
- playsnd(A) plays the given (portion of) audio clip over the computer speakers and repeats it r times (setting r to a higher value loops the sound r times).
- The portion to be played is either the block of len samples starting at offset or the sound between a and b seconds.
- To stop the playback, press the STOP button.