FA-81121 / Music interval and transposition theory / Open access
Transposing instrument written and concert pitch: tenor saxophone treated like a clarinet · case 01
Tenor saxophone parts are written a major second above concert instead of a major ninth.
ROOT CAUSE
The tenor saxophone offset omits the extra octave of its major-ninth transposition.
THE FAILURE
The tenor saxophone offset omits the extra octave of its major-ninth transposition.
Unsuccessful approach: Using an octave offset keeps the octave but drops the whole-tone component.
Case contract
Input [instrument, pitch, direction]. Each instrument has a stipulated sounding offset in semitones (concert = written + offset): Bb clarinet -2, A clarinet -3, F horn -7, Eb alto sax -9, Bb tenor sax -14, Eb baritone sax -21, guitar -12, piccolo +12, D trumpet +2, flute 0. direction to_concert adds the offset, to_written subtracts it. pitch and result must be MIDI 0..127; otherwise, or for unknown instrument or direction, return None.
Why this case matters
Score and part generators convert between written and sounding pitch for every transposing instrument.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
table = {'Bb clarinet': -2, 'A clarinet': -3, 'F horn': -7, 'Eb alto sax': -9, 'Bb tenor sax': -2, 'Eb baritone sax': -21, 'guitar': -12, 'piccolo': 12, 'D trumpet': 2, 'flute': 0}
if not isinstance(x, list) or len(x) != 3:
return None
inst, pitch, direction = x
if inst not in table or not isinstance(pitch, int) or not 0 <= pitch <= 127:
return None
if direction == 'to_concert':
out = pitch + table[inst]
elif direction == 'to_written':
out = pitch - table[inst]
else:
return None
if out < 0 or out > 127:
return None
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[(['Bb clarinet', 62, 'to_concert'], 60), (['Bb clarinet', 60, 'to_written'], 62), (['F horn', 67, 'to_concert'], 60), (['F horn', 60, 'to_written'], 67), (['Eb alto sax', 69, 'to_concert'], 60), (['Eb alto sax', 60, 'to_written'], 69), (['Bb tenor sax', 74, 'to_concert'], 60), (['Bb tenor sax', 13, 'to_concert'], None)], [(['F horn', 60, 'to_written'], 67), (['Eb alto sax', 69, 'to_concert'], 60), (['Eb alto sax', 60, 'to_written'], 69), (['Bb tenor sax', 74, 'to_concert'], 60), (['Bb tenor sax', 60, 'to_written'], 74), (['piccolo', 60, 'to_concert'], 72), (['piccolo', 72, 'to_written'], 60), (['D trumpet', 60, 'to_concert'], 62)], [(['Bb tenor sax', 60, 'to_written'], 74), (['piccolo', 60, 'to_concert'], 72), (['piccolo', 72, 'to_written'], 60), (['D trumpet', 60, 'to_concert'], 62), (['D trumpet', 62, 'to_written'], 60), (['guitar', 64, 'to_concert'], 52), (['flute', 60, 'to_concert'], 60), (['Bb tenor sax', 13, 'to_concert'], None)], [(['Bb tenor sax', 74, 'to_concert'], 60), (['D trumpet', 62, 'to_written'], 60), (['guitar', 64, 'to_concert'], 52), (['flute', 60, 'to_concert'], 60), (['flute', 60, 'to_written'], 60), (['flute', 127, 'to_concert'], 127), (['piccolo', 115, 'to_concert'], 127), (['Bb tenor sax', 13, 'to_concert'], None)], [(['Bb tenor sax', 74, 'to_concert'], 60), (['Bb tenor sax', 60, 'to_written'], 74), (['flute', 60, 'to_written'], 60), (['flute', 127, 'to_concert'], 127), (['piccolo', 115, 'to_concert'], 127), (['Eb baritone sax', 10, 'to_concert'], None), (['piccolo', 120, 'to_concert'], None), (['Bb clarinet', 1, 'to_concert'], None)]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 0 | 60 | 60 | Passed |
| oracle 1 | 62 | 62 | Passed |
| oracle 2 | 60 | 60 | Passed |
| oracle 3 | 67 | 67 | Passed |
| oracle 4 | 60 | 60 | Passed |
| oracle 5 | 69 | 69 | Passed |
| oracle 6 | 72 | 60 | Failed |
| oracle 7 | 11 | None | Failed |
SHA-256 / a1022105ca8cadf25d237cf51c0e9fb0a4cdd131a8541255fd23ab9ed8f534e9
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
table = {'Bb clarinet': -2, 'A clarinet': -3, 'F horn': -7, 'Eb alto sax': -9, 'Bb tenor sax': -12, 'Eb baritone sax': -21, 'guitar': -12, 'piccolo': 12, 'D trumpet': 2, 'flute': 0}
if not isinstance(x, list) or len(x) != 3:
return None
inst, pitch, direction = x
if inst not in table or not isinstance(pitch, int) or not 0 <= pitch <= 127:
return None
if direction == 'to_concert':
out = pitch + table[inst]
elif direction == 'to_written':
out = pitch - table[inst]
else:
return None
if out < 0 or out > 127:
return None
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[(['Bb clarinet', 62, 'to_concert'], 60), (['Bb clarinet', 60, 'to_written'], 62), (['F horn', 67, 'to_concert'], 60), (['F horn', 60, 'to_written'], 67), (['Eb alto sax', 69, 'to_concert'], 60), (['Eb alto sax', 60, 'to_written'], 69), (['Bb tenor sax', 74, 'to_concert'], 60), (['Bb tenor sax', 13, 'to_concert'], None)], [(['F horn', 60, 'to_written'], 67), (['Eb alto sax', 69, 'to_concert'], 60), (['Eb alto sax', 60, 'to_written'], 69), (['Bb tenor sax', 74, 'to_concert'], 60), (['Bb tenor sax', 60, 'to_written'], 74), (['piccolo', 60, 'to_concert'], 72), (['piccolo', 72, 'to_written'], 60), (['D trumpet', 60, 'to_concert'], 62)], [(['Bb tenor sax', 60, 'to_written'], 74), (['piccolo', 60, 'to_concert'], 72), (['piccolo', 72, 'to_written'], 60), (['D trumpet', 60, 'to_concert'], 62), (['D trumpet', 62, 'to_written'], 60), (['guitar', 64, 'to_concert'], 52), (['flute', 60, 'to_concert'], 60), (['Bb tenor sax', 13, 'to_concert'], None)], [(['Bb tenor sax', 74, 'to_concert'], 60), (['D trumpet', 62, 'to_written'], 60), (['guitar', 64, 'to_concert'], 52), (['flute', 60, 'to_concert'], 60), (['flute', 60, 'to_written'], 60), (['flute', 127, 'to_concert'], 127), (['piccolo', 115, 'to_concert'], 127), (['Bb tenor sax', 13, 'to_concert'], None)], [(['Bb tenor sax', 74, 'to_concert'], 60), (['Bb tenor sax', 60, 'to_written'], 74), (['flute', 60, 'to_written'], 60), (['flute', 127, 'to_concert'], 127), (['piccolo', 115, 'to_concert'], 127), (['Eb baritone sax', 10, 'to_concert'], None), (['piccolo', 120, 'to_concert'], None), (['Bb clarinet', 1, 'to_concert'], None)]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 0 | 60 | 60 | Passed |
| oracle 1 | 62 | 62 | Passed |
| oracle 2 | 60 | 60 | Passed |
| oracle 3 | 67 | 67 | Passed |
| oracle 4 | 60 | 60 | Passed |
| oracle 5 | 69 | 69 | Passed |
| oracle 6 | 62 | 60 | Failed |
| oracle 7 | 1 | None | Failed |
SHA-256 / 967ecfe3847ffb8d454c789e10fba8fe29b41628d60c969451c5a5301b45e672
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:49:59.993396+00:00.
Case digest / 007237c940f3d4356b453fab9030c568d9fe2019bde52599ba33d5bddddd9a2f