Skip to main content
6 min

Turning Audio Into a Resonant Plate

A Chladni visualizer belongs in the lab first because the artifact is interactive. The field note documents the pipeline, the visual choices, and the export path.

Generative ArtAudio VisualizationCreative CodingChladni

Turning Audio Into a Resonant Plate

A Chladni plate is a simple physical trick with a strange amount of visual authority. Drive a surface at a resonant frequency, scatter sand on it, and the sand migrates away from vibrating regions into nodal lines. You get a drawing made by pressure and absence.

That is the right metaphor for an audio visualizer. Most visualizers treat sound as amplitude, spectrum bars, or a waveform trace. Useful, but familiar. Chladni patterns make the same signal feel structural. The audio is not painted on top of the image. It selects the modes of the surface.

The live artifact is in the lab: Chladni Visualizer. Drop an audio file, choose a preset, add title text, and export a frame or WebM clip.

The Pipeline

The Python renderer has four layers.

First, audio_analyzer.py extracts the signal features: waveform envelope, FFT, estimated tempo, onset strength, MFCCs, chroma, and band energy. The browser version uses Web Audio features for immediate preview, while the Python renderer uses librosa for repeatable exports.

Second, feature_mapper.py turns those features into visual parameters. Intensity follows local energy. Scale and sharpness respond to spectral balance. Warmth follows the harmonic profile. The mode pair, usually written as m,n, shifts over time so the simulated plate changes its geometry instead of only changing its color.

Third, chladni_engine.py renders the standing-wave field. The core pattern is a superposition of sine terms across a square grid. That gives the visualizer its plate-like symmetry: horizontal and vertical nodes, stable crossing points, and occasional dense interference when modes stack.

Fourth, color_engine.py maps the signed field into a palette. Beat flashes push brightness for a few frames, but the base image stays legible because the pattern is normalized before coloring.

The Bug That Made It Better

The first good test rendered a 3-second tone into 129 frames. It worked, but it looked wrong: the nodal lines were softer than the simulation deserved. The resize filter was the culprit. Lanczos made sense for photographs, but it blurred the very thing a Chladni image cares about.

Switching the upsample pass to nearest-neighbor preserved the line structure. That sounds crude, but it matches the artifact. A Chladni plate is not a gradient. It is a thresholded physical boundary. The sharpness is the point.

The second fix was color normalization. The raw pattern was technically rendering, but it was not using the full gradient range, so most frames lived in a narrow middle band. Normalizing each frame before palette mapping made the geometry readable.

Why It Belongs in the Lab First

This is not mainly a post. The post is the supporting document. The actual thing is a tool you can touch.

Putting it in the lab makes the shape honest: an experiment with controls, presets, and export buttons. It can still produce assets for posts, show pages, music identity, or album covers, but its first job is to be inspectable.

The field note matters for a different reason. It records what the demo does not show: why the renderer uses a physics metaphor, why sharp resizing wins, why presets exist, and how the CLI path differs from the browser path.

Presets

The current presets are deliberately practical.

  • Classic keeps the plate legible: monochrome, slow movement, clear nodal lines.
  • Festival pushes saturation and beat response for stage visuals.
  • Album favors square output, title overlays, and slower visual pacing.
  • Social optimizes for short clips with direct motion and high contrast.

The presets are not skins. They change the output contract. Album art wants a composed still. A festival loop wants motion. A social clip wants immediate contrast in the first second.

Export Path

The CLI can render MP4, WebM, GIF, PNG previews, and PNG sequences. It also supports typography overlays for artist and title. That means the browser lab can stay lightweight while the Python renderer does the heavier production work.

python render.py track.mp3 --output visual.mp4 --preset album --title "Track Name" --artist "Artist"

The preview mode now saves a middle frame rather than frame zero. That avoids the common failure where the first frame is visually flat because the audio has not developed yet.

What Comes Next

The next useful step is bridging the browser controls back into the Python renderer: export a preset JSON blob from the lab page, then feed it to the CLI for a high-resolution render. After that, the visualizer becomes a small production system instead of a one-off demo.

That is the line I want more lab projects to cross: interactive enough to explore, deterministic enough to ship.

Related Posts