Visualizing waveforms: plotwav

### 15.1.9 Visualizing waveforms: plotwav

The plotwav command displays the waveform of an audio clip.

- plotwav takes one mandatory argument and one optional argument:
  - A, an audio clip.
  - Optionally, range; one of:
    - range=[m,n] for integers m and n (representing sample units).
    - range=a..b for floating point numbers a and b (representing seconds).
- plotwav(A ⟨range⟩) displays the waveform A, in its entirety or over the optional specified range.

#### Examples

Assuming that the directory sounds contains two wav files, example1.wav (a man speaking, stereo) and example2.wav (guitar playing, mono):

- Input:

  clip1:=readwav("/path/to/sounds/example1.wav"):;
  plotwav(clip1)

  Output:
- Input:

  clip2:=readwav("/path/to/sounds/example2.wav"):;
  plotwav(clip2)

  Output:
- Input:
  plotwav(clip2,range=0.5..0.52)
  Output: