Page actions
instrument implementation / implementation-contract
MIDI Note Number ↔ Note Name Converter implementation
A source-bound implementation contract for MIDI Note Number ↔ Note Name Converter; deployment and executable qualification remain separate.
Status: VERIFIED_CLEANLifecycle: implementation-contract
Binding contract
This record describes what an executable surface must bind and validate. It does not claim that a public calculator, package, or production route is deployed.
- Record owner
- Guth Instruments
- Lifecycle
- verified-clean
- Evidence ID
- t6-043
- Effect
- Computation or source lookup only
Input and validation requirements
- Reject non-integer MIDI inputs, MIDI values below 0, and MIDI values above 127 unless the product explicitly supports a nonstandard range.
- Avoid language-specific remainder behavior for negative values; validate the MIDI range before applying modulo.
- Define whether note names are case-sensitive and whether formats such as Bb4, DB4, C♭4, or B#3 are accepted.
- Define behavior for enharmonic spellings and normalize aliases to one canonical output spelling.
- Ensure octave -1 is formatted unambiguously as C-1 rather than being confused with a negative note number.
- Do not silently clamp invalid inputs or return a plausible-looking result for malformed note names.
Required corrections
No binding erratum is attached to this unique-name record. Implementers must still preserve the declared units, domain, and failure behavior.
Inspectable interface fixture
The sample below is evidence for interface and validation tests, not a production implementation.
{
"inputs": {
"midi_number": 0
},
"expected_outputs": {
"note_name": "C-1",
"note_index": 0,
"octave": -1
},
"working": "note_index = 0 % 12 = 0. octave = floor(0 / 12) - 1 = 0 - 1 = -1. Index 0 maps to C, so the result is C-1."
}Other records
Sources and evidence
These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.
VERIFIED_LEDGER.jsonevidence-tranche6/tranche6-results.json