🍋
Menu
Audio

Waveform

Waveform (Audio Visual Representation)

A visual graph showing how an audio signal's amplitude changes over time, displayed as a fluctuating line or filled shape that represents the loudness and dynamics of the sound at each moment.

技術的詳細

Waveforms plot time on the x-axis and amplitude on the y-axis, typically showing the raw PCM sample values or their RMS (Root Mean Square) envelope. The Web Audio API's AnalyserNode provides real-time time-domain data via getTimeDomainData() for live visualization. For static waveforms (like SoundCloud-style displays), the audio is divided into segments, each reduced to min/max amplitude values that form the bar heights. Canvas or SVG rendering draws these values as vertical bars or a continuous path. Stereo audio shows separate waveforms per channel or a combined mono view.

```javascript
// Waveform: 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();
```

関連ツール

関連用語