- 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.
const { bass } = audio.getBands();
circle.style.transform = `scale(${0.6 + bass * 1.4})`;01 CSS · Start here
Turn bass energy into the scale of a circle. One value is enough to make an interface listen.
Read a single band and map its 0–1 range to a CSS transform.
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.