FAILURE MAP
← Case archive

FA-10931 / Audio channel mixing / Open access

Pan linear complement · case 01

The pan law doubles total amplitude by omitting normalization.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The pan law doubles total amplitude by omitting normalization.

VERIFIED REPAIR

Apply the explicit PCM/playback contract: Pan mono into stereo using a linear constant-sum law with pan in [-1,1], negative left and positive right; this is not an equal-power law.

Unsuccessful approach: Swapping the complement factors reverses pan direction.

Case contract

Pan mono into stereo using a linear constant-sum law with pan in [-1,1], negative left and positive right; this is not an equal-power law.

Why this case matters

A pure Python local audio pipeline stage with explicit sample formats and frame conventions; no real-time device or signal-spectrum claims.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(samples, pan):
    return [[x*(1-pan),x*(1+pan)] for x in samples]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([1], 0)),[[0.5, 0.5]])
check('fixture 2',solve(*([1], -1)),[[1, 0]])
check('fixture 3',solve(*([1], 1)),[[0, 1]])
check('fixture 4',solve(*([], 0.5)),[])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1[[1, 1]][[0.5, 0.5]]Failed
fixture 2[[2, 0]][[1, 0]]Failed
fixture 3[[0, 2]][[0, 1]]Failed
fixture 4[][]Passed

SHA-256 / 6c237396f91a18525b7ee9b83b14e152f0803cf470d89327882d95b31cad7f6d

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(samples, pan):
    return [[x*(1+pan)/2,x*(1-pan)/2] for x in samples]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([1], 0)),[[0.5, 0.5]])
check('fixture 2',solve(*([1], -1)),[[1, 0]])
check('fixture 3',solve(*([1], 1)),[[0, 1]])
check('fixture 4',solve(*([], 0.5)),[])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1[[0.5, 0.5]][[0.5, 0.5]]Passed
fixture 2[[0.0, 1.0]][[1, 0]]Failed
fixture 3[[1.0, 0.0]][[0, 1]]Failed
fixture 4[][]Passed

SHA-256 / 1b2f419c81564d89301696fecef65bf1cb355eddad3b56f1a05e9ffef8aab61c

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(samples, pan):
    return [[x*(1-pan)/2,x*(1+pan)/2] for x in samples]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([1], 0)),[[0.5, 0.5]])
check('fixture 2',solve(*([1], -1)),[[1, 0]])
check('fixture 3',solve(*([1], 1)),[[0, 1]])
check('fixture 4',solve(*([], 0.5)),[])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1[[0.5, 0.5]][[0.5, 0.5]]Passed
fixture 2[[1.0, 0.0]][[1, 0]]Passed
fixture 3[[0.0, 1.0]][[0, 1]]Passed
fixture 4[][]Passed

SHA-256 / 2b94835c03489dc15352069c9b596c1a7fd20bcf54ab29df045a4f64d55c2575

Verification & scope

This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:38:43.512015+00:00.

Case digest / 7f77ef54cf39d2252f808429daf23c5b6479341dea030acbcd5d979c3a36bca8