openmixer — generated API reference
    Preparing search index...

    Function panLCR

    • The LCR pan law (archive §3.1, carried verbatim by 2026-09-08-lcr-mains.md): a mono source panned across an LCR bus splits between the discrete C speaker and a phantom L/R pair by divergence, constant-power at every position.

      panLCR(pan, div):
      {l0, r0} = panGains(pan) # existing law
      cW = (1 - div) * centreWindow(pan) # centreWindow(0)=1, →0 at |pan|→~0.5
      L = l0 * phantomScale ; R = r0 * phantomScale ; C = cW
      # normalise so L²+R²+C² == 1

      phantomScale = sqrt(1 − cW²) is the renormalisation the archive's comment names: the phantom pair carries whatever power C did not take, and panGains's own invariant (l0² + r0² = 1) makes the total exactly phantomScale² · 1 + cW² = (1 − cW²) + cW² = 1.

      At divergence = 1, cW = 0 and this returns EXACTLY panGains(pan) — phantomScale = 1, C = 0. At divergence = 0 and pan = 0 (dead centre), cW = 1 and this returns { l: 0, r: 0, c: 1 } — the centre image is entirely discrete.

      pan and divergence are both clamped to their ranges (divergence to [0, 1]; panGains clamps pan itself). Pure.

      Parameters

      • pan: number
      • divergence: number

      Returns { c: number; l: number; r: number }