openmixer — generated API reference
    Preparing search index...

    Function balanceGains

    • The L/R gain a pan position acts as a balance on a stereo signal (a linked stereo strip — M32 / Roland model). Unlike panGains (which places a mono signal with constant power), balance leaves the existing L/R image intact at center and only attenuates one side as you move off-center: center → { l: 1, r: 1 } (unity, image kept), hard-left → { l: 1, r: 0 } (R muted), hard-right → { l: 0, r: 1 } (L muted). This is the standard linear balance law. Pure; out-of-range pan is clamped to [−1, 1].

      Parameters

      • pan: number

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

      Returns { l: number; r: number }

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