← All examples

02 DOM · Beginner

See the three bands.

Separate bass, mid and high into three live meters. See exactly what the library gives you.

bass
0.00
mid
0.00
high
0.00

What you’ll learn

Read a coherent frame and use each band independently.

The complete setup, with playback and cleanup →

Download the working example component ↓

The key idea · excerpt
const { bands } = audio.snapshot();
for (const name of ['bass', 'mid', 'high']) {
  meters[name].style.transform = `scaleY(${bands[name]})`;
}

Music: I dunno by grapes · Drive by AlexBeroza · Parametaphoriquement by gmz · nightWalk by airtone. From ccMixter, under CC BY 3.0.