Peak Level
Audio Peak Level
The highest instantaneous amplitude in an audio signal, used to prevent clipping and set headroom.
Technical Detail
A digital audio peak level represents sound as a sequence of amplitude samples taken at regular intervals. Each sample is a signed integer (16-bit: -32,768 to 32,767) or floating-point value (-1.0 to 1.0). The WAV format stores raw PCM samples with a RIFF header describing sample rate, bit depth, and channel count. Visualizing waveforms reveals dynamics: consistent amplitude indicates heavy compression (loudness war), while wide dynamic range shows preserved detail.
Example
```javascript
// Peak Level: Web Audio API example
const audioCtx = new AudioContext();
const response = await fetch('audio.mp3');
const buffer = await audioCtx.decodeAudioData(await response.arrayBuffer());
const source = audioCtx.createBufferSource();
source.buffer = buffer;
source.connect(audioCtx.destination);
source.start();
```