FA-81252 / Music interval and transposition theory / Member archive
Interval inversion by quality and number: octave excluded from perfect intervals · case 02
P8 and P15 are rejected while M8 would be accepted.
Case contract
Input an interval string: quality from P, M, m, A, d, AA, dd followed by a positive integer. Compound numbers above 8 reduce by 7 until <= 8. P is valid only for 1, 4, 5, 8; M and m only for 2, 3, 6, 7. Inversion maps M<->m, A<->d, AA<->dd, P->P and number n -> 9-n. Invalid input returns None.
Why this case matters
Pitch spelling and interval arithmetic decide the notes that notation, transposition and analysis tools display or play.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 2 | null | "P1" | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