Spectrum - Dots
This visualization presents a real-time audio spectrum analyzer that animates a canvas of colored dots. It uses the Web Audio API to capture microphone input, and then d3.js scales map frequency data to screen coordinates and color values. Each frame, the code reads frequency data using `analyser.getByteFrequencyData`, then draws fading circles to create a dynamic, trailing effect. The visualization displays the raw frequency amplitude, with low values shown in black and higher amplitudes in red, rendered as a continuously updating canvas animation.
AI-generated descriptionA relatively simple audio spectrum analyzer built using the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API" target="_blank">Web Audio API</a> and <a href="https://d3js.org/" target="_blank">d3.js</a> and rendered using canvas. Also made a bright version: <a href='http://bl.ocks.org/alexmacy/9914d59438c9fac7a50c7846378f204e'>Audio Spectrum Analyzer - bright</a>
This was made as part of a series exploring the visualization of audio that was presented at a d3.oakland. A big list of the demos from this series can be found <a href="https://alexmacy.github.io/d3.oakland" target="_blank">here</a>.