FAILURE MAP
← Case archive

FA-81201 / Music interval and transposition theory / Open access

Parallel fifths and octaves between two voices: compound fifths and octaves missed · case 01

Parallel twelfths (G5 over C4 moving to A5 over D4) and parallel double octaves are not reported.

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

ROOT CAUSE

The interval class is taken from the raw semitone difference without reducing compounds modulo twelve.

THE FAILURE

The interval class is taken from the raw semitone difference without reducing compounds modulo twelve.

Unsuccessful approach: Reducing the absolute difference also reports crossed voices a fourth apart as parallel fifths.

Case contract

Input [upper, lower], equal-length lists of MIDI pitches. For each adjacent pair of positions i, i+1 report [i, "P5"] or [i, "P8"] when the interval (upper - lower) mod 12 is 7 or 0 at both positions (the same class), both voices move (no repeated note in either), and they move in the same direction. Return the list in order; unequal lengths return None.

Why this case matters

Counterpoint checkers and voice-leading validators flag forbidden parallel perfect intervals.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    if not isinstance(x, list) or len(x) != 2:
        return None
    up, lo = x
    if len(up) != len(lo):
        return None
    out = []
    for i in range(len(up) - 1):
        a = up[i] - lo[i]
        b = up[i + 1] - lo[i + 1]
        mu = up[i + 1] - up[i]
        ml = lo[i + 1] - lo[i]
        if a != b or a not in (0, 7):
            continue
        if mu == 0 or ml == 0:
            continue
        if (mu > 0) != (ml > 0):
            continue
        out.append([i, 'P8' if a == 0 else 'P5'])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[67, 69], [60, 62]], [[0, 'P5']]), ([[72, 74], [60, 62]], [[0, 'P8']]), ([[67, 67], [60, 60]], []), ([[67, 69], [60, 60]], []), ([[72, 67], [60, 72]], []), ([[72, 79], [60, 55]], []), ([[60, 62], [67, 69]], []), ([[55, 57], [60, 62]], [[0, 'P5']])], [([[79, 81], [60, 62]], [[0, 'P5']]), ([[72, 67], [60, 72]], []), ([[72, 79], [60, 55]], []), ([[67, 72], [60, 65]], [[0, 'P5']]), ([[72, 79], [60, 60]], []), ([[60, 62], [67, 69]], []), ([[55, 57], [60, 62]], [[0, 'P5']]), ([[72, 72, 74], [60, 60, 62]], [[1, 'P8']])], [([[72, 79], [60, 60]], []), ([[60, 62], [67, 69]], []), ([[55, 57], [60, 62]], [[0, 'P5']]), ([[67, 69, 71], [60, 62, 64]], [[0, 'P5'], [1, 'P5']]), ([[67, 65], [60, 58]], [[0, 'P5']]), ([[67, 72], [60, 60]], []), ([[64, 65], [60, 62]], []), ([[76, 74], [64, 62]], [[0, 'P8']])], [([[72, 74], [60, 62]], [[0, 'P8']]), ([[60, 62], [67, 69]], []), ([[55, 57], [60, 62]], [[0, 'P5']]), ([[72, 72, 74], [60, 60, 62]], [[1, 'P8']]), ([[67, 72], [60, 60]], []), ([[64, 65], [60, 62]], []), ([[67], [60]], []), ([[], []], [])], [([[79, 81], [60, 62]], [[0, 'P5']]), ([[60, 62], [67, 69]], []), ([[55, 57], [60, 62]], [[0, 'P5']]), ([[], []], []), ([[67, 69], [60]], None), ([[76, 74], [64, 62]], [[0, 'P8']]), ([[67, 71], [60, 64]], [[0, 'P5']]), ([[79, 74], [60, 67]], [])]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("oracle %d" % i, solve(args), expected)
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
oracle 0[[0, 'P5']][[0, 'P5']]Passed
oracle 1[][[0, 'P8']]Failed
oracle 2[][]Passed
oracle 3[][]Passed
oracle 4[][]Passed
oracle 5[][]Passed
oracle 6[][]Passed
oracle 7[][[0, 'P5']]Failed

