FA-80992 / Music interval and transposition theory / Member archive
Key signature and measure accidental resolution: natural sign falls back to the key signature · case 02
In G major, F4 after an explicit natural plays F#4 again because the natural mark (zero) is treated as absent.
Case contract
Input [fifths, tokens]. fifths -7..7 gives signature sharps on F C G D A E B or flats on B E A D G C F. Tokens are "|" (barline) or letter + optional sign (# b x bb n) + single-digit octave. An explicit sign sets the alteration for that letter in that octave until the next barline (n = 0 cancels the signature); otherwise the signature applies. Return the MIDI numbers (C4 = 60) or None if any token or the signature is invalid.
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 0 | [70, 70, 70, 70] | [70, 71, 71, 70] | 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 ↗