← f_ notebook · docs/f-reference/f_chladni.md

f_chladni — Bpatcher Reference (As-Built) ​

Last updated: 2026-07-12Status: Working — three outlets confirmed in Max

Role ​

Single-resonance audio-to-vecfield transducer. A note (MIDI 0–127) selects one dominant Chladni mode out of 8, amp scales output brightness. Physically faithful to a real Chladni plate — driven at one frequency at a time, not an 8-band superposition — which gives the pattern identity per mode rather than visualizer-style spectral legibility.

As with the earlier framing, this is an ingredient, not necessarily a final display layer — useful as a modulation source (vecfield outlet) or a raw-energy signal (magnitude outlet) as much as a direct visual.

Concept ​

Circular plate Chladni figure. Superimposes up to 8 circular membrane modes using large-x asymptotic Bessel function approximations. mode selects between two mode-selection behaviors:

  • mode=0 (linear interp) — note maps linearly across the Bessel zero span (z0=2.4048 – z7=11.0864); active mode is a weighted blend of the two adjacent modes.
  • mode=1 (Gaussian resonance snap) — each Bessel zero is a resonance peak; active amplitude follows a Gaussian falloff (spread controls width) centered on the nearest zero. Stronger per-mode identity, more sculptural.

Per-mode contribution:

(env*cos(r - z_m) + reflectamt*env*cos(radius - r - z_m)) * cos(m*θ + ph0)

where env = sqrt(2/(π*r)).

Outlets ​

OutletContentBypass behavior
out1luma — nodal line pattern (1 - clamp(sqrt(abs(total))*linesharpness, 0, 1))black
out2float32 f_vecfield — central-difference gradient of total, unit-normalized (0.5=zero vector); raw gradient of total, pointing toward antinodesneutral (0.5, 0.5)
out3unsigned magnitude scalar — clamp(abs(total) * gain, 0, 1); raw modal interference energy, distinct from both other outlets (out1 is lossily compressed via sqrt, out2 discards magnitude entirely)black

out3 was added 2026-07-12 per .specify/f_chladni/plan.md Decision 7 — see ideas/dry_wet_gain_and_novel_field_outlet.md finding 6 for the "novel-signal" heuristic that motivated it. gain=1.0 confirmed visually correct in Max (not blown out, not too dim) — no further tuning needed.

Parameters ​

NameTypeRangeDefaultDescription
notefloat0–12760.0MIDI note — selects Bessel mode position
ampfloat0–11.0Amplitude envelope — scales output brightness
dishradiusfloat0.1–4.01.0Plate radius — scales field in both view modes
reflectamtfloat0–10.0Boundary reflection amount — adds reflected wave
linesharpnessfloat0.1–10010.0Nodal line sharpness — higher = thinner lines
ph0float-2π–2π0.0Global phase offset — rotates nodal pattern
spreadfloat0.1–1.00.3Mode B (Gaussian snap) falloff width — 0.1=snap, 0.5=broad
modefloat0–10.00=linear interp between modes, 1=Gaussian resonance snap
view_modefloat0–10.00=circular plate, 1=unwrapped strip (for f_stereo routing)
gainfloat0–201.0Scales out3 only — no effect on out1/out2 (confirmed empirically 2026-07-12)
bypassbypass—0All three outlets go to their bypass state

Geometry ​

Circular plate only, Bessel functions (J_m) on radial coordinate. Strip view mode retained for f_stereo routing. Rectangular/sine-mode boundary would be a separate module, not a mode switch.

Near-center singularity (sqrt(2/πr) diverges at origin) is accepted — characteristic of real Chladni images.

Signal Chain Recipes ​

f_chladni out2 (vecfield) → f_caustic field inlet     — convergence at nodal lines
f_chladni out2 (vecfield) → f_vf_warp field inlet      — source texture warps toward nodal lines
f_chladni out3 (magnitude) → f_weave scalar inlet      — matches f_vf_potential's existing
                                                          vecfield-in/scalar-out precedent

Companion Patches (the shipped audio patch does not fit this module; EEG not built) ​

This module's interface is note + amp only (much simpler than the superseded 8-band filterbank contract). Neither planned companion that speaks it exists:

  • Planned, not built: a note / amp audio companion (sigmund~ or a pitch follower → note; peakamp~ → slide~ → amp; master gain; task T123).
  • Planned, not built: f_chladni_eeg.maxpat — dominant band or weighted centroid → note; total power → amp.
  • Shipped, but a different thing: package/patchers/f_chladni_audio.maxpat is the superseded 8-band filterbank version. It splits audio into eight resonant bands and sends m0amp–m7amp, which this module no longer accepts. See f_chladni_audio.md.

Loose Threads ​

  • EEG companion patch not built — interface is stable and ready for it whenever wanted. The shipped f_chladni_audio emits the old m0amp–m7amp contract, so there is currently no working audio companion for note / amp (T123 open; T140 unverified)
  • Preferred MIDI playing range not empirically pinned down beyond "1–2 octaves is the expected expressive range"
  • view_mode = 1 only changes mode 1's own total: the helper functions used for mode 0 and for the vecfield (out2) recompute circular coordinates from the pixel position, so the unwrapped strip view reaches only mode 1's inline total. Mode 0 and out2 stay circular whatever view_mode is. (The Parameters table above describes view_mode as switching the view; read it with this caveat.)

Superseded ​

The original 8-mode filterbank architecture (m0amp–m7amp, z0–z7, ph1–ph7, per-mode EEG band mapping) was replaced by the 2026-06-17 single-resonance reframe. See .specify/f_chladni/spec.md for the full rationale and the superseded-parameter list.

References ​

The large-x Bessel-function asymptotic approximation of circular-membrane modal interference is standard physics (Chladni plate modes); no specific source was consulted beyond the classical formulation. The radial standing-wave model with edge reflection (reflectamt), the angular harmonic terms cos(n*theta + ph0), and mode B's Gaussian resonance weighting are this module's own construction.

The shipped audio patch (f_chladni_audio, an eight-band filterbank sending m0amp–m7amp) is original wiring and does not speak this module's note / amp contract; its verification task remains open (.specify/f_chladni/T140). The planned sigmund~ / peakamp~ companion is not built (T123).

See docs/f-reference/f_chladni.md (this file) for the full algorithm, outlet contract, and companion-patch notes.

Source File ​

package/patchers/f_chladni.maxpat