FA-80849 / Music interval and transposition theory / Member archive
Spelled pitch to MIDI key number: letters treated as evenly spaced whole tones · case 04
F, G, A and B read one semitone sharp (F4 reports 66) while C, D and E stay correct.
Case contract
Input a spelled pitch string: uppercase letter A-G, any run of accidentals (# = +1, b = -1, x = +2), then a signed integer octave where C4 = 60 and C-1 = 0. Return the MIDI key number, or None for malformed text or results outside 0..127.
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 | 68 | 67 | 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 ↗