Test tones
Ten seconds, looped. A low beat, four notes and a high warble.
The card below is HTML drawn through a fragment shader. Press play on its <audio> controls. An AnalyserNode
writes the level of four frequency bands to four CSS custom properties. The shader reads them as uniforms and the bars read them with CSS.
The text field and the buttons keep working.
Ten seconds, looped. A low beat, four notes and a high warble.
Press play on the card. Sound analysis starts with the first tap.
<audio controls> element. fx names the effect.AnalyserNode. Each frame, four bands of its spectrum are written to custom properties.u_amount, u_xy and u_progress.fx library registers --fx-amount, --fx-x, --fx-y and --fx-progress as numbers and passes them to every effect. This page uses them as four band levels from 0 to 1.AudioContext stays suspended until the person taps, so the analysis starts on the first play event.Each check builds its own fixture in a corner of the window. The card above isn't touched.
| Result | Experiment | Detail |
|---|
From Chromium 157 with software rendering. The rows above say what your browser does.
<audio controls> in a canvas. The native audio controls are drawn, and play, seek and volume work under the shader because the element keeps its layout position for hit testing.OfflineAudioContext decodes and analyses the clip without a tap, which is how the second live check gets band levels. Live analysis needs the tap.AudioContext.playbackStats.averageLatency where the browser has it, else outputLatency. The test browser has no sound card and reports 0, so whether picture and sound line up on a phone or on Bluetooth headphones is for a person to judge. The checkbox turns the delay off for comparison.