Skip to content

The Operators

midi-sink never solves a fluid on a grid. Grid advection diffuses, and diffusion turns crisp suminagashi rings into mud within seconds. Instead the ink is an area-preserving, continuous deformation of the sheet, evaluated by inverse lookup: for every output pixel PP the engine asks where that water came from, Psrc=f−1(P)P_{src} = f^{-1}(P), and reads the ink there. Two half-float textures hold the accumulated pre-image coordinates (u,v)(u, v) plus the ink phase and a per-drop hue selector; each gesture is one more pass that reads one texture and writes the other. This is Aubrey Jaffer’s mathematical marbling (Lu, Jaffer, Jin, Zhao & Mao, 2012), extended with two of his own later closed-form fields and a few of ours — see the citations.

Every operator page follows the same shape:

  • The formula, exactly as the shader evaluates it, in aspect-corrected normalized coordinates (non-square canvases are corrected before the mathematics, or rings become ellipses; distances are in canvas heights).
  • Invariants — why it preserves area, its class — exact at any magnitude, or sub-stepped to stay away from a fold — and what composes with what. Every operator declares its class and passes the same four-part conservation gate (the desktop bench’s --soak: area, mass, the pre-image’s wander, fabrication as a rate); the composite is gated per backend.
  • Ownership — which MIDI dimension or gesture drives it, and the one-consumer rule: a MIDI dimension has exactly one consumer at a time (bend_mode, press_mode, slide_mode choose it) so two operators never fight over one stream.
  • A live demo — the release wasm, the same engine bytes every platform ships, embedded through the scene API. The sliders are the formula’s symbols. There is no second implementation anywhere on this site.

Two conventions run through every demo. The scenes are paced — the ⏱ slider is the number of frames between steps, and the operators that compose exactly are applied as a run of small passes, so you watch the transformation happen rather than see only its result (set it to 0 for the result alone). And every scene works on two ring clusters, top-left and bottom-right, so one operator can show two orientations or two signs at once: a horizontal and a vertical tine, two counter-rotating vortices, perpendicular fold axes, a drop beside a pressure feed. A third: every scene carries the medium toggle (M) — flip it to 1 and the same script runs from its first strike as the Anod discharge: every strike in a scene is the medium’s, so under Anod the ring clusters are struck as sparks on their charge, as a tap is in the app, and the deformation is read as strain instead of bands. The toggle is permanent for the run, never a switch at the end. Flip it to 2 and the script runs as the Kessho crystal — the strikes in a mineral’s habit, the strain read as birefringence — with mineral=0…5 on the address choosing the crystal.

The drop, the first operator: six expansions on each cluster, one per step.open full size ↗
OperatorKindClassDriven by
Drop — and the pressure feedexpansionexactstrike, pressure feed, breath
Tineshearexact (Jacobian 1)per-note bend (glide), master bend
Vortex — exponential, Rankine, torsionrotationexact at any anglemod wheel / Airwave CC (exponential), two-finger twist (Rankine)
Wake — inviscid doublet, viscous Stokesletpotential-flow doublet · 2-D Stokes impulsesub-stepped ≤ a/4every stylus stroke; a wind legato (the sounding drop dragged to the next note)
Pinch — saddle, crossed tinesHamiltonian saddleexact (det = 1)CC 74 with Slide → Pinch, pen azimuth, two-finger pinch
Ripplesine shearexact (Jacobian 1)per-note bend with Per-note bend → Ripple, CC 102/103
Swirl — Lamb–Oseenviscous rotationexact at any anglepoly pressure 0xA0, channel pressure with Channel pressure → Swirl
Scrolltranslation with ingressexactthe piano-roll layouts’ tempo

The second medium, Anod, reads the same field as a discharge and brought five operators with it — every one of them a shear or a rotation composed from the first nine’s lemmas, and every one of them playable under suminagashi too:

