← All examples

01 CSS · Start here

One number. One pulse.

Turn bass energy into the scale of a circle. One value is enough to make an interface listen.

bass
0.00
mid
0.00
high
0.00

What you’ll learn

Read a single band and map its 0–1 range to a CSS transform.

The complete setup, with playback and cleanup →

Download the working example component ↓

The key idea · excerpt
const { bass } = audio.getBands();
circle.style.transform = `scale(${0.6 + bass * 1.4})`;

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