Diorama

Made for a big screen.

This site is one 3D scene, built for a computer: a wide window and a mouse. Open dioramajs.dev on a desktop or a laptop to see it.This site is one 3D scene, built for a wide window. Make this one wider, or open dioramajs.dev on a larger screen.

GitHub

DioramaDocs

@dioramajs/audio/visualizer

Exports of @dioramajs/audio/visualizer.

View as Markdown
On this page
import { bands, default, HIGH } from '@dioramajs/audio/visualizer'

Functions

bandsLevels 0..1 of `count` bars from analyser bytes, on a log scale from LOW to HIGH. A band narrower than a bin reads between its two nearest bins, a wider one takes its loudest bin. `ring` lays the spectrum out twice, mirrored: bass at the bottom, treble at the top.
readPeaksPeaks of the JSON: audiowaveform (v1, v2, any channels and bits), or an array of 0..1.
resample`count` bar heights from peaks: the loudest point of each bar's stretch, or between two.
traceThe wave of `POINTS` from analyser bytes: from the first rising zero crossing, so a steady tone stands still, averaged down from SPAN samples and tapered to the middle line at both ends.

Constants

defaultThe sound of a page's <audio> or <video> made visible in a decorative element: live bars, a wave or a ring, or the waveform of the whole track with seeking. The player stays the DOM.
HIGH
LOWThe spectrum the bars show, Hz, on a log scale.
POINTSPoints of the wave.