SHA-256 / 6ddacf52d692515789b654b2ea296ff83d085fe6b96bb0b048e59bb113b0985d

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    if not isinstance(x, list) or len(x) != 2:
        return None
    up, lo = x
    if len(up) != len(lo):
        return None
    out = []
    for i in range(len(up) - 1):
        a = abs(up[i] - lo[i]) % 12
        b = abs(up[i + 1] - lo[i + 1]) % 12
        mu = up[i + 1] - up[i]
        ml = lo[i + 1] - lo[i]
        if a != b or a not in (0, 7):
            continue
        if mu == 0 or ml == 0:
            continue
        if (mu > 0) != (ml > 0):
            continue
        out.append([i, 'P8' if a == 0 else 'P5'])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[67, 69], [60, 62]], [[0, 'P5']]), ([[72, 74], [60, 62]], [[0, 'P8']]), ([[67, 67], [60, 60]], []), ([[67, 69], [60, 60]], []), ([[72, 67], [60, 72]], []), ([[72, 79], [60, 55]], []), ([[60, 62], [67, 69]], []), ([[55, 57], [60, 62]], [[0, 'P5']])], [([[79, 81], [60, 62]], [[0, 'P5']]), ([[72, 67], [60, 72]], []), ([[72, 79], [60, 55]], []), ([[67, 72], [60, 65]], [[0, 'P5']]), ([[72, 79], [60, 60]], []), ([[60, 62], [67, 69]], []), ([[55, 57], [60, 62]], [[0, 'P5']]), ([[72, 72, 74], [60, 60, 62]], [[1, 'P8']])], [([[72, 79], [60, 60]], []), ([[60, 62], [67, 69]], []), ([[55, 57], [60, 62]], [[0, 'P5']]), ([[67, 69, 71], [60, 62, 64]], [[0, 'P5'], [1, 'P5']]), ([[67, 65], [60, 58]], [[0, 'P5']]), ([[67, 72], [60, 60]], []), ([[64, 65], [60, 62]], []), ([[76, 74], [64, 62]], [[0, 'P8']])], [([[72, 74], [60, 62]], [[0, 'P8']]), ([[60, 62], [67, 69]], []), ([[55, 57], [60, 62]], [[0, 'P5']]), ([[72, 72, 74], [60, 60, 62]], [[1, 'P8']]), ([[67, 72], [60, 60]], []), ([[64, 65], [60, 62]], []), ([[67], [60]], []), ([[], []], [])], [([[79, 81], [60, 62]], [[0, 'P5']]), ([[60, 62], [67, 69]], []), ([[55, 57], [60, 62]], [[0, 'P5']]), ([[], []], []), ([[67, 69], [60]], None), ([[76, 74], [64, 62]], [[0, 'P8']]), ([[67, 71], [60, 64]], [[0, 'P5']]), ([[79, 74], [60, 67]], [])]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("oracle %d" % i, solve(args), expected)
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
oracle 0[[0, 'P5']][[0, 'P5']]Passed
oracle 1[[0, 'P8']][[0, 'P8']]Passed
oracle 2[][]Passed
oracle 3[][]Passed
oracle 4[][]Passed
oracle 5[][]Passed
oracle 6[[0, 'P5']][]Failed
oracle 7[][[0, 'P5']]Failed

SHA-256 / 4128b1c0bbb7f69a2eec3bec8e6cb34d85d0672aa75cca891609f8c824044b20

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

A deterministic bounded teaching model with a stipulated toy contract; it is not a complete music notation or theory engine. 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:50:00.765563+00:00.

Case digest / 77262ca0d0f6ac9db6c320952d4293dc3a1f19c5967dcc97a669222c602e0def