Skip to content

Tine

A tine (a comb tooth, a single stylus drawn through the bath) drags the water along a line through LL with unit direction D^\hat D. Points near the line travel the full stroke; points farther away travel less, with sharpness α\alpha setting how quickly the pull fades:

d=perpendicular distance from P to the line (L,D^),Psrc=P−z D^ αα+d.d = \text{perpendicular distance from } P \text{ to the line } (L, \hat D), \qquad P_{src} = P - z\,\hat D\,\frac{\alpha}{\alpha + d} .
A horizontal tine through the top-left cluster and a vertical one through the bottom-right, each applied as n passes of z/n — the composition invariant, watched.open full size ↗
  • A pure shear. The displacement is always along D^\hat D and depends only on dd, so every line parallel to the stroke translates rigidly. The Jacobian is identically 1: exactly area-preserving and exact at any magnitude — a tine never folds, never needs sub-stepping.
  • Composes exactly. Forty passes of z/40z/40 equal one pass of zz — this is the regression check that guards the engine’s single y-down coordinate space, because a stray vertical flip between offscreen passes makes consecutive deformations cancel instead of compose.
  • Per-note pitch bend → glide (bend_mode = 0, the default). The bend drags that voice’s drop along the pitch axis, emitting a narrow tine along the drag each frame the bend changes — per voice, never a global shear, in MPE mode. On the playable lattices (chromatic grid, Jankó, piano grid) a one-semitone bend moves the drop exactly one cell, so the drop travels under the finger; the other layouts keep a rendering cap.
  • Master-channel pitch bend (range ±2) → a global shear tine, in both bend modes. In classic mode this is what the bend wheel does.
  • Marble mode: a one-finger drag, or a left drag with the mouse.

α is the sharpness — small values make a knife-edge crease, large values a broad sweep; z is the stroke magnitude in canvas heights.

midi-sink 2.0.0-rc.5 · AGPL-3.0 · source