OperatorKindClassDriven by
Wave torsionoscillating rotation by θ(r)exact at any amplitudethe vortex routes with the Torsion profile; the note-on sweep; Anod’s press
Chladni — an eddy in every keyexact disc rotations on the layout’s cells · the inverse Chladni’s summed flowexact (discs) · first-order (inverse)the stir and balance CCs 106/107; Anod’s per-note bend
Burst — the viscous multipole, m ≥ 2time-integrated impulsive multipolesub-stepped (first-order, under the wake’s criterion)the gesture; the middle piece of the Anod strike
Spark — the composed strikedrop + burst + jagged shearsexact shears; sub-stepped by inheritancethe Anod strike on its charge; the slide (CC 74) its frequency
Chirikov — the standard mapsinusoidal kick + linear driftexact; capped at K = 1.25 per stepthe throw: CC 109, Anod’s mod wheel
Leader — the leader stroke (v3.0)a jagged tree walked from the strike, each segment a slip along itself in a window across and along, charging its channelsub-stepped (one sub-step at every velocity: the slip ≤ a quarter of the along-ramp)the Anod note-on under the spark reading (anod_glow_mode 1); sumi_add_leader

The crystal’s three — and the strike’s own shapes (3.0)

Section titled “The crystal’s three — and the strike’s own shapes (3.0)”

The third medium, Kessho, reads the same field as a strained crystal between crossed polarizers: the Jacobian’s strain as the birefringence colours of the Michel-Lévy chart by a mineral’s law, its rotation as the trace discriminant and the caustic of a bed under the water. It brought three operators that turn a chord into geometry — the coupled operators of symplectic harmony, every one exact and every one held to the medium’s own flatness gate (--kessho-flat: z = 1 is flat for any exact field) — and it gave the strike and the stroke a shape: a mineral’s habit for the drop and its cleavage for the tine, both exact by the drop page’s theorem. The mineral is the medium’s palette — six at ship, each with its optical law and its habit; the reader’s exercise on the Minerals page is the selenite sign test.

OperatorKindClassDriven by
Crystal drop — the habitthe drop’s expansion with R(θ): the rhomb, the hexagon, the rosetteexact at any amplitude (a translation in ρ by a function of θ alone)every strike under Kessho, in the mineral’s habit
Cleavage profiles — the twin kink, the terracea shear by a bump profile across the strokeexact (a shear by one coordinate)every stroke under Kessho, in the mineral’s profile
Arnol’d lock — the tongue (v3.0)a generating-function kick + the Lamb–Oseen twist, one lookupexact; one Newton on θ in the shader, K ≤ 0.8/max|W′|the press under Kessho (press_mode 3), the interval against the bass
Braid — Kirchhoff chord braiding (v3.0)the swirl passes, one per voice, in Strang order — the chord’s superposed flow, never integratedexact by construction (every factor a rotation)the chord itself under Kessho (bend_mode 5): the bend moves the consonance
Chord wave — the standing-wave lattice (v3.0)a ripple-tine per voice, windowed across its band — the direction the pitch class, the wavelength the octaveexact (a shear by one coordinate)poly pressure under Kessho: the amplitude, baked as deltas

The sound has its section through the same water: the Poincaré strobe samples every voice’s pair at the bass’s phasor and draws the returns into the sheet — a section, not an operator.

The three media and their look — the washi, the glass and the crystal; the three palettes of the first two and the palette model behind them, the six minerals of the third — are the medium guide’s.

Continuous feeds are deltas. Pressure, breath, swirl and pinch arrive as absolute controller values, but the operators consume rates: a pass per frame whose magnitude is the smoothed value × Δt. Feeding an absolute value integrates into runaway strain; a delta relaxes when the hand relaxes.

Paper is screen-locked. The washi fibre and grain are sampled in screen space, never through the deformed field. Ink moves; the paper it sits on does not. If fibres ever drift with a tine, that invariant has been broken.

midi-sink 2.0.0 · AGPL-3.0 · source