openmixer — generated API reference
    Preparing search index...

    Function panGains

    • The L/R gain a pan position distributes a signal to when it feeds a stereo bus (constant-power / −3 dB pan law). pan is the canonical −1 (hard left) … 0 (center) … +1 (hard right) scalar (ChannelStrip.pan). Hard-left → { l: 1, r: 0 }, center → { l: √0.5, r: √0.5 } (≈ 0.707 each, equal power), hard-right → { l: 0, r: 1 }.

      For a mono channel this places it across a stereo bus; for a linked stereo strip it acts as a balance (pan rides the existing L/R). For a mono bus the engine ignores this and mono-sums. Pure; out-of-range pan is clamped to [−1, 1].

      Parameters

      • pan: number

        the pan position (−1 = L, 0 = center, +1 = R)

      Returns { l: number; r: number }

      the linear L and R gains (each in [0, 1